ASN1_STRING_print_ex.3 revision 111151
Automatically generated by Pod::Man version 1.15
Wed Feb 19 16:42:42 2003

Standard preamble:
======================================================================

\\$1

.. ..

"\\$1" \\$2
..
..

.. Set up some character translations and predefined strings. \*(-- will
give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
double quote, and \*(R" will give a right double quote. | will give a
real vertical bar. \*(C+ will give a nicer C++. Capital omega is used
to do unbreakable dashes and therefore won't be available. \*(C` and
\*(C' expand to `' in nroff, nothing in troff, for use with C<>
.tr \(*W-|\(bv\*(Tr . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\}
If the F register is turned on, we'll generate index entries on stderr
for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and
index entries marked with X<> in POD. Of course, you'll have to process
the output yourself in some meaningful fashion.
. de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\}
For nroff, turn off justification. Always turn off hyphenation; it
makes way too many mistakes in technical documents.

Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
Fear. Run. Save yourself. No user-serviceable parts.
.bd B 3 . \" fudge factors for nroff and troff . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] .\} . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents . \" corrections for vroff . \" for low resolution devices (crt and lpr) \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} ======================================================================

Title "ASN1_STRING_print_ex 3"
ASN1_STRING_print_ex 3 "0.9.7a" "2003-02-19" "OpenSSL"
C
"NAME"
ASN1_STRING_print_ex, ASN1_STRING_print_ex_fp - \s-1ASN1_STRING\s0 output routines.
"SYNOPSIS"
Header "SYNOPSIS" .Vb 1 #include <openssl/asn1.h> .Ve .Vb 3 int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags); int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags); int ASN1_STRING_print(BIO *out, ASN1_STRING *str); .Ve
"DESCRIPTION"
Header "DESCRIPTION" These functions output an \s-1ASN1_STRING\s0 structure. \s-1ASN1_STRING\s0 is used to represent all the \s-1ASN1\s0 string types.

\fIASN1_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.

\fIASN1_STRING_print() prints str to out but using a different format to \fIASN1_STRING_print_ex(). It replaces unprintable characters (other than \s-1CR\s0, \s-1LF\s0) with '.'.

"NOTES"
Header "NOTES" \fIASN1_STRING_print() is a legacy function which should be avoided in new applications.

Although there are a large number of options frequently \s-1ASN1_STRFLAGS_RFC2253\s0 is suitable, or on \s-1UTF8\s0 terminals \s-1ASN1_STRFLAGS_RFC2253\s0 & ~ASN1_STRFLAGS_ESC_MSB.

The complete set of supported options for flags is listed below.

Various characters can be escaped. If \s-1ASN1_STRFLGS_ESC_2253\s0 is set the characters determined by \s-1RFC2253\s0 are escaped. If \s-1ASN1_STRFLGS_ESC_CTRL\s0 is set control characters are escaped. If \s-1ASN1_STRFLGS_ESC_MSB\s0 is set characters with the \s-1MSB\s0 set are escaped: this option should not be used if the terminal correctly interprets \s-1UTF8\s0 sequences.

Escaping takes several forms.

If the character being escaped is a 16 bit character then the form \*(L"\eWXXXX\*(R" is used using exactly four characters for the hex representation. If it is 32 bits then \*(L"\eUXXXXXXXX\*(R" is used using eight characters of its hex representation. These forms will only be used if \s-1UTF8\s0 conversion is not set (see below).

Printable characters are normally escaped using the backslash '\e' character. If \fB\s-1ASN1_STRFLGS_ESC_QUOTE\s0 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 \*(L"\eXX\*(R" using exactly two characters of the hex representation.

If \s-1ASN1_STRFLGS_UTF8_CONVERT\s0 is set then characters are converted to \s-1UTF8\s0 format first. If the terminal supports the display of \s-1UTF8\s0 sequences then this option will correctly display multi byte characters.

If \s-1ASN1_STRFLGS_IGNORE_TYPE\s0 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 \s-1ASN1_STRFLGS_SHOW_TYPE\s0 is set then the string type itself is printed out before its value (for example \*(L"\s-1BMPSTRING\s0\*(R"), this actually uses ASN1_tag2str().

The content of a string instead of being interpreted can be \*(L"dumped\*(R": this just outputs the value of the string using the form #XXXX using hex format for each octet.

If \s-1ASN1_STRFLGS_DUMP_ALL\s0 is set then any type is dumped.

Normally non character string types (such as \s-1OCTET\s0 \s-1STRING\s0) are assumed to be one byte per character, if \s-1ASN1_STRFLAGS_DUMP_UNKNOWN\s0 is set then they will be dumped instead.

When a type is dumped normally just the content octets are printed, if \fB\s-1ASN1_STRFLGS_DUMP_DER\s0 is set then the complete encoding is dumped instead (including tag and length octets).

\fB\s-1ASN1_STRFLGS_RFC2253\s0 includes all the flags required by \s-1RFC2253\s0. It is equivalent to: \s-1ASN1_STRFLGS_ESC_2253\s0 | \s-1ASN1_STRFLGS_ESC_CTRL\s0 | \s-1ASN1_STRFLGS_ESC_MSB\s0 | \s-1ASN1_STRFLGS_UTF8_CONVERT\s0 | \s-1ASN1_STRFLGS_DUMP_UNKNOWN\s0 \s-1ASN1_STRFLGS_DUMP_DER\s0

"SEE ALSO"
Header "SEE ALSO" X509_NAME_print_ex(3), ASN1_tag2str(3)
"HISTORY"
Header "HISTORY" \s-1TBA\s0