ASN1_STRING_TABLE_GET(3)
π ASN1_STRING_TABLE_get β retrieve an entry from the global ASN.1 string table
okay so bestie, welcome to the ASN1_STRING_TABLE_GET(3) page from the Library Functions Manual β it's literally all about grabbing one little entry out of the global ASN.1 string table, and I'm obsessed β¨
πΈ NAME πΈ
ASN1_STRING_TABLE_get β retrieve an entry from the global ASN.1 string table
β¨ SYNOPSIS β¨
here's the whole "how do I even call this" situation, no cap:
library βlibcryptoβ #include <openssl/asn1.h>
ASN1_STRING_TABLE *
ASN1_STRING_TABLE_get(int nid);
π¦ DESCRIPTION π¦
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, bestie:
NID_commonNameβ maxsize64, symbolic constantub_common_nameNID_countryNameβ maxsize2, symbolic constantβNID_givenNameβ maxsize32768, symbolic constantub_nameNID_initialsβ maxsize32768, symbolic constantub_nameNID_localityNameβ maxsize128, symbolic constantub_locality_nameNID_nameβ maxsize32768, symbolic constantub_nameNID_organizationNameβ maxsize64, symbolic constantub_organization_nameNID_organizationalUnitNameβ maxsize64, symbolic constantub_organization_unit_nameNID_pkcs9_emailAddressβ maxsize128, symbolic constantub_email_addressNID_serialNumberβ maxsize64, symbolic constantub_serial_numberNID_stateOrProvinceNameβ maxsize128, symbolic constantub_state_nameNID_surnameβ maxsize32768, symbolic constantub_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. that's it, bestie β either a whole struct or absolutely nothing π
π₯ SEE ALSO π₯
go read these next, iykyk π§
π HISTORY π
ASN1_STRING_TABLE_get() first appeared in OpenSSL 0.9.5 and has been available since OpenBSD 2.7. iconic behavior honestly π
π BUGS π
Most aspects of the semantics considerably differ from OpenSSL. π«
ub_email_address, which should really be called ub_emailaddress_length, was changed in RFC 5280 from 128 to 255 to match PKCS#9 (RFC 2985). not me side-eyeing that naming choice π
mwah π β brought to you by Debian, dated December 31, 2025, for ASN1_STRING_TABLE_GET(3) π«Ά
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2017, 2021 Ingo Schwarze <schwarze@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms