ASN1_BUF_PRINT(3)

NAME
ASN1_buf_print - pretty-print a byte array

SYNOPSIS
#include <openssl/asn1.h>
int
ASN1_buf_print(BIO *bio_out, const unsigned char *buf, size_t buflen, int indent);

DESCRIPTION
ASN1_buf_print() prints a hexadecimal representation of the first buflen bytes from buf to bio_out. Despite its name and the header file, this function has nothing to do with ASN.1.

Each byte from buf is represented by two lower-case hexadecimal digits. Fifteen pairs of digits are printed per output line, or at most fifteen on the last output line. Every output line including the last one ends with a newline character. Every pair except the last is followed by a colon (‘’):. If indent is greater than zero, every output line is indented by indent space characters, but not by more than 64 characters.

RETURN VALUES
ASN1_buf_print() returns 1 if successful or 0 if printing fails.

SEE ALSO
ASN1_item_print(3), ASN1_STRING_print_ex(3), ASN1_TIME_print(3), BIO_new(3), BIO_write(3)

HISTORY
ASN1_buf_print() first appeared in OpenSSL 1.1.0 and has been available since OpenBSD 7.3.