EVP: Fix the returned value for ASN1_PKEY_CTRL_DEFAULT_MD_NID
authorRichard Levitte <levitte@openssl.org>
Wed, 5 Aug 2020 08:40:01 +0000 (10:40 +0200)
committerRichard Levitte <levitte@openssl.org>
Fri, 7 Aug 2020 02:14:59 +0000 (04:14 +0200)
commit90ef39f43ad5bf4e85c56a79d0b56fb590b3c7f7
tree8a71a0bf387898f5e08b4911af5de868c94b2cf5
parenta7922e208ddfbdcff44d1b3fa5839f96510d04bd
EVP: Fix the returned value for ASN1_PKEY_CTRL_DEFAULT_MD_NID

Trust the returned value from EVP_PKEY_get_default_digest_name()!  It
mimics exactly the values that EVP_PKEY_get_default_digest_nid() is
supposed to return, and that value should simply be passed unchanged.
Callers depend on it.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12586)
crypto/evp/p_lib.c