ASN1_STRING_PRINT_EX - Online Linux Manual PageSection : 3
Updated : 2021-03-26
Source : 1.1.1k
Note : OpenSSL

NAMEASN1_tag2str, ASN1_STRING_print_ex, ASN1_STRING_print_ex_fp, ASN1_STRING_print ​− ASN1_STRING output routines

SYNOPSIS​ #include <openssl/asn1.h> ​ ​ int ASN1_STRING_print_ex(BIO *out, const ASN1_STRING *str, unsigned long flags); ​ int ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str, unsigned long flags); ​ int ASN1_STRING_print(BIO *out, const ASN1_STRING *str); ​ ​ const char *ASN1_tag2str(int tag);

DESCRIPTIONThese functions output an ASN1_STRING structure. ASN1_STRING is used to represent all the ASN1 string types. ASN1_STRING_print_ex() outputs str to out, the format is determined by the options flags. ASN1_STRING_print_ex_fp() is identical except it outputs to fp instead. ASN1_STRING_print() prints str to out but using a different format to ​ASN1_STRING_print_ex(). It replaces unprintable characters (other than CR, LF) with '.'. ASN1_tag2str() returns a human-readable name of the specified ASN.1 tag.

NOTESASN1_STRING_print() is a deprecated function which should be avoided; use ​ASN1_STRING_print_ex() instead. Although there are a large number of options frequently ASN1_STRFLGS_RFC2253 is suitable, or on UTF8 terminals ASN1_STRFLGS_RFC2253 & ~ASN1_STRFLGS_ESC_MSB. The complete set of supported options for flags is listed below. Various characters can be escaped. If ASN1_STRFLGS_ESC_2253 is set the characters determined by RFC2253 are escaped. If ASN1_STRFLGS_ESC_CTRL is set control characters are escaped. If ASN1_STRFLGS_ESC_MSB is set characters with the ​MSB set are escaped: this option should not be used if the terminal correctly interprets UTF8 sequences. Escaping takes several forms. If the character being escaped is a 16 bit character then the form \UXXXX is used using exactly four characters for the hex representation. If it is 32 bits then ​\WXXXXXXXX is used using eight characters of its hex representation. These forms will only be used if UTF8 conversion is not set (see below). Printable characters are normally escaped using the backslash '\' character. If ​ASN1_STRFLGS_ESC_QUOTE is set then the whole string is instead surrounded by double quote characters: this is arguably more readable than the backslash notation. Other characters use the \XX using exactly two characters of the hex representation. If ASN1_STRFLGS_UTF8_CONVERT is set then characters are converted to UTF8 format first. If the terminal supports the display of UTF8 sequences then this option will correctly display multi byte characters. If ASN1_STRFLGS_IGNORE_TYPE is set then the string type is not interpreted at all: everything is assumed to be one byte per character. This is primarily for debugging purposes and can result in confusing output in multi character strings. If ASN1_STRFLGS_SHOW_TYPE is set then the string type itself is printed out before its value (for example BMPSTRING), this actually uses ASN1_tag2str(). The content of a string instead of being interpreted can be dumped: this just outputs the value of the string using the form #XXXX using hex format for each octet. If ASN1_STRFLGS_DUMP_ALL is set then any type is dumped. Normally non character string types (such as OCTET STRING) are assumed to be one byte per character, if ASN1_STRFLGS_DUMP_UNKNOWN is set then they will be dumped instead. When a type is dumped normally just the content octets are printed, if ​ASN1_STRFLGS_DUMP_DER is set then the complete encoding is dumped instead (including tag and length octets). ASN1_STRFLGS_RFC2253 includes all the flags required by RFC2253. It is equivalent to:
ASN1_STRFLGS_ESC_2253 | ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB |
ASN1_STRFLGS_UTF8_CONVERT | ASN1_STRFLGS_DUMP_UNKNOWN ASN1_STRFLGS_DUMP_DER

RETURN VALUESASN1_STRING_print_ex() and ASN1_STRING_print_ex_fp() return the number of characters written or −1 if an error occurred. ASN1_STRING_print() returns 1 on success or 0 on error. ASN1_tag2str() returns a human-readable name of the specified ASN.1 tag.

SEE ALSOX509_NAME_print_ex(3), ​ASN1_tag2str(3)

COPYRIGHTCopyright 2002−2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the License). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
0
Johanes Gumabo
Data Size   :   15,528 byte
man-ASN1_STRING_print.3sslBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   4 / 171,228
Visitor ID   :     :  
Visitor IP   :   3.135.206.19   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|A___SN1_STRING_print.3ssl|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|A___SN1_STRING_print.3ssl|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|249|A___SN1_STRING_print.3ssl|43|br══─}─══|'br══─}─══ )         (htmlprn|149|A___SN1_STRING_print.3ssl|43|'br══─}─══ |'br══─}─══ )