]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/evp/evp_lib.c
In provider implemented methods, save the name number, not the name string
[thirdparty/openssl.git] / crypto / evp / evp_lib.c
index eeed7359a41dd0a1dde6d88acb31ed7af988188a..000d6e9623a1fc8e97590a30d0e748d77dcb6de1 100644 (file)
@@ -451,7 +451,7 @@ int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx)
 const char *EVP_CIPHER_name(const EVP_CIPHER *cipher)
 {
     if (cipher->prov != NULL)
-        return cipher->name;
+        return evp_first_name(cipher->prov, cipher->name_id);
 #ifndef FIPS_MODE
     return OBJ_nid2sn(EVP_CIPHER_nid(cipher));
 #else
@@ -479,7 +479,7 @@ int EVP_CIPHER_mode(const EVP_CIPHER *cipher)
 const char *EVP_MD_name(const EVP_MD *md)
 {
     if (md->prov != NULL)
-        return md->name;
+        return evp_first_name(md->prov, md->name_id);
 #ifndef FIPS_MODE
     return OBJ_nid2sn(EVP_MD_nid(md));
 #else