]> granicus.if.org Git - openssl/commitdiff
OSSL_PARAM_construct_from_text(): handle non-hex octet string input
authorRichard Levitte <levitte@openssl.org>
Mon, 12 Aug 2019 11:52:53 +0000 (13:52 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 15 Aug 2019 20:12:25 +0000 (22:12 +0200)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8877)

crypto/params_from_text.c

index 2a861c94fe341b2d492fdc7d1ba47960916d4404..72770ddc531a13824023fd54982da07d2e23a5f8 100644 (file)
@@ -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;
     }