diff options
Diffstat (limited to 'lib/libcrypto/x509/x509_r2x.c')
-rw-r--r-- | lib/libcrypto/x509/x509_r2x.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libcrypto/x509/x509_r2x.c b/lib/libcrypto/x509/x509_r2x.c index 99c423d8c99..39b392259b5 100644 --- a/lib/libcrypto/x509/x509_r2x.c +++ b/lib/libcrypto/x509/x509_r2x.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_r2x.c,v 1.16 2023/02/16 08:38:17 tb Exp $ */ +/* $OpenBSD: x509_r2x.c,v 1.17 2023/04/25 09:46:36 job Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -85,9 +85,7 @@ X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey) xi = ret->cert_info; if (sk_X509_ATTRIBUTE_num(r->req_info->attributes) != 0) { - if ((xi->version = ASN1_INTEGER_new()) == NULL) - goto err; - if (!ASN1_INTEGER_set(xi->version, 2)) + if (!X509_set_version(ret, 2)) goto err; } |