Commit e2ca86a7 authored by Łukasz Nowak's avatar Łukasz Nowak

Follow change of API.

Certificates to check content are provided as inline strings.

also convert those certificates correctly.
parent 2ad6ef0b
......@@ -344,7 +344,7 @@ class Buildout(UserDict.DictMixin):
self.upload_cache_url = None
self.upload_dir_url = None
self.signature_private_key_file = None
self.signature_certificate_file = None
self.signature_certificate_list = None
else:
# support networkcache
networkcache_section_name = options.get('networkcache-section')
......@@ -358,11 +358,17 @@ class Buildout(UserDict.DictMixin):
'upload-cache-url', '')
self.upload_dir_url = networkcache_section.get(
'upload-dir-url', '')
self.signature_certificate_file = networkcache_section.get(
'signature-certificate-file', '')
signature_certificate_list = networkcache_section.get(
'signature-certificate-list', '')
self.signature_private_key_file = networkcache_section.get(
'signature-private-key-file', '')
# parse signature list
cert_marker = '-----BEGIN CERTIFICATE-----'
self.signature_certificate_list = [cert_marker + '\n' + q.strip() \
for q in signature_certificate_list.split(cert_marker) \
if q.strip()]
self._logger.info('Networkcache enabled.')
self._logger.info('Networkcache download cache: %r, directory '
'%r' % (self.download_cache_url, self.download_dir_url))
......@@ -373,7 +379,7 @@ class Buildout(UserDict.DictMixin):
options['__networkcache__download-dir-url'] = self.download_dir_url
options['__networkcache__upload-cache-url'] = self.upload_cache_url
options['__networkcache__upload-dir-url'] = self.upload_dir_url
options['__networkcache__signature-certificate-file'] = self.signature_certificate_file
options['__networkcache__signature-certificate-list'] = signature_certificate_list
options['__networkcache__signature-private-key-file'] = self.signature_private_key_file
else:
......@@ -384,7 +390,7 @@ class Buildout(UserDict.DictMixin):
self.upload_cache_url = None
self.upload_dir_url = None
self.signature_private_key_file = None
self.signature_certificate_file = None
self.signature_certificate_list = None
def _buildout_path(self, name):
if '${' in name:
......@@ -425,7 +431,7 @@ class Buildout(UserDict.DictMixin):
upload_cache_url=self.upload_cache_url,
upload_dir_url=self.upload_dir_url,
signature_private_key_file=self.signature_private_key_file,
signature_certificate_file=self.signature_certificate_file,
signature_certificate_list=self.signature_certificate_list,
)
# Now copy buildout and setuptools eggs, and record destination eggs:
......@@ -931,7 +937,7 @@ class Buildout(UserDict.DictMixin):
download_dir_url=self.download_dir_url,
upload_cache_url=self.upload_cache_url,
upload_dir_url=self.upload_dir_url,
signature_certificate_file=self.signature_certificate_file,
signature_certificate_list=self.signature_certificate_list,
signature_private_key_file=self.signature_private_key_file,
)
......@@ -1170,8 +1176,8 @@ def _install_and_load(spec, group, entry, buildout):
upload_dir_url=buildout_options.get('__networkcache__upload-dir-url'),
signature_private_key_file=buildout_options.get(
'__networkcache__signature-private-key-file'),
signature_certificate_file=buildout_options.get(
'__networkcache__signature-certificate-file'),
signature_certificate_list=buildout_options.get(
'__networkcache__signature-certificate-list'),
)
__doing__ = 'Loading %s recipe entry %s:%s.', group, spec, entry
......
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