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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Douglas
slapos.libnetworkcache
Commits
c0c5c973
Commit
c0c5c973
authored
Jan 19, 2012
by
Yingjie Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Forces to use trustable certificate."
This reverts commit
5ed93f4c
.
parent
5ed93f4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
slapos/libnetworkcache.py
slapos/libnetworkcache.py
+12
-7
No files found.
slapos/libnetworkcache.py
View file @
c0c5c973
...
...
@@ -220,17 +220,22 @@ class NetworkcacheClient(object):
raise
DirectoryNotFound
(
'It was impossible to parse json response:
\
n
%s'
%
traceback
.
format_exc
())
filtered_data_list
=
[]
if
self
.
signature_certificate_list
is
None
:
raise
DirectoryNotFound
(
'No trustable certificate is configured.'
)
for
data
in
data_list
:
if
len
(
data
[
1
]):
if
self
.
_verifySignatureInCertificateList
(
data
[
0
],
data
[
1
])
and
\
self
.
_isCompatible
(
data
[
0
],
binary_mode
=
binary_mode
):
filtered_data_list
.
append
(
data
)
if
self
.
signature_certificate_list
is
not
None
:
for
data
in
data_list
:
if
len
(
data
[
1
]):
if
self
.
_verifySignatureInCertificateList
(
data
[
0
],
data
[
1
])
and
\
self
.
_isCompatible
(
data
[
0
],
binary_mode
=
binary_mode
):
filtered_data_list
.
append
(
data
)
else
:
filtered_data_list
=
data_list
if
len
(
filtered_data_list
)
==
0
:
raise
DirectoryNotFound
(
'Could not find a trustable entry.'
)
if
len
(
filtered_data_list
)
>
1
and
self
.
signature_certificate_list
is
None
:
raise
DirectoryNotFound
(
'Too many entries for a given key %r. '
\
'Entries: %s.'
%
(
key
,
str
(
data_list
)))
information_json
,
signature
=
filtered_data_list
[
0
]
try
:
information_dict
=
json
.
loads
(
information_json
)
...
...
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