Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eta
gajim
Commits
700cbeb1
Commit
700cbeb1
authored
11 years ago
by
fedor.brunner
Browse files
Options
Downloads
Patches
Plain Diff
Old pyOpenSSL is missing get_signature_algorithm. Use the default "sha256"
signature algorithm for old pyOpenSSL. Fixes #7641
parent
82265425
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/jingle_content.py
+5
-1
5 additions, 1 deletion
src/common/jingle_content.py
src/common/jingle_xtls.py
+5
-1
5 additions, 1 deletion
src/common/jingle_xtls.py
with
10 additions
and
2 deletions
src/common/jingle_content.py
+
5
−
1
View file @
700cbeb1
...
...
@@ -220,7 +220,11 @@ class JingleContent(object):
+
'
.cert
'
cert
=
load_cert_file
(
certpath
)
if
cert
:
digest_algo
=
cert
.
get_signature_algorithm
().
split
(
'
With
'
)[
0
]
try
:
digest_algo
=
cert
.
get_signature_algorithm
().
split
(
'
With
'
)[
0
]
except
AttributeError
,
e
:
# Old py-OpenSSL is missing get_signature_algorithm
digest_algo
=
"
sha256
"
security
.
addChild
(
'
fingerprint
'
).
addData
(
cert
.
digest
(
digest_algo
))
for
m
in
(
'
x509
'
,
):
# supported authentication methods
...
...
This diff is collapsed.
Click to expand it.
src/common/jingle_xtls.py
+
5
−
1
View file @
700cbeb1
...
...
@@ -192,7 +192,11 @@ def check_cert(jid, fingerprint):
if
os
.
path
.
exists
(
certpath
):
cert
=
load_cert_file
(
certpath
)
if
cert
:
digest_algo
=
cert
.
get_signature_algorithm
().
split
(
'
With
'
)[
0
]
try
:
digest_algo
=
cert
.
get_signature_algorithm
().
split
(
'
With
'
)[
0
]
except
AttributeError
,
e
:
# Old py-OpenSSL is missing get_signature_algorithm
digest_algo
=
"
sha256
"
if
cert
.
digest
(
digest_algo
)
==
fingerprint
:
return
True
return
False
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment