summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2022-01-05 17:41:42 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2022-01-05 17:41:42 +0000
commitefc42419b6621a2f8e6d2b071088dce03b9123f7 (patch)
tree7860866703d8ccb55c4b818fc18ee36a6ef32447
parentaef7ab66fc8d3cfb0d89a67594306d10dbd1df57 (diff)
Now that i is free, rename j to i for use as loop variable in
various loops in addr_validate_path_internal().
-rw-r--r--lib/libcrypto/x509/x509_addr.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/libcrypto/x509/x509_addr.c b/lib/libcrypto/x509/x509_addr.c
index 056fa866b54..71f32f878c5 100644
--- a/lib/libcrypto/x509/x509_addr.c
+++ b/lib/libcrypto/x509/x509_addr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509_addr.c,v 1.65 2022/01/05 17:38:14 tb Exp $ */
+/* $OpenBSD: x509_addr.c,v 1.66 2022/01/05 17:41:41 tb Exp $ */
/*
* Contributed to the OpenSSL Project by the American Registry for
* Internet Numbers ("ARIN").
@@ -1749,7 +1749,7 @@ addr_validate_path_internal(X509_STORE_CTX *ctx, STACK_OF(X509) *chain,
IPAddressOrRanges *aorc, *aorp;
X509 *x = NULL;
int depth = -1;
- int j, k;
+ int i, k;
unsigned int length;
int ret = 1;
@@ -1798,8 +1798,8 @@ addr_validate_path_internal(X509_STORE_CTX *ctx, STACK_OF(X509) *chain,
x = sk_X509_value(chain, depth);
if ((parent = x->rfc3779_addr) == NULL) {
- for (j = 0; j < sk_IPAddressFamily_num(child); j++) {
- fc = sk_IPAddressFamily_value(child, j);
+ for (i = 0; i < sk_IPAddressFamily_num(child); i++) {
+ fc = sk_IPAddressFamily_value(child, i);
if (IPAddressFamily_inheritance(fc) != NULL)
continue;
@@ -1826,8 +1826,8 @@ addr_validate_path_internal(X509_STORE_CTX *ctx, STACK_OF(X509) *chain,
* covering it, so the next iteration will check that the
* parent's resources are covered by the grandparent.
*/
- for (j = 0; j < sk_IPAddressFamily_num(child); j++) {
- fc = sk_IPAddressFamily_value(child, j);
+ for (i = 0; i < sk_IPAddressFamily_num(child); i++) {
+ fc = sk_IPAddressFamily_value(child, i);
k = sk_IPAddressFamily_find(parent, fc);
fp = sk_IPAddressFamily_value(parent, k);
@@ -1853,7 +1853,7 @@ addr_validate_path_internal(X509_STORE_CTX *ctx, STACK_OF(X509) *chain,
/* Child inherits. Use parent's address family. */
if (IPAddressFamily_inheritance(fc) != NULL) {
- sk_IPAddressFamily_set(child, j, fp);
+ sk_IPAddressFamily_set(child, i, fp);
continue;
}
@@ -1873,7 +1873,7 @@ addr_validate_path_internal(X509_STORE_CTX *ctx, STACK_OF(X509) *chain,
/* Now check containment and replace or error. */
if (addr_contains(aorp, aorc, length)) {
- sk_IPAddressFamily_set(child, j, fp);
+ sk_IPAddressFamily_set(child, i, fp);
continue;
}
@@ -1887,8 +1887,8 @@ addr_validate_path_internal(X509_STORE_CTX *ctx, STACK_OF(X509) *chain,
* Trust anchor can't inherit.
*/
if ((parent = x->rfc3779_addr) != NULL) {
- for (j = 0; j < sk_IPAddressFamily_num(parent); j++) {
- fp = sk_IPAddressFamily_value(parent, j);
+ for (i = 0; i < sk_IPAddressFamily_num(parent); i++) {
+ fp = sk_IPAddressFamily_value(parent, i);
if (IPAddressFamily_inheritance(fp) == NULL)
continue;