On Thu, Jul 07, 2016, Chris Bare wrote:

> Ok, that makes sense with what I'm seeing. I just tried changing this:
>     const EVP_MD* md = EVP_get_digestbyobj(sig_alg_oid);
> to this:
>     const EVP_MD* md = EVP_get_digestbyname("SHA256");
> 
> and it all worked correctly.
> so given that I have an OID for ecdsa-with-SHA256, is there a function that
> will return just the digest algorithm?
> I'm trying to be as flexible as possible, so I don't want to hard code this
> or have my own limited lookup table.
> 

OBJ_find_sigid_algs() you pass it the NID of the signature algorithm and it
reurns the public key NID and the digest NID.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

Reply via email to