Merge branch 'master' into opaque-the-sigalg
diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py
index 7e05ca6..13c21e7 100644
--- a/src/OpenSSL/crypto.py
+++ b/src/OpenSSL/crypto.py
@@ -116,7 +116,6 @@
else:
_untested_error()
-
def _get_asn1_time(timestamp):
"""
Retrieve the time value of an ASN1 time object.
@@ -1083,8 +1082,8 @@
.. versionadded:: 0.13
"""
- alg = self._x509.cert_info.signature.algorithm
- nid = _lib.OBJ_obj2nid(alg)
+ algor = _lib.X509_get0_tbs_sigalg(self._x509)
+ nid = _lib.OBJ_obj2nid(algor.algorithm)
if nid == _lib.NID_undef:
raise ValueError("Undefined signature algorithm")
return _ffi.string(_lib.OBJ_nid2ln(nid))
@@ -1787,7 +1786,7 @@
obj = _lib.X509_EXTENSION_get_object(ext)
if _lib.OBJ_obj2nid(obj) == _lib.NID_crl_reason:
_lib.X509_EXTENSION_free(ext)
- _lib.sk_X509_EXTENSION_delete(self._revoked.extensions, i)
+ _lib.X509_REVOKED_delete_ext(self._revoked, i)
break
def set_reason(self, reason):