ASN1_BIT_STRING_check

Verify that every set bit in a is allowed by the flags mask.

Synopsis

Declared in <openssl/asn1.h>

int
ASN1_BIT_STRING_check(
    ASN1_BIT_STRING const* a,
    unsigned char const* flags,
    int flags_len);

Return Value

1 if all set bits are allowed (or a is empty), or 0 if any disallowed bit is set.

Parameters

NameDescription
aBit string to check; NULL or empty is treated as valid.
flagsByte mask of permitted bits (1 = allowed).
flags_lenLength of flags in bytes.