Lines Matching refs:aor
177 const IPAddressOrRange *aor = sk_IPAddressOrRange_value(aors, i); in i2r_IPAddressOrRanges() local
179 switch (aor->type) { in i2r_IPAddressOrRanges()
181 if (!i2r_address(out, afi, 0x00, aor->u.addressPrefix)) in i2r_IPAddressOrRanges()
183 BIO_printf(out, "/%d\n", addr_prefixlen(aor->u.addressPrefix)); in i2r_IPAddressOrRanges()
186 if (!i2r_address(out, afi, 0x00, aor->u.addressRange->min)) in i2r_IPAddressOrRanges()
189 if (!i2r_address(out, afi, 0xFF, aor->u.addressRange->max)) in i2r_IPAddressOrRanges()
400 IPAddressOrRange *aor = IPAddressOrRange_new(); in make_addressPrefix() local
404 if (aor == NULL) in make_addressPrefix()
406 aor->type = IPAddressOrRange_addressPrefix; in make_addressPrefix()
407 if (aor->u.addressPrefix == NULL && in make_addressPrefix()
408 (aor->u.addressPrefix = ASN1_BIT_STRING_new()) == NULL) in make_addressPrefix()
410 if (!ASN1_BIT_STRING_set(aor->u.addressPrefix, addr, bytelen)) in make_addressPrefix()
412 aor->u.addressPrefix->flags &= ~7; in make_addressPrefix()
413 aor->u.addressPrefix->flags |= ASN1_STRING_FLAG_BITS_LEFT; in make_addressPrefix()
415 aor->u.addressPrefix->data[bytelen - 1] &= ~(0xFF >> bitlen); in make_addressPrefix()
416 aor->u.addressPrefix->flags |= 8 - bitlen; in make_addressPrefix()
419 *result = aor; in make_addressPrefix()
423 IPAddressOrRange_free(aor); in make_addressPrefix()
436 IPAddressOrRange *aor; in make_addressRange() local
445 if ((aor = IPAddressOrRange_new()) == NULL) in make_addressRange()
447 aor->type = IPAddressOrRange_addressRange; in make_addressRange()
448 if ((aor->u.addressRange = IPAddressRange_new()) == NULL) in make_addressRange()
450 if (aor->u.addressRange->min == NULL && in make_addressRange()
451 (aor->u.addressRange->min = ASN1_BIT_STRING_new()) == NULL) in make_addressRange()
453 if (aor->u.addressRange->max == NULL && in make_addressRange()
454 (aor->u.addressRange->max = ASN1_BIT_STRING_new()) == NULL) in make_addressRange()
458 if (!ASN1_BIT_STRING_set(aor->u.addressRange->min, min, i)) in make_addressRange()
460 aor->u.addressRange->min->flags &= ~7; in make_addressRange()
461 aor->u.addressRange->min->flags |= ASN1_STRING_FLAG_BITS_LEFT; in make_addressRange()
467 aor->u.addressRange->min->flags |= 8 - j; in make_addressRange()
471 if (!ASN1_BIT_STRING_set(aor->u.addressRange->max, max, i)) in make_addressRange()
473 aor->u.addressRange->max->flags &= ~7; in make_addressRange()
474 aor->u.addressRange->max->flags |= ASN1_STRING_FLAG_BITS_LEFT; in make_addressRange()
480 aor->u.addressRange->max->flags |= 8 - j; in make_addressRange()
483 *result = aor; in make_addressRange()
487 IPAddressOrRange_free(aor); in make_addressRange()
604 IPAddressOrRange *aor; in X509v3_addr_add_prefix() local
607 || !make_addressPrefix(&aor, a, prefixlen, length_from_afi(afi))) in X509v3_addr_add_prefix()
609 if (sk_IPAddressOrRange_push(aors, aor)) in X509v3_addr_add_prefix()
611 IPAddressOrRange_free(aor); in X509v3_addr_add_prefix()
624 IPAddressOrRange *aor; in X509v3_addr_add_range() local
628 if (!make_addressRange(&aor, min, max, length)) in X509v3_addr_add_range()
630 if (sk_IPAddressOrRange_push(aors, aor)) in X509v3_addr_add_range()
632 IPAddressOrRange_free(aor); in X509v3_addr_add_range()
639 static int extract_min_max(IPAddressOrRange *aor, in extract_min_max() argument
642 if (aor == NULL || min == NULL || max == NULL) in extract_min_max()
644 switch (aor->type) { in extract_min_max()
646 return (addr_expand(min, aor->u.addressPrefix, length, 0x00) && in extract_min_max()
647 addr_expand(max, aor->u.addressPrefix, length, 0xFF)); in extract_min_max()
649 return (addr_expand(min, aor->u.addressRange->min, length, 0x00) && in extract_min_max()
650 addr_expand(max, aor->u.addressRange->max, length, 0xFF)); in extract_min_max()
658 int X509v3_addr_get_range(IPAddressOrRange *aor, in X509v3_addr_get_range() argument
664 if (aor == NULL || min == NULL || max == NULL || in X509v3_addr_get_range()
666 (aor->type != IPAddressOrRange_addressPrefix && in X509v3_addr_get_range()
667 aor->type != IPAddressOrRange_addressRange) || in X509v3_addr_get_range()
668 !extract_min_max(aor, min, max, afi_length)) in X509v3_addr_get_range()