For a small project I want to manage some certificates. In the beginning I used the Python "cryptography" extension but I needed some further functionality so I switched to M2Crypto.
With "cryptography" I retrieved the signature hash algorithm from the certificate like so cert.signature_hash_algorithm.name.upper(). With M2Crypto I cannot find a way to get the same result.
How can I get the signature hash algorithm from a X509 certificate with M2Crypto?
Sorry to say, but neither a loaded certificate provides such functionality, nor does M2 offer an ANS.1 reader to manually find the OID of the signature to evaluate the hash algorithm from the signature.
Sources: