diff options
author | tb <> | 2022-01-05 17:41:41 +0000 |
---|---|---|
committer | tb <> | 2022-01-05 17:41:41 +0000 |
commit | a9a475a5b32b3cedcb67f102218951f52d6e928a (patch) | |
tree | 5f7e15d8b9fec2b2d1e228adaa1614300e58c116 /src/lib | |
parent | 183e619866f2e807250eb61e036b064f730adb2f (diff) | |
download | openbsd-a9a475a5b32b3cedcb67f102218951f52d6e928a.tar.gz openbsd-a9a475a5b32b3cedcb67f102218951f52d6e928a.tar.bz2 openbsd-a9a475a5b32b3cedcb67f102218951f52d6e928a.zip |
Now that i is free, rename j to i for use as loop variable in
various loops in addr_validate_path_internal().
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/x509/x509_addr.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/libcrypto/x509/x509_addr.c b/src/lib/libcrypto/x509/x509_addr.c index 056fa866b5..71f32f878c 100644 --- a/src/lib/libcrypto/x509/x509_addr.c +++ b/src/lib/libcrypto/x509/x509_addr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_addr.c,v 1.65 2022/01/05 17:38:14 tb Exp $ */ | 1 | /* $OpenBSD: x509_addr.c,v 1.66 2022/01/05 17:41:41 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Contributed to the OpenSSL Project by the American Registry for | 3 | * Contributed to the OpenSSL Project by the American Registry for |
4 | * Internet Numbers ("ARIN"). | 4 | * Internet Numbers ("ARIN"). |
@@ -1749,7 +1749,7 @@ addr_validate_path_internal(X509_STORE_CTX *ctx, STACK_OF(X509) *chain, | |||
1749 | IPAddressOrRanges *aorc, *aorp; | 1749 | IPAddressOrRanges *aorc, *aorp; |
1750 | X509 *x = NULL; | 1750 | X509 *x = NULL; |
1751 | int depth = -1; | 1751 | int depth = -1; |
1752 | int j, k; | 1752 | int i, k; |
1753 | unsigned int length; | 1753 | unsigned int length; |
1754 | int ret = 1; | 1754 | int ret = 1; |
1755 | 1755 | ||
@@ -1798,8 +1798,8 @@ addr_validate_path_internal(X509_STORE_CTX *ctx, STACK_OF(X509) *chain, | |||
1798 | x = sk_X509_value(chain, depth); | 1798 | x = sk_X509_value(chain, depth); |
1799 | 1799 | ||
1800 | if ((parent = x->rfc3779_addr) == NULL) { | 1800 | if ((parent = x->rfc3779_addr) == NULL) { |
1801 | for (j = 0; j < sk_IPAddressFamily_num(child); j++) { | 1801 | for (i = 0; i < sk_IPAddressFamily_num(child); i++) { |
1802 | fc = sk_IPAddressFamily_value(child, j); | 1802 | fc = sk_IPAddressFamily_value(child, i); |
1803 | 1803 | ||
1804 | if (IPAddressFamily_inheritance(fc) != NULL) | 1804 | if (IPAddressFamily_inheritance(fc) != NULL) |
1805 | continue; | 1805 | continue; |
@@ -1826,8 +1826,8 @@ addr_validate_path_internal(X509_STORE_CTX *ctx, STACK_OF(X509) *chain, | |||
1826 | * covering it, so the next iteration will check that the | 1826 | * covering it, so the next iteration will check that the |
1827 | * parent's resources are covered by the grandparent. | 1827 | * parent's resources are covered by the grandparent. |
1828 | */ | 1828 | */ |
1829 | for (j = 0; j < sk_IPAddressFamily_num(child); j++) { | 1829 | for (i = 0; i < sk_IPAddressFamily_num(child); i++) { |
1830 | fc = sk_IPAddressFamily_value(child, j); | 1830 | fc = sk_IPAddressFamily_value(child, i); |
1831 | 1831 | ||
1832 | k = sk_IPAddressFamily_find(parent, fc); | 1832 | k = sk_IPAddressFamily_find(parent, fc); |
1833 | fp = sk_IPAddressFamily_value(parent, k); | 1833 | fp = sk_IPAddressFamily_value(parent, k); |
@@ -1853,7 +1853,7 @@ addr_validate_path_internal(X509_STORE_CTX *ctx, STACK_OF(X509) *chain, | |||
1853 | 1853 | ||
1854 | /* Child inherits. Use parent's address family. */ | 1854 | /* Child inherits. Use parent's address family. */ |
1855 | if (IPAddressFamily_inheritance(fc) != NULL) { | 1855 | if (IPAddressFamily_inheritance(fc) != NULL) { |
1856 | sk_IPAddressFamily_set(child, j, fp); | 1856 | sk_IPAddressFamily_set(child, i, fp); |
1857 | continue; | 1857 | continue; |
1858 | } | 1858 | } |
1859 | 1859 | ||
@@ -1873,7 +1873,7 @@ addr_validate_path_internal(X509_STORE_CTX *ctx, STACK_OF(X509) *chain, | |||
1873 | 1873 | ||
1874 | /* Now check containment and replace or error. */ | 1874 | /* Now check containment and replace or error. */ |
1875 | if (addr_contains(aorp, aorc, length)) { | 1875 | if (addr_contains(aorp, aorc, length)) { |
1876 | sk_IPAddressFamily_set(child, j, fp); | 1876 | sk_IPAddressFamily_set(child, i, fp); |
1877 | continue; | 1877 | continue; |
1878 | } | 1878 | } |
1879 | 1879 | ||
@@ -1887,8 +1887,8 @@ addr_validate_path_internal(X509_STORE_CTX *ctx, STACK_OF(X509) *chain, | |||
1887 | * Trust anchor can't inherit. | 1887 | * Trust anchor can't inherit. |
1888 | */ | 1888 | */ |
1889 | if ((parent = x->rfc3779_addr) != NULL) { | 1889 | if ((parent = x->rfc3779_addr) != NULL) { |
1890 | for (j = 0; j < sk_IPAddressFamily_num(parent); j++) { | 1890 | for (i = 0; i < sk_IPAddressFamily_num(parent); i++) { |
1891 | fp = sk_IPAddressFamily_value(parent, j); | 1891 | fp = sk_IPAddressFamily_value(parent, i); |
1892 | 1892 | ||
1893 | if (IPAddressFamily_inheritance(fp) == NULL) | 1893 | if (IPAddressFamily_inheritance(fp) == NULL) |
1894 | continue; | 1894 | continue; |