diff options
| author | tb <> | 2024-03-26 23:21:36 +0000 |
|---|---|---|
| committer | tb <> | 2024-03-26 23:21:36 +0000 |
| commit | 562088acca5714191c5fedc46609150818a2f32b (patch) | |
| tree | c6962e6858ce50981be5baeee41f332c59a217df /src | |
| parent | c17347558c725bc8ce214dd6a590b5e84cbf3e2f (diff) | |
| download | openbsd-562088acca5714191c5fedc46609150818a2f32b.tar.gz openbsd-562088acca5714191c5fedc46609150818a2f32b.tar.bz2 openbsd-562088acca5714191c5fedc46609150818a2f32b.zip | |
Drop superfluous parentheses in X509_set_version()
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/x509/x509_set.c | 10 |
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 | |||
| 83 | X509_set_version(X509 *x, long version) | 83 | X509_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 | } |
| 100 | LCRYPTO_ALIAS(X509_set_version); | 100 | LCRYPTO_ALIAS(X509_set_version); |
| 101 | 101 | ||
