GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
ASN1_PRINTABLE_TYPE(3) FreeBSD Library Functions Manual ASN1_PRINTABLE_TYPE(3)

ASN1_PRINTABLE_type
classify a single-byte character string

#include <openssl/asn1.h>

int
ASN1_PRINTABLE_type(const unsigned char *string, int len);

ASN1_PRINTABLE_type() assumes that the given string consists of single-byte characters and classifies it according to which kinds characters occur. If len is greater than 0, at most len characters are inspected. Otherwise, the string needs to be NUL-terminated.

If the given string contains a character outside the ascii(7) range, ASN1_PRINTABLE_type() returns V_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 (‘'’, ASCII 0x27) nor contained in the set “()+,-./:=?”, it returns V_ASN1_IA5STRING.

Otherwise, including if string is a NULL pointer or points to an empty string, it returns V_ASN1_PRINTABLESTRING.

ASN1_mbstring_copy(3), ASN1_STRING_new(3), ASN1_STRING_to_UTF8(3), isascii(3), ascii(7)

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.

The ASN.1 notion of what constitutes a PrintableString is more restrictive than what the C library function isprint(3) considers printable.
November 15, 2021 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.