libressl-ASN1_STRING_TABLE_get3
Retrieve an entry from the global asn.1 string table
Usage
Crypto Library (libcrypto, -lcrypto)
#include <openssl/asn1.h>
ASN1_STRING_TABLE *
ASN1_STRING_TABLE_get(int nid);
Overview
The ASN.1 string table is a unique global object. Each entry is of the type ASN1_STRING_TABLE and contains information about one NID object. The entries are predefined according to RFC 5280 appendix A.1.
The upper bounds for the number of characters in various kinds of ASN1_STRING objects are:
| object type | maxsize | symbolic constant |
| NID_commonName | 64 | ub_common_name |
| NID_countryName | 2 | — |
| NID_givenName | 32768 | ub_name |
| NID_initials | 32768 | ub_name |
| NID_localityName | 128 | ub_locality_name |
| NID_name | 32768 | ub_name |
| NID_organizationName | 64 | ub_organization_name |
| NID_organizationalUnitName | 64 | ub_organization_unit_name |
| NID_pkcs9_emailAddress | 128 | ub_email_address |
| NID_serialNumber | 64 | ub_serial_number |
| NID_stateOrProvinceName | 128 | ub_state_name |
| NID_surname | 32768 | ub_name |
The function ASN1_STRING_TABLE_get() retrieves the entry for nid. If the STABLE_NO_MASK flag is set, ASN1_STRING_set_by_NID(3) skips applying the global mask that can be set with ASN1_STRING_set_default_mask(3).
Return values
ASN1_STRING_TABLE_get() returns a valid ASN1_STRING_TABLE structure or NULL if nothing is found.