diff options
author | Pauli <paul.dale@oracle.com> | 2020-02-05 06:13:49 +0100 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-02-06 07:22:00 +0100 |
commit | 8b6ffd40401bd3b78538cb8d496db0c6926185b0 (patch) | |
tree | 6329353eb7e6c01592b28898974ae2b8f2faaf9b /crypto/evp/p5_crpt2.c | |
parent | Stop accepting certificates signed using SHA1 at security level 1 (diff) | |
download | openssl-8b6ffd40401bd3b78538cb8d496db0c6926185b0.tar.xz openssl-8b6ffd40401bd3b78538cb8d496db0c6926185b0.zip |
Params: change UTF8 construct calls to avoid explicit strlen(3) calls.
It is better, safer and smaller to let the library routine handle the
strlen(3) call.
Added a note to the documentation suggesting this.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11019)
Diffstat (limited to 'crypto/evp/p5_crpt2.c')
-rw-r--r-- | crypto/evp/p5_crpt2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/evp/p5_crpt2.c b/crypto/evp/p5_crpt2.c index 2a27f53047..aa8ab98756 100644 --- a/crypto/evp/p5_crpt2.c +++ b/crypto/evp/p5_crpt2.c @@ -52,7 +52,7 @@ int PKCS5_PBKDF2_HMAC(const char *pass, int passlen, (unsigned char *)salt, saltlen); *p++ = OSSL_PARAM_construct_int(OSSL_KDF_PARAM_ITER, &iter); *p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST, - (char *)mdname, strlen(mdname) + 1); + (char *)mdname, 0); *p = OSSL_PARAM_construct_end(); if (EVP_KDF_CTX_set_params(kctx, params) != 1 || EVP_KDF_derive(kctx, out, keylen) != 1) |