Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xavier Thompson
slapos.buildout
Commits
30f98a9d
Commit
30f98a9d
authored
Aug 24, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Follow API change.
Certificates to check content are provided inline.
parent
e388ee36
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
5 deletions
+27
-5
src/zc/buildout/networkcache.txt
src/zc/buildout/networkcache.txt
+27
-5
No files found.
src/zc/buildout/networkcache.txt
View file @
30f98a9d
...
...
@@ -262,6 +262,15 @@ Lets create the signature files:
- private.pem
- public.pem
Now it is time to have certificate as string like:
-----BEGIN CERTIFICATE-----
certificate.
-----END CERTIFICATE-----
With left side whitespaces, in order to use it in buildout profile.
>>> public_certificate = ''.join([' ' + q for q in open(public_certificate_path).readlines()])
First put not signed file in networkcache:
>>> write(sample_buildout, 'buildout.cfg',
...
...
@@ -314,7 +323,8 @@ Now enable signature, so it should not download any content which is not trusted
... upload-cache-url = %(nc_url)sshacache
... upload-dir-url = %(nc_url)sshadir
... signature-private-key-file = %(private_key_path)s
... signature-certificate-file = %(public_certificate_path)s
... signature-certificate-list =
... %(public_certificate)s
... ''' % globals())
>>> print system(buildout)
Networkcache enabled.
...
...
@@ -351,6 +361,15 @@ Now lets create new signature files:
- private2.pem
- public2.pem
Now it is time to have certificate as string like:
-----BEGIN CERTIFICATE-----
certificate.
-----END CERTIFICATE-----
With left side whitespaces, in order to use it in buildout profile.
>>> new_public_certificate = ''.join([' ' + q for q in open(new_public_certificate_path).readlines()])
There is a new certificate file, so it should not download the old content:
>>> write(sample_buildout, 'buildout.cfg',
...
...
@@ -369,7 +388,7 @@ There is a new certificate file, so it should not download the old content:
... download-cache-url = %(nc_url)sshacache
... download-dir-url = %(nc_url)sshadir
... signature-private-key-file = %(new_private_key_path)s
... signature-certificate-
file = %(new_public_certificate_path
)s
... signature-certificate-
list = %(new_public_certificate
)s
... ''' % globals())
>>> print system(buildout)
Networkcache enabled.
...
...
@@ -401,7 +420,8 @@ If it can not find a trustable entry into server, it should upload the files usi
... download-cache-url = %(nc_url)sshacache
... download-dir-url = %(nc_url)sshadir
... signature-private-key-file = %(new_private_key_path)s
... signature-certificate-file = %(new_public_certificate_path)s
... signature-certificate-list =
... %(new_public_certificate)s
... upload-cache-url = %(nc_url)sshacache
... upload-dir-url = %(nc_url)sshadir
... ''' % globals())
...
...
@@ -436,7 +456,8 @@ Buildout can download the content using the old certificatei, because it still a
... download-cache-url = %(nc_url)sshacache
... download-dir-url = %(nc_url)sshadir
... signature-private-key-file = %(private_key_path)s
... signature-certificate-file = %(public_certificate_path)s
... signature-certificate-list =
... %(public_certificate)s
... upload-cache-url = %(nc_url)sshacache
... upload-dir-url = %(nc_url)sshadir
... ''' % globals())
...
...
@@ -468,7 +489,8 @@ Buildout can download the content using the new certificate, because it still av
... download-cache-url = %(nc_url)sshacache
... download-dir-url = %(nc_url)sshadir
... signature-private-key-file = %(private_key_path)s
... signature-certificate-file = %(public_certificate_path)s
... signature-certificate-list =
... %(public_certificate)s
... upload-cache-url = %(nc_url)sshacache
... upload-dir-url = %(nc_url)sshadir
... ''' % globals())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment