Convert multibyte input into an ASN.1 string, choosing a type allowed by mask.
Declared in <openssl/asn1.h>
int
ASN1_mbstring_copy(
ASN1_STRING** out,
unsigned char const* in,
int len,
int inform,
unsigned long mask);
Positive ASN.1 string type on success, or a negative value on error.
| Name | Description |
|---|---|
| out | Destination; if NULL a new string is allocated, otherwise *out may be reused. |
| in | Input bytes in the encoding given by inform. |
| len | Length of in in bytes, or -1 if in is NUL-terminated. |
| inform | Input encoding (MBSTRING_ASC, MBSTRING_BMP, MBSTRING_UNIV, or MBSTRING_UTF8). |
| mask | B_ASN1_* bitmask of permitted output string types (0 selects the default mask). |