diff options
author | tb <> | 2024-05-23 01:56:14 +0000 |
---|---|---|
committer | tb <> | 2024-05-23 01:56:14 +0000 |
commit | c79b211b5c6d3dc021d69ed5c0d1c62c2134b466 (patch) | |
tree | ab34b6da0b00db2509096c9ac1ca2b24837a7ffb /src | |
parent | 7cc050a2a40b82e871b17b59b54df4a834415194 (diff) | |
download | openbsd-c79b211b5c6d3dc021d69ed5c0d1c62c2134b466.tar.gz openbsd-c79b211b5c6d3dc021d69ed5c0d1c62c2134b466.tar.bz2 openbsd-c79b211b5c6d3dc021d69ed5c0d1c62c2134b466.zip |
x509_v3.c: consistently call STACK_OF(X509_EXTENSIONS) arguments sk
(where it doesn't conflict with a local variable)
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/x509/x509_v3.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/libcrypto/x509/x509_v3.c b/src/lib/libcrypto/x509/x509_v3.c index 12d416eec0..772f9ad596 100644 --- a/src/lib/libcrypto/x509/x509_v3.c +++ b/src/lib/libcrypto/x509/x509_v3.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_v3.c,v 1.27 2024/05/23 01:52:05 tb Exp $ */ | 1 | /* $OpenBSD: x509_v3.c,v 1.28 2024/05/23 01:56:14 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 | * |
@@ -69,24 +69,24 @@ | |||
69 | #include "x509_local.h" | 69 | #include "x509_local.h" |
70 | 70 | ||
71 | int | 71 | int |
72 | X509v3_get_ext_count(const STACK_OF(X509_EXTENSION) *x) | 72 | X509v3_get_ext_count(const STACK_OF(X509_EXTENSION) *sk) |
73 | { | 73 | { |
74 | if (x == NULL) | 74 | if (sk == NULL) |
75 | return 0; | 75 | return 0; |
76 | 76 | ||
77 | return sk_X509_EXTENSION_num(x); | 77 | return sk_X509_EXTENSION_num(sk); |
78 | } | 78 | } |
79 | LCRYPTO_ALIAS(X509v3_get_ext_count); | 79 | LCRYPTO_ALIAS(X509v3_get_ext_count); |
80 | 80 | ||
81 | int | 81 | int |
82 | X509v3_get_ext_by_NID(const STACK_OF(X509_EXTENSION) *x, int nid, int lastpos) | 82 | X509v3_get_ext_by_NID(const STACK_OF(X509_EXTENSION) *sk, int nid, int lastpos) |
83 | { | 83 | { |
84 | const ASN1_OBJECT *obj; | 84 | const ASN1_OBJECT *obj; |
85 | 85 | ||
86 | if ((obj = OBJ_nid2obj(nid)) == NULL) | 86 | if ((obj = OBJ_nid2obj(nid)) == NULL) |
87 | return -2; | 87 | return -2; |
88 | 88 | ||
89 | return X509v3_get_ext_by_OBJ(x, obj, lastpos); | 89 | return X509v3_get_ext_by_OBJ(sk, obj, lastpos); |
90 | } | 90 | } |
91 | LCRYPTO_ALIAS(X509v3_get_ext_by_NID); | 91 | LCRYPTO_ALIAS(X509v3_get_ext_by_NID); |
92 | 92 | ||
@@ -136,22 +136,22 @@ X509v3_get_ext_by_critical(const STACK_OF(X509_EXTENSION) *sk, int crit, | |||
136 | LCRYPTO_ALIAS(X509v3_get_ext_by_critical); | 136 | LCRYPTO_ALIAS(X509v3_get_ext_by_critical); |
137 | 137 | ||
138 | X509_EXTENSION * | 138 | X509_EXTENSION * |
139 | X509v3_get_ext(const STACK_OF(X509_EXTENSION) *x, int loc) | 139 | X509v3_get_ext(const STACK_OF(X509_EXTENSION) *sk, int loc) |
140 | { | 140 | { |
141 | if (x == NULL || sk_X509_EXTENSION_num(x) <= loc || loc < 0) | 141 | if (sk == NULL || sk_X509_EXTENSION_num(sk) <= loc || loc < 0) |
142 | return NULL; | 142 | return NULL; |
143 | else | 143 | else |
144 | return sk_X509_EXTENSION_value(x, loc); | 144 | return sk_X509_EXTENSION_value(sk, loc); |
145 | } | 145 | } |
146 | LCRYPTO_ALIAS(X509v3_get_ext); | 146 | LCRYPTO_ALIAS(X509v3_get_ext); |
147 | 147 | ||
148 | X509_EXTENSION * | 148 | X509_EXTENSION * |
149 | X509v3_delete_ext(STACK_OF(X509_EXTENSION) *x, int loc) | 149 | X509v3_delete_ext(STACK_OF(X509_EXTENSION) *sk, int loc) |
150 | { | 150 | { |
151 | if (x == NULL || sk_X509_EXTENSION_num(x) <= loc || loc < 0) | 151 | if (sk == NULL || sk_X509_EXTENSION_num(sk) <= loc || loc < 0) |
152 | return NULL; | 152 | return NULL; |
153 | 153 | ||
154 | return sk_X509_EXTENSION_delete(x, loc); | 154 | return sk_X509_EXTENSION_delete(sk, loc); |
155 | } | 155 | } |
156 | LCRYPTO_ALIAS(X509v3_delete_ext); | 156 | LCRYPTO_ALIAS(X509v3_delete_ext); |
157 | 157 | ||