Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.libnetworkcache
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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
slapos.libnetworkcache
Commits
d34817db
Commit
d34817db
authored
Aug 24, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove not needed methods.
parent
55f8937e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
34 deletions
+0
-34
slapos/libnetworkcachetests.py
slapos/libnetworkcachetests.py
+0
-34
No files found.
slapos/libnetworkcachetests.py
View file @
d34817db
...
@@ -491,37 +491,3 @@ class TestNetworkcacheClient(LibNetworkCacheMixin):
...
@@ -491,37 +491,3 @@ class TestNetworkcacheClient(LibNetworkCacheMixin):
wrong_signature_string
=
'InvalidSignatureString'
.
encode
(
'base64'
)
wrong_signature_string
=
'InvalidSignatureString'
.
encode
(
'base64'
)
result_bool
=
nc
.
_verifySignatureInCertificateList
(
wrong_signature_string
)
result_bool
=
nc
.
_verifySignatureInCertificateList
(
wrong_signature_string
)
self
.
assertFalse
(
result_bool
)
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
)
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