ASN1_PARSE_DUMP(3) Library Functions Manual ASN1_PARSE_DUMP(3) NAME ASN1_parse_dump, ASN1_parse - parse BER and print information about it SYNOPSIS #include int ASN1_parse_dump(BIO *bio, const unsigned char *ber_in, long length, int indent, int dump); int ASN1_parse(BIO *bio, const unsigned char *ber_in, long length, int indent); DESCRIPTION ASN1_parse_dump() parses BER-encoded values and prints information about them to bio. On function entry, *ber_in is expected to point to the first identifier octet of an encoded value. At most length bytes are inspected. For each value successfully parsed, the following information is printed: 1. The index of its first identifier octet relative to ber_in as a decimal number followed by a colon. For the first value parsed and printed, this is "0:". 2. The nesting depth as a decimal integer. For the first value parsed and printed, this is "d=0". 3. The header length in bytes, including the identifier octets and the length octets, as a decimal integer. For example, for a boolean value, this is "hl=2" because the encoding of a boolean value contains one identifier octet (0x01) and one length octet (also 0x01, because one content octet follows after the header). 4. If the value is encoded using the definite form for the length octets, the number encoded in the length octets as a decimal integer. This is the number of content octets that follow. For example, for a boolean value, this is "l=1". If the value is encoded using a length octet indicating the indefinite form, "l=inf" is printed instead. 5. If the value is primitive, "prim:" is printed; if it is constructed, "cons:". 6. The next field depends on the class of the tag: V_ASN1_PRIVATE "priv" followed by the decimal tag number in square brackets V_ASN1_CONTEXT_SPECIFIC "cont" followed by the decimal tag number in square brackets V_ASN1_APPLICATION "appl" followed by the decimal tag number in square brackets V_ASN1_UNIVERSAL If the tag number is 30 or less, the return value from ASN1_tag2str(3) is printed; otherwise, "