summaryrefslogtreecommitdiff
path: root/crypto/evp/p_lib.c
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2019-09-04 19:27:08 +1000
committerPauli <paul.dale@oracle.com>2019-09-04 19:41:22 +1000
commit7f588d20cd9ed2bb0ee2577a4523453964f532b0 (patch)
tree02b81ea1b5152c87e1b0ebe802dc2581df6fcfa5 /crypto/evp/p_lib.c
parent550f974a09942ace37cf3cf14021ea5e51e6dd11 (diff)
downloadopenssl-new-7f588d20cd9ed2bb0ee2577a4523453964f532b0.tar.gz
OSSL_PARAM_construct_utf8_string computes the string length.
If the passed string length is zero, the function computes the string length from the passed string. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9760)
Diffstat (limited to 'crypto/evp/p_lib.c')
-rw-r--r--crypto/evp/p_lib.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c
index 5691fffae3..5ec519d27c 100644
--- a/crypto/evp/p_lib.c
+++ b/crypto/evp/p_lib.c
@@ -345,14 +345,12 @@ EVP_PKEY *EVP_PKEY_new_CMAC_key(ENGINE *e, const unsigned char *priv,
if (engine_id != NULL)
params[paramsn++] =
OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_ENGINE,
- (char *)engine_id,
- strlen(engine_id) + 1);
+ (char *)engine_id, 0);
# endif
params[paramsn++] =
OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_CIPHER,
- (char *)cipher_name,
- strlen(cipher_name) + 1);
+ (char *)cipher_name, 0);
params[paramsn++] =
OSSL_PARAM_construct_octet_string(OSSL_MAC_PARAM_KEY,
(char *)priv, len);