ASN1_PRINTABLE_TYPE(3)
π ASN1_PRINTABLE_TYPE(3) π
Okay bestie, welcome to the Library Functions Manual β¨ β today's main character is ASN1_PRINTABLE_type(), and she's here to classify a single-byte character string. No cap, that's the whole vibe. π¦
πΈ NAME πΈ
ASN1_PRINTABLE_type β classify a single-byte character string π
β¨ SYNOPSIS β¨
#include <openssl/asn1.h>
int
ASN1_PRINTABLE_type(const unsigned char *string, int len);
π DESCRIPTION π
So ASN1_PRINTABLE_type() is gonna assume the string you hand it is made of single-byte characters, and then it sorts it into a category based on which kinds of characters are actually in there. π
If len is greater than 0, it inspects at most len characters, periodt. Otherwise, the string needs to be NUL-terminated β that's the rule, bestie. β
π RETURN VALUES π
- If the given string contains a character outside the
ascii(7)range,ASN1_PRINTABLE_type()returnsV_ASN1_T61STRING. π - Otherwise, if it contains a character that is neither a letter nor a digit nor the space character (ASCII
0x20) nor the apostrophe quote (', ASCII0x27) nor contained in the set"()+,-./:=?", it returnsV_ASN1_IA5STRING. π₯ - Otherwise β including if
stringis aNULLpointer or points to an empty string β it returnsV_ASN1_PRINTABLESTRING. π
π¦ SEE ALSO π¦
π HISTORY π
ASN1_PRINTABLE_type() first appeared in SSLeay 0.4.5d, has been part of the public API since SSLeay 0.5.1, and has been available since OpenBSD 2.4. Iconic lineage, honestly. π
β οΈ CAVEATS β οΈ
The ASN.1 notion of what constitutes a PrintableString is more restrictive than what the C library function isprint(3) considers printable. So yeah β ASN.1 is pickier, no cap. π
okay bye bestie β this page is the Debian version, dated November 15, 2021, for ASN1_PRINTABLE_TYPE(3) π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: libressl-devel-doc 4.1.0-bp160.1.1 Β· OpenSSL
- Copyright (c) 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