Seth Woolley's Man Viewer

ASN1_STRING_print_ex(3) - ASN1_STRING_print_ex, ASN1_STRING_print_ex_fp - ASN1_STRING output routines - man 3 ASN1_STRING_print_ex

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

ASN1_STRING_print_ex(3)             OpenSSL            ASN1_STRING_print_ex(3)



NAME
       ASN1_STRING_print_ex, ASN1_STRING_print_ex_fp - ASN1_STRING output rou-
       tines.

SYNOPSIS
        #include <openssl/asn1.h>

        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);

DESCRIPTION
       These functions output an ASN1_STRING structure. ASN1_STRING is used to
       represent all the ASN1 string(3,n) 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 '.'.

NOTES
       ASN1_STRING_print() is a legacy function which should be avoided in(1,8) new
       applications.

       Although there are a large number of options frequently ASN1_STR-
       FLAGS_RFC2253 is suitable, or on UTF8 terminals ASN1_STRFLAGS_RFC2253 &
       ~ASN1_STRFLAGS_ESC_MSB.

       The complete set(7,n,1 builtins) of supported options for flags is listed below.

       Various characters can be escaped. If ASN1_STRFLGS_ESC_2253 is set(7,n,1 builtins) the
       characters determined by RFC2253 are escaped. If ASN1_STRFLGS_ESC_CTRL
       is set(7,n,1 builtins) control characters are escaped. If ASN1_STRFLGS_ESC_MSB is set(7,n,1 builtins)
       characters with the MSB set(7,n,1 builtins) are escaped: this option should not be used
       if(3,n) the terminal correctly interprets UTF8 sequences.

       Escaping takes several forms.

       If the character being escaped is a 16 bit character then the form
       "\WXXXX" is used using exactly four characters for the hex representa-
       tion. If it is 32 bits then "\UXXXXXXXX" is used using eight characters
       of its hex representation. These forms will only be used if(3,n) UTF8 con-
       version(1,3,5) is not set(7,n,1 builtins) (see below).

       Printable characters are normally escaped using the backslash '\' char-
       acter. If ASN1_STRFLGS_ESC_QUOTE is set(7,n,1 builtins) then the whole string(3,n) 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(7,n,1 builtins) 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 charac-
       ters.

       If ASN1_STRFLGS_IGNORE_TYPE is set(7,n,1 builtins) then the string(3,n) type is not inter-
       preted at all: everything is assumed to be one byte per character. This
       is primarily for debugging purposes and can result in(1,8) confusing output
       in(1,8) multi character strings.

       If ASN1_STRFLGS_SHOW_TYPE is set(7,n,1 builtins) then the string(3,n) type itself is printed
       out before its value (for example "BMPSTRING"), this actually uses
       ASN1_tag2str().

       The content of a string(3,n) instead of being interpreted can be "dumped":
       this just outputs the value of the string(3,n) using the form #XXXX using
       hex format for each octet.

       If ASN1_STRFLGS_DUMP_ALL is set(7,n,1 builtins) then any type is dumped.

       Normally non character string(3,n) types (such as OCTET STRING) are assumed
       to be one byte per character, if(3,n) ASN1_STRFLAGS_DUMP_UNKNOWN is set(7,n,1 builtins) then
       they will be dumped instead.

       When a type is dumped normally just the content octets are printed, if(3,n)
       ASN1_STRFLGS_DUMP_DER is set(7,n,1 builtins) then the complete encoding(3,n) 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_STR-
       FLGS_DUMP_DER

SEE ALSO
       X509_NAME_print_ex(3), ASN1_tag2str(3)

HISTORY
       TBA



0.9.7d                            2002-11-11           ASN1_STRING_print_ex(3)

References for this manual (incoming links)