summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2024-03-26 23:21:36 +0000
committertb <>2024-03-26 23:21:36 +0000
commit3e1d7cb09e156d378e8f45dce634654ff6f77459 (patch)
treec6962e6858ce50981be5baeee41f332c59a217df
parent74c99ba95f66b7e061244b15b5ef310b6e353b33 (diff)
downloadopenbsd-3e1d7cb09e156d378e8f45dce634654ff6f77459.tar.gz
openbsd-3e1d7cb09e156d378e8f45dce634654ff6f77459.tar.bz2
openbsd-3e1d7cb09e156d378e8f45dce634654ff6f77459.zip
Drop superfluous parentheses in X509_set_version()
-rw-r--r--src/lib/libcrypto/x509/x509_set.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/x509/x509_set.c b/src/lib/libcrypto/x509/x509_set.c
index 4add8cf72d..442bc12827 100644
--- a/src/lib/libcrypto/x509/x509_set.c
+++ b/src/lib/libcrypto/x509/x509_set.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_set.c,v 1.28 2024/03/26 22:44:57 tb Exp $ */ 1/* $OpenBSD: x509_set.c,v 1.29 2024/03/26 23:21:36 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 *
@@ -83,19 +83,19 @@ int
83X509_set_version(X509 *x, long version) 83X509_set_version(X509 *x, long version)
84{ 84{
85 if (x == NULL) 85 if (x == NULL)
86 return (0); 86 return 0;
87 /* 87 /*
88 * RFC 5280, 4.1: versions 1 - 3 are specified as follows. 88 * RFC 5280, 4.1: versions 1 - 3 are specified as follows.
89 * Version ::= INTEGER { v1(0), v2(1), v3(2) } 89 * Version ::= INTEGER { v1(0), v2(1), v3(2) }
90 */ 90 */
91 if (version < 0 || version > 2) 91 if (version < 0 || version > 2)
92 return (0); 92 return 0;
93 if (x->cert_info->version == NULL) { 93 if (x->cert_info->version == NULL) {
94 if ((x->cert_info->version = ASN1_INTEGER_new()) == NULL) 94 if ((x->cert_info->version = ASN1_INTEGER_new()) == NULL)
95 return (0); 95 return 0;
96 } 96 }
97 x->cert_info->enc.modified = 1; 97 x->cert_info->enc.modified = 1;
98 return (ASN1_INTEGER_set(x->cert_info->version, version)); 98 return ASN1_INTEGER_set(x->cert_info->version, version);
99} 99}
100LCRYPTO_ALIAS(X509_set_version); 100LCRYPTO_ALIAS(X509_set_version);
101 101