Sortix volatile manual
This manual documents Sortix volatile, a development build that has not been officially released. You can instead view this document in the latest official manual.
NAME
ASN1_parse_dump, ASN1_parse — parse BER and print information about itSYNOPSIS
#include <openssl/asn1.h>ASN1_parse_dump(BIO *bio, const unsigned char *ber_in, long length, int indent, int dump);
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.- 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:”.
- The nesting depth as a decimal integer. For the first value parsed and printed, this is “d=0”.
- 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).
- 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.
- If the value is primitive, “prim:” is printed; if it is constructed, “cons:”.
-
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, “<ASN1” followed by the decimal tag number and a closing angle bracket.
- V_ASN1_BOOLEAN
- Its integer value is printed as a decimal number.
- V_ASN1_INTEGER
- Decoded with d2i_ASN1_INTEGER(3), printed as a hexadecimal number with an even number of digits.
- V_ASN1_ENUMERATED
- Decoded with d2i_ASN1_ENUMERATED(3), printed as a hexadecimal number with an even number of digits.
- V_ASN1_OBJECT
- Decoded with d2i_ASN1_OBJECT(3), printed with i2a_ASN1_OBJECT(3).
- V_ASN1_OCTET_STRING
-
Decoded with d2i_ASN1_OCTET_STRING(3). If the data consists only of printable ASCII characters, line feeds, carriage returns and horizontal tabs, it is printed as an ASCII string.
- V_ASN1_PRINTABLESTRING
- Printed as an ASCII string. The same applies to V_ASN1_IA5STRING, V_ASN1_T61STRING, V_ASN1_NUMERICSTRING, V_ASN1_VISIBLESTRING, V_ASN1_UTF8STRING, V_ASN1_UTCTIME, and V_ASN1_GENERALIZEDTIME.
- Other tags
- If the dump argument is 0, their data is silently ignored. If dump is non-zero, BIO_dump_indent(3) is used. Unless dump is -1, the data is truncated after dump bytes.