From: job Date: Mon, 25 Mar 2024 11:27:00 +0000 (+0000) Subject: Error on setting an invalid CSR version X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=15799da50f13d48675bb30819762e6d3d59b4cce;p=openbsd Error on setting an invalid CSR version Reported by David Benjamin (BoringSSL) OK tb@ --- diff --git a/lib/libcrypto/x509/x509rset.c b/lib/libcrypto/x509/x509rset.c index f097a379fb8..9154e338454 100644 --- a/lib/libcrypto/x509/x509rset.c +++ b/lib/libcrypto/x509/x509rset.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509rset.c,v 1.12 2023/02/16 08:38:17 tb Exp $ */ +/* $OpenBSD: x509rset.c,v 1.13 2024/03/25 11:27:00 job Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -68,7 +68,7 @@ int X509_REQ_set_version(X509_REQ *x, long version) { - if (x == NULL) + if (x == NULL || version != 0) return (0); x->req_info->enc.modified = 1; return (ASN1_INTEGER_set(x->req_info->version, version));