Commit 82b7135d authored by Alejandro Alvarez Ayllon's avatar Alejandro Alvarez Ayllon
Browse files

FTS-961: Change how the proxy subject is init

parent a866b1a9
Pipeline #118102 passed with stage
in 1 minute and 35 seconds
......@@ -155,10 +155,12 @@ class Delegator(object):
not_after.set_datetime( + lifetime)
proxy_subject = X509.X509_Name()
for key, value in map(lambda e: e.split('='), self.context.x509.get_subject().as_text().split(',')):
key = key.strip()
value = value.strip()
m2.x509_name_set_by_nid(proxy_subject._ptr(), Delegator.nid[key], value)
for entry in self.context.x509.get_subject():
ret = m2.x509_name_add_entry(proxy_subject._ptr(), entry._ptr(), -1, 0)
if ret == 0:
raise Exception(
"%s: '%s'" % (m2.err_reason_error_string(m2.err_get_error()), entry)
proxy = X509.X509()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment