OPENSSL_uni2asc

Convert a PKCS#12 BMPString (big-endian UTF-16 with zero high bytes) to a C string.

Synopsis

Declared in <openssl/pkcs12.h>

char*
OPENSSL_uni2asc(
    unsigned char const* uni,
    int unilen);

Return Value

Newly allocated NUL-terminated string of the low bytes, or NULL on error. Caller frees with OPENSSL_free().

Parameters

NameDescription
uniBMPString octets (even length).
unilenLength of uni in bytes.