Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
File Transfer Service
fts-rest
Commits
3852c84b
Commit
3852c84b
authored
Nov 14, 2016
by
Alejandro Alvarez Ayllon
Browse files
FTS-798
: Fix m2crypto issue
parent
3936d8d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/fts3/rest/client/delegator.py
View file @
3852c84b
...
...
@@ -64,11 +64,19 @@ def _init_m2_ctx(m2_ctx, issuer=None):
def
_workaround_new_extension
(
name
,
value
,
critical
=
False
,
issuer
=
None
,
_pyfree
=
1
):
lhash
=
m2
.
x509v3_lhash
()
ctx
=
m2
.
x509v3_set_conf_lhash
(
lhash
)
_init_m2_ctx
(
ctx
,
issuer
)
# m2crypto removes x509v3_lhash with 0.25.1
try
:
ctx
=
m2
.
x509v3_set_nconf
()
if
ctx
is
None
:
raise
MemoryError
()
_init_m2_ctx
(
ctx
,
issuer
)
x509_ext_ptr
=
m2
.
x509v3_ext_conf
(
None
,
ctx
,
name
,
value
)
except
AttributeError
:
lhash
=
m2
.
x509v3_lhash
()
ctx
=
m2
.
x509v3_set_conf_lhash
(
lhash
)
_init_m2_ctx
(
ctx
,
issuer
)
x509_ext_ptr
=
m2
.
x509v3_ext_conf
(
lhash
,
ctx
,
name
,
value
)
x509_ext_ptr
=
m2
.
x509v3_ext_conf
(
lhash
,
ctx
,
name
,
value
)
if
x509_ext_ptr
is
None
:
raise
Exception
(
'Could not create the X509v3 extension'
)
...
...
Write
Preview
Supports
Markdown
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