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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Ophélie Gagnard
slapos.libnetworkcache
Commits
bc5c0754
Commit
bc5c0754
authored
Sep 28, 2021
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use b64decode and b64encode instead of deprecated decodestring and encodestring
parent
cc1ee494
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
slapos/libnetworkcache.py
slapos/libnetworkcache.py
+3
-3
No files found.
slapos/libnetworkcache.py
View file @
bc5c0754
...
...
@@ -23,7 +23,7 @@ import sys
import
tarfile
import
tempfile
import
traceback
from
base64
import
b64encode
,
decodestring
,
encodestring
from
base64
import
b64encode
,
b64decode
try
:
import
configparser
from
http.client
import
HTTPConnection
,
HTTPSConnection
...
...
@@ -431,7 +431,7 @@ class NetworkcacheClient(object):
k
=
self
.
signature_private_key
if
k
is
None
:
return
''
return
encodestring
(
crypto
.
sign
(
k
,
content
,
'sha1'
)).
decode
()
return
b64encode
(
crypto
.
sign
(
k
,
content
,
'sha1'
)).
decode
()
def
_verifySignatureInCertificateList
(
self
,
content
,
signature_string
):
"""
...
...
@@ -439,7 +439,7 @@ class NetworkcacheClient(object):
find any.
"""
if
signature_string
:
signature
=
decodestring
(
signature_string
.
encode
())
signature
=
b64decode
(
signature_string
.
encode
())
content
=
content
.
encode
()
for
certificate
in
self
.
signature_certificate_list
:
try
:
...
...
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