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

Remove not needed methods.

parent 55f8937e
......@@ -491,37 +491,3 @@ class TestNetworkcacheClient(LibNetworkCacheMixin):
wrong_signature_string = 'InvalidSignatureString'.encode('base64')
result_bool = nc._verifySignatureInCertificateList(wrong_signature_string)
self.assertFalse(result_bool)
# XXX(lucas): Should we provide the file under HTTP server using
# SimpleHTTPServer? Because actually it gonna just throw an IOError.
def test_verification_with_signature_certificate_file_list_url(self):
"""
slapos.libnetworkcache.NetworkcacheClient supports to have the
certification file under an HTTP server.
During the _verifySignatureInCertificateList method, it'll try to
download the certification from the given URL and check if the signature
is valid.
"""
nc = slapos.libnetworkcache.NetworkcacheClient(
shacache=self.shacache_url,
shadir=self.shadir_url,
signature_private_key_file=self.signature_private_key_file,
signature_certificate_file_list=['http://localhost:0/public.pem'])
signature_string = nc._getSignatureString()
self.assertRaises(IOError, \
nc._verifySignatureInCertificateList, signature_string)
def test_signature_verification_priority(self):
"""
During the signature vefirication, the filesystem path has priority over
urls. So, if the public key is
"""
nc = slapos.libnetworkcache.NetworkcacheClient(
shacache=self.shacache_url,
shadir=self.shadir_url,
signature_private_key_file=self.signature_private_key_file,
signature_certificate_file_list=['http://localhost:0/public.pem'])
signature_string = nc._getSignatureString()
self.assertRaises(IOError, \
nc._verifySignatureInCertificateList, signature_string)
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