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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.buildout
Commits
06a6cec7
Commit
06a6cec7
authored
Aug 25, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prove that list of certificates work.
parent
9a20ba5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
121 additions
and
0 deletions
+121
-0
src/zc/buildout/networkcache.txt
src/zc/buildout/networkcache.txt
+121
-0
No files found.
src/zc/buildout/networkcache.txt
View file @
06a6cec7
...
...
@@ -538,6 +538,126 @@ Buildout can download the content using the new certificate, because it still av
Downloading hello.txt from network cache.
download: Downloaded http://localhost/hello.txt
Lets clean networkcache:
>>> rmdir(nc_data)
>>> mkdir(nc_data)
Of course two certificates can be used in order to check downloaded content. This supports a case, when more then one key was used to sign content.
Lets create another file on remote server:
>>> write(remote_server_data, 'hello-signed.txt', 'Hello my signed friend')
Main certificate will be used to upload hello.txt:
>>> write(sample_buildout, 'buildout.cfg',
... '''
... [buildout]
...
... networkcache-section = networkcache
... develop = download
... parts = download
...
... [download]
... recipe = download
... url = %(remote_server_url)shello.txt
...
... [networkcache]
... download-cache-url = %(nc_url)sshacache
... download-dir-url = %(nc_url)sshadir
... upload-cache-url = %(nc_url)sshacache
... upload-dir-url = %(nc_url)sshadir
... signature-private-key-file = %(main_key_file)s
... ''' % globals())
>>> print system(buildout)
Networkcache enabled.
Networkcache download cache: 'http://localhost/shacache', directory 'http://localhost/shadir'
Networkcache upload cache: 'http://localhost/shacache', directory 'http://localhost/shadir'
Develop: '/sample-buildout/download'
Updating download.
Downloading http://localhost/hello.txt
Downloading hello.txt from network cache.
Failed to download from network cache hello.txt: ...404...
Uploading http://localhost/hello.txt into network cache.
download: Downloaded http://localhost/hello.txt
Additional certificate will be used to upload hello-signed.txt:
>>> write(sample_buildout, 'buildout.cfg',
... '''
... [buildout]
...
... networkcache-section = networkcache
... develop = download
... parts = download
...
... [download]
... recipe = download
... url = %(remote_server_url)shello-signed.txt
...
... [networkcache]
... download-cache-url = %(nc_url)sshacache
... download-dir-url = %(nc_url)sshadir
... upload-cache-url = %(nc_url)sshacache
... upload-dir-url = %(nc_url)sshadir
... signature-private-key-file = %(additional_key_file)s
... ''' % globals())
>>> print system(buildout)
Networkcache enabled.
Networkcache download cache: 'http://localhost/shacache', directory 'http://localhost/shadir'
Networkcache upload cache: 'http://localhost/shacache', directory 'http://localhost/shadir'
Develop: '/sample-buildout/download'
Uninstalling download.
Installing download.
Downloading http://localhost/hello-signed.txt
Downloading hello-signed.txt from network cache.
Failed to download from network cache hello-signed.txt: ...404...
Uploading http://localhost/hello-signed.txt into network cache.
download: Downloaded http://localhost/hello-signed.txt
And if both certificates are used, both files will be trusted:
>>> write(sample_buildout, 'buildout.cfg',
... '''
... [buildout]
...
... networkcache-section = networkcache
... develop = download
... parts = download download-signed
...
... [download]
... recipe = download
... url = %(remote_server_url)shello.txt
...
... [download-signed]
... recipe = download
... url = %(remote_server_url)shello-signed.txt
...
... [networkcache]
... download-cache-url = %(nc_url)sshacache
... download-dir-url = %(nc_url)sshadir
... upload-cache-url = %(nc_url)sshacache
... upload-dir-url = %(nc_url)sshadir
... signature-certificate-list =
... %(main_certificate)s
... %(additional_certificate)s
... ''' % globals())
>>> print system(buildout)
Networkcache enabled.
Networkcache download cache: 'http://localhost/shacache', directory 'http://localhost/shadir'
Networkcache upload cache: 'http://localhost/shacache', directory 'http://localhost/shadir'
Develop: '/sample-buildout/download'
Uninstalling download.
Installing download.
Downloading http://localhost/hello.txt
Downloading hello.txt from network cache.
download: Downloaded http://localhost/hello.txt
Installing download-signed.
Downloading http://localhost/hello-signed.txt
Downloading hello-signed.txt from network cache.
download-signed: Downloaded http://localhost/hello-signed.txt
Of course eggs are also supported by networkcache:
>>> write(sample_buildout, 'buildout.cfg',
...
...
@@ -564,6 +684,7 @@ Of course eggs are also supported by networkcache:
Networkcache download cache: 'http://localhost/shacache', directory 'http://localhost/shadir'
Networkcache upload cache: 'http://localhost/shacache', directory 'http://localhost/shadir'
Develop: '/sample-buildout/download'
Uninstalling download-signed.
Uninstalling download.
Installing eggs.
Getting distribution for 'demoneeded==1.2c1'.
...
...
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