|
NAMEASN1_BIT_STRING_set ,
ASN1_BIT_STRING_set_bit ,
ASN1_BIT_STRING_get_bit ,
ASN1_BIT_STRING_check —
ASN.1 BIT STRING accessors
SYNOPSIS#include <openssl/asn1.h>
int
int
int
int
DESCRIPTIONASN1_BIT_STRING_set () sets the length attribute of
bitstr to len and copies that
number of bytes from data into
bitstr, overwriting any previous data, by merely calling
ASN1_STRING_set(3).
This function does no validation whatsoever. In particular, it neither checks
that bitstr is actually of the type
V_ASN1_BIT_STRING nor, even if it is, that the
data and len arguments make sense
for this particular bit string.
If the set argument is non-zero,
If setting a bit is requested beyond the last existing data byte, additional bytes are added to the bitstr as needed. After clearing a bit, any trailing NUL bytes are removed from the bitstr.
(bitstr
& ~goodbits) == 0
The buffer goodbits is expected to contain goodbits_len bytes. RETURN VALUESASN1_BIT_STRING_set () returns 1 on success or 0 if
memory allocation fails or if data is
NULL and len is -1 in the same
call.
SEE ALSOASN1_BIT_STRING_new(3), ASN1_BIT_STRING_num_asc(3), ASN1_STRING_set(3), d2i_ASN1_BIT_STRING(3)HISTORYASN1_BIT_STRING_set () first appeared in SSLeay 0.6.5.
ASN1_BIT_STRING_set_bit () and
ASN1_BIT_STRING_get_bit () first appeared in SSLeay
0.9.0. These functions have been available since OpenBSD
2.4.
Visit the GSP FreeBSD Man Page Interface. |