X509 sigalg is now opaque
diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py
index 964420c..d6ebb22 100644
--- a/src/OpenSSL/crypto.py
+++ b/src/OpenSSL/crypto.py
@@ -1081,8 +1081,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))