Commit 30f98a9d authored by Łukasz Nowak's avatar Łukasz Nowak

Follow API change.

Certificates to check content are provided inline.
parent e388ee36
......@@ -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())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment