summaryrefslogtreecommitdiffstats
path: root/ssl/t1_enc.c
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-02-05 15:13:49 +1000
committerPauli <paul.dale@oracle.com>2020-02-06 16:22:00 +1000
commit8b6ffd40401bd3b78538cb8d496db0c6926185b0 (patch)
tree6329353eb7e6c01592b28898974ae2b8f2faaf9b /ssl/t1_enc.c
parentb744f915ca8bb37631909728dd2529289bda8438 (diff)
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 'ssl/t1_enc.c')
-rw-r--r--ssl/t1_enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c
index 5937d91e60..59bf789af0 100644
--- a/ssl/t1_enc.c
+++ b/ssl/t1_enc.c
@@ -55,7 +55,7 @@ static int tls1_PRF(SSL *s,
goto err;
mdname = EVP_MD_name(md);
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST,
- (char *)mdname, strlen(mdname) + 1);
+ (char *)mdname, 0);
*p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_SECRET,
(unsigned char *)sec,
(size_t)slen);