Lines Matching refs:addr
146 static int check_addr(IPAddrBlocks *addr, int type) in check_addr() argument
151 if (!TEST_int_eq(sk_IPAddressFamily_num(addr), 1)) in check_addr()
154 fam = sk_IPAddressFamily_value(addr, 0); in check_addr()
176 IPAddrBlocks *addr = NULL; in test_addr_ranges() local
182 addr = sk_IPAddressFamily_new_null(); in test_addr_ranges()
183 if (!TEST_ptr(addr)) in test_addr_ranges()
189 if (!TEST_true(X509v3_addr_canonize(addr))) in test_addr_ranges()
205 if (!TEST_true(X509v3_addr_add_range(addr, ranges[i].afi, NULL, ip1->data, ip2->data))) in test_addr_ranges()
208 if (!TEST_true(X509v3_addr_is_canonical(addr))) in test_addr_ranges()
211 if (!check_addr(addr, ranges[i].rorp)) in test_addr_ranges()
214 sk_IPAddressFamily_pop_free(addr, IPAddressFamily_free); in test_addr_ranges()
215 addr = NULL; in test_addr_ranges()
223 sk_IPAddressFamily_pop_free(addr, IPAddressFamily_free); in test_addr_ranges()
232 IPAddrBlocks *addr = NULL; in test_addr_fam_len() local
240 addr = sk_IPAddressFamily_new_null(); in test_addr_fam_len()
241 if (!TEST_ptr(addr)) in test_addr_fam_len()
249 if (!TEST_true(X509v3_addr_add_range(addr, ranges[0].afi, NULL, ip1->data, ip2->data))) in test_addr_fam_len()
251 if (!TEST_true(X509v3_addr_is_canonical(addr))) in test_addr_fam_len()
274 if (!sk_IPAddressFamily_push(addr, f1)) in test_addr_fam_len()
279 if (!TEST_false(X509v3_addr_canonize(addr))) in test_addr_fam_len()
283 IPAddressFamily_free(sk_IPAddressFamily_pop(addr)); in test_addr_fam_len()
305 if (!sk_IPAddressFamily_push(addr, f1)) in test_addr_fam_len()
310 if (!TEST_true(X509v3_addr_canonize(addr))) in test_addr_fam_len()
317 sk_IPAddressFamily_pop_free(addr, IPAddressFamily_free); in test_addr_fam_len()
427 IPAddrBlocks *addr[3] = { NULL, NULL }; in test_addr_subset() local
430 int sz = OSSL_NELEM(addr); in test_addr_subset()
434 if (!TEST_ptr(addr[i] = sk_IPAddressFamily_new_null()) in test_addr_subset()
437 || !TEST_true(X509v3_addr_add_range(addr[i], ranges[i].afi, NULL, in test_addr_subset()
444 && TEST_true(X509v3_addr_subset(NULL, addr[0])) in test_addr_subset()
445 && TEST_true(X509v3_addr_subset(addrEmpty, addr[0])) in test_addr_subset()
446 && TEST_true(X509v3_addr_subset(addr[0], addr[0])) in test_addr_subset()
447 && TEST_true(X509v3_addr_subset(addr[0], addr[1])) in test_addr_subset()
448 && TEST_true(X509v3_addr_subset(addr[0], addr[2])) in test_addr_subset()
449 && TEST_true(X509v3_addr_subset(addr[1], addr[2])) in test_addr_subset()
450 && TEST_false(X509v3_addr_subset(addr[0], NULL)) in test_addr_subset()
451 && TEST_false(X509v3_addr_subset(addr[1], addr[0])) in test_addr_subset()
452 && TEST_false(X509v3_addr_subset(addr[2], addr[1])) in test_addr_subset()
453 && TEST_false(X509v3_addr_subset(addr[0], addrEmpty)); in test_addr_subset()
457 sk_IPAddressFamily_pop_free(addr[i], IPAddressFamily_free); in test_addr_subset()