From 70e06affe95d9ac3db63164704320cebfad67e8b Mon Sep 17 00:00:00 2001 From: tb <> Date: Tue, 18 Jun 2024 05:34:09 +0000 Subject: do_ext_i2d(): populate ext_oct with ASN1_STRING_set0() ok jsing --- src/lib/libcrypto/x509/x509_conf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/x509/x509_conf.c b/src/lib/libcrypto/x509/x509_conf.c index 6d611204a5..ed63f1c4d0 100644 --- a/src/lib/libcrypto/x509/x509_conf.c +++ b/src/lib/libcrypto/x509/x509_conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_conf.c,v 1.9 2024/06/18 05:32:38 tb Exp $ */ +/* $OpenBSD: x509_conf.c,v 1.10 2024/06/18 05:34:09 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -212,8 +212,7 @@ do_ext_i2d(const X509V3_EXT_METHOD *method, int ext_nid, int crit, } if ((ext_oct = ASN1_OCTET_STRING_new()) == NULL) goto merr; - ext_oct->data = ext_der; - ext_oct->length = ext_len; + ASN1_STRING_set0(ext_oct, ext_der, ext_len); ext_der = NULL; ext_len = 0; -- cgit v1.2.3-55-g6feb