Lines Matching refs:min
37 ASN1_SIMPLE(IPAddressRange, min, ASN1_BIT_STRING),
190 if (!i2r_address(out, afi, 0x00, aor->u.addressRange->min)) in i2r_IPAddressOrRanges()
299 if (!addr_expand(addr_a, a->u.addressRange->min, length, 0x00)) in IPAddressOrRange_cmp()
314 if (!addr_expand(addr_b, b->u.addressRange->min, length, 0x00)) in IPAddressOrRange_cmp()
352 static int range_should_be_prefix(const unsigned char *min, in range_should_be_prefix() argument
363 assert(memcmp(min, max, length) <= 0); in range_should_be_prefix()
365 for (i = 0; i < length && min[i] == max[i]; i++) ; in range_should_be_prefix()
366 for (j = length - 1; j >= 0 && min[j] == 0x00 && max[j] == 0xFF; j--) ; in range_should_be_prefix()
371 mask = min[i] ^ max[i]; in range_should_be_prefix()
397 if ((min[i] & mask) != 0 || (max[i] & mask) != mask) in range_should_be_prefix()
440 unsigned char *min, in make_addressRange() argument
446 if (memcmp(min, max, length) > 0) in make_addressRange()
449 if ((prefixlen = range_should_be_prefix(min, max, length)) >= 0) in make_addressRange()
450 return make_addressPrefix(result, min, prefixlen, length); in make_addressRange()
457 if (aor->u.addressRange->min == NULL && in make_addressRange()
458 (aor->u.addressRange->min = ASN1_BIT_STRING_new()) == NULL) in make_addressRange()
464 for (i = length; i > 0 && min[i - 1] == 0x00; --i) ; in make_addressRange()
465 if (!ASN1_BIT_STRING_set(aor->u.addressRange->min, min, i)) in make_addressRange()
467 ossl_asn1_string_set_bits_left(aor->u.addressRange->min, 0); in make_addressRange()
469 unsigned char b = min[i - 1]; in make_addressRange()
474 aor->u.addressRange->min->flags |= 8 - j; in make_addressRange()
629 unsigned char *min, unsigned char *max) in X509v3_addr_add_range() argument
637 if (!make_addressRange(&aor, min, max, length)) in X509v3_addr_add_range()
649 unsigned char *min, unsigned char *max, int length) in extract_min_max() argument
651 if (aor == NULL || min == NULL || max == NULL) in extract_min_max()
655 return (addr_expand(min, aor->u.addressPrefix, length, 0x00) && in extract_min_max()
658 return (addr_expand(min, aor->u.addressRange->min, length, 0x00) && in extract_min_max()
669 unsigned char *min, in X509v3_addr_get_range() argument
674 if (aor == NULL || min == NULL || max == NULL || in X509v3_addr_get_range()
678 !extract_min_max(aor, min, max, afi_length)) in X509v3_addr_get_range()
954 unsigned char min[ADDR_RAW_BUF_LEN], max[ADDR_RAW_BUF_LEN]; in v2i_IPAddrBlocks() local
1030 if (ossl_a2i_ipadd(min, s) != length) { in v2i_IPAddrBlocks()
1047 if (!X509v3_addr_add_prefix(addr, afi, safi, min, prefixlen)) { in v2i_IPAddrBlocks()
1065 if (memcmp(min, max, length_from_afi(afi)) > 0) { in v2i_IPAddrBlocks()
1070 if (!X509v3_addr_add_range(addr, afi, safi, min, max)) { in v2i_IPAddrBlocks()
1076 if (!X509v3_addr_add_prefix(addr, afi, safi, min, length * 8)) { in v2i_IPAddrBlocks()