summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2019-08-29 11:55:57 +0100
committerMatt Caswell <matt@openssl.org>2019-08-29 15:21:13 +0100
commit9a7846dfe512baa55ad0485b67ffdbb2cb3a5cc3 (patch)
tree31a7011d0c23ef0e91cf50acf865409e4244dc90 /crypto
parent3be06e0d10e29dc4a00c6cb9dd06067b2c075f35 (diff)
Use ENGINE_get_id() instead of ENGINE_get_name()
ENGINE_get_name() actually returns more of a long description of the engine, whilst ENGINE_get_id() returns a shorter id. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9720)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/evp/p_lib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c
index 339c1fe4de..5691fffae3 100644
--- a/crypto/evp/p_lib.c
+++ b/crypto/evp/p_lib.c
@@ -322,7 +322,7 @@ EVP_PKEY *EVP_PKEY_new_CMAC_key(ENGINE *e, const unsigned char *priv,
{
#ifndef OPENSSL_NO_CMAC
# ifndef OPENSSL_NO_ENGINE
- const char *engine_name = e != NULL ? ENGINE_get_name(e) : NULL;
+ const char *engine_id = e != NULL ? ENGINE_get_id(e) : NULL;
# endif
const char *cipher_name = EVP_CIPHER_name(cipher);
const OSSL_PROVIDER *prov = EVP_CIPHER_provider(cipher);
@@ -342,11 +342,11 @@ EVP_PKEY *EVP_PKEY_new_CMAC_key(ENGINE *e, const unsigned char *priv,
}
# ifndef OPENSSL_NO_ENGINE
- if (engine_name != NULL)
+ if (engine_id != NULL)
params[paramsn++] =
OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_ENGINE,
- (char *)engine_name,
- strlen(engine_name) + 1);
+ (char *)engine_id,
+ strlen(engine_id) + 1);
# endif
params[paramsn++] =