diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-12-27 09:11:08 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-12-27 09:11:08 -0600 |
commit | 3a03d7ba193b07d1146a6ff7615721598f05bfe0 (patch) | |
tree | 26eb0bdc040c82b9e67c2f60a0f7a072c601cf5b | |
parent | 7dfaa401ad210de4378d91aa721a3b7a1ca04a9e (diff) | |
download | cryptography-3a03d7ba193b07d1146a6ff7615721598f05bfe0.tar.gz cryptography-3a03d7ba193b07d1146a6ff7615721598f05bfe0.tar.bz2 cryptography-3a03d7ba193b07d1146a6ff7615721598f05bfe0.zip |
_encode_alt_name already does this
-rw-r--r-- | src/cryptography/hazmat/backends/openssl/backend.py | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py index ca07fe70..109993f2 100644 --- a/src/cryptography/hazmat/backends/openssl/backend.py +++ b/src/cryptography/hazmat/backends/openssl/backend.py @@ -199,20 +199,6 @@ def _encode_invalidity_date(backend, invalidity_date): return pp, r -def _encode_certificate_issuer(backend, certificate_issuer): - general_names = _encode_general_names(backend, certificate_issuer) - general_names = backend._ffi.gc( - general_names, backend._lib.GENERAL_NAMES_free - ) - pp = backend._ffi.new("unsigned char **") - r = backend._lib.i2d_GENERAL_NAMES(general_names, pp) - backend.openssl_assert(r > 0) - pp = backend._ffi.gc( - pp, lambda pointer: backend._lib.OPENSSL_free(pointer[0]) - ) - return pp, r - - def _encode_certificate_policies(backend, certificate_policies): cp = backend._lib.sk_POLICYINFO_new_null() backend.openssl_assert(cp != backend._ffi.NULL) @@ -695,7 +681,7 @@ _CRL_EXTENSION_ENCODE_HANDLERS = { } _CRL_ENTRY_EXTENSION_ENCODE_HANDLERS = { - CRLEntryExtensionOID.CERTIFICATE_ISSUER: _encode_certificate_issuer, + CRLEntryExtensionOID.CERTIFICATE_ISSUER: _encode_alt_name, CRLEntryExtensionOID.CRL_REASON: _encode_crl_reason, CRLEntryExtensionOID.INVALIDITY_DATE: _encode_invalidity_date, } |