diff options
Diffstat (limited to 'src/lib/libcrypto/x509/x509rset.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509rset.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509/x509rset.c b/src/lib/libcrypto/x509/x509rset.c index b05b2a1c91..6ac64f199d 100644 --- a/src/lib/libcrypto/x509/x509rset.c +++ b/src/lib/libcrypto/x509/x509rset.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509rset.c,v 1.14 2024/03/25 12:10:57 jsing Exp $ */ | 1 | /* $OpenBSD: x509rset.c,v 1.15 2024/03/26 11:09:37 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -70,6 +70,9 @@ X509_REQ_set_version(X509_REQ *x, long version) | |||
70 | { | 70 | { |
71 | if (x == NULL) | 71 | if (x == NULL) |
72 | return (0); | 72 | return (0); |
73 | /* RFC 2986 section 4.1 only specifies version 1, encoded as a 0. */ | ||
74 | if (version != 0) | ||
75 | return (0); | ||
73 | x->req_info->enc.modified = 1; | 76 | x->req_info->enc.modified = 1; |
74 | return (ASN1_INTEGER_set(x->req_info->version, version)); | 77 | return (ASN1_INTEGER_set(x->req_info->version, version)); |
75 | } | 78 | } |