diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2022-01-05 17:55:34 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2022-01-05 17:55:34 +0000 |
commit | 53a938724ccb6eff5d5702a8e8064e9480cd7fa5 (patch) | |
tree | bfcd0e94992603b11be55b82bfc90409ca22e1f8 | |
parent | edd8a89d22c994aa82e421a5e097e7940df10c82 (diff) |
Rename {c,p}_{min,max} into {child,parent}_{min,max}
-rw-r--r-- | lib/libcrypto/x509/x509_addr.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/libcrypto/x509/x509_addr.c b/lib/libcrypto/x509/x509_addr.c index 2a102e13ac6..a9e10bff3ba 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.73 2022/01/05 17:53:42 tb Exp $ */ +/* $OpenBSD: x509_addr.c,v 1.74 2022/01/05 17:55:33 tb Exp $ */ /* * Contributed to the OpenSSL Project by the American Registry for * Internet Numbers ("ARIN"). @@ -1657,8 +1657,8 @@ static int addr_contains(IPAddressOrRanges *parent, IPAddressOrRanges *child, int length) { IPAddressOrRange *child_aor, *parent_aor; - unsigned char p_min[ADDR_RAW_BUF_LEN], p_max[ADDR_RAW_BUF_LEN]; - unsigned char c_min[ADDR_RAW_BUF_LEN], c_max[ADDR_RAW_BUF_LEN]; + uint8_t parent_min[ADDR_RAW_BUF_LEN], parent_max[ADDR_RAW_BUF_LEN]; + uint8_t child_min[ADDR_RAW_BUF_LEN], child_max[ADDR_RAW_BUF_LEN]; int p, c; if (child == NULL || parent == child) @@ -1670,7 +1670,7 @@ addr_contains(IPAddressOrRanges *parent, IPAddressOrRanges *child, int length) for (c = 0; c < sk_IPAddressOrRange_num(child); c++) { child_aor = sk_IPAddressOrRange_value(child, c); - if (!extract_min_max(child_aor, c_min, c_max, length)) + if (!extract_min_max(child_aor, child_min, child_max, length)) return 0; for (;; p++) { @@ -1679,12 +1679,13 @@ addr_contains(IPAddressOrRanges *parent, IPAddressOrRanges *child, int length) parent_aor = sk_IPAddressOrRange_value(parent, p); - if (!extract_min_max(parent_aor, p_min, p_max, length)) + if (!extract_min_max(parent_aor, parent_min, parent_max, + length)) return 0; - if (memcmp(p_max, c_max, length) < 0) + if (memcmp(parent_max, child_max, length) < 0) continue; - if (memcmp(p_min, c_min, length) > 0) + if (memcmp(parent_min, child_min, length) > 0) return 0; break; } |