From: Richard Levitte Date: Mon, 12 Aug 2019 11:52:53 +0000 (+0200) Subject: OSSL_PARAM_construct_from_text(): handle non-hex octet string input X-Git-Tag: openssl-3.0.0-alpha1~1590 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=810a1d0320fa1706c722d1cfcae398bfb8219837;p=oweals%2Fopenssl.git OSSL_PARAM_construct_from_text(): handle non-hex octet string input Reviewed-by: Matt Caswell Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/8877) --- diff --git a/crypto/params_from_text.c b/crypto/params_from_text.c index 2a861c94fe..72770ddc53 100644 --- a/crypto/params_from_text.c +++ b/crypto/params_from_text.c @@ -91,6 +91,8 @@ static int prepare_from_text(const OSSL_PARAM *paramdefs, const char *key, case OSSL_PARAM_OCTET_STRING: if (*ishex) { *buf_n = strlen(value) >> 1; + } else { + *buf_n = value_n; } break; }