1X509_NAME_print_ex(3)               OpenSSL              X509_NAME_print_ex(3)
2
3
4

NAME

6       X509_NAME_print_ex, X509_NAME_print_ex_fp, X509_NAME_print,
7       X509_NAME_oneline - X509_NAME printing routines.
8

SYNOPSIS

10        #include <openssl/x509.h>
11
12        int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent, unsigned long flags);
13        int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, unsigned long flags);
14        char * X509_NAME_oneline(X509_NAME *a,char *buf,int size);
15        int X509_NAME_print(BIO *bp, X509_NAME *name, int obase);
16

DESCRIPTION

18       X509_NAME_print_ex() prints a human readable version of nm to BIO out.
19       Each line (for multiline formats) is indented by indent spaces. The
20       output format can be extensively customised by use of the flags
21       parameter.
22
23       X509_NAME_print_ex_fp() is identical to X509_NAME_print_ex() except the
24       output is written to FILE pointer fp.
25
26       X509_NAME_oneline() prints an ASCII version of a to buf. At most size
27       bytes will be written. If buf is NULL then a buffer is dynamically
28       allocated and returned, otherwise buf is returned.
29
30       X509_NAME_print() prints out name to bp indenting each line by obase
31       characters. Multiple lines are used if the output (including indent)
32       exceeds 80 characters.
33

NOTES

35       The functions X509_NAME_oneline() and X509_NAME_print() are legacy
36       functions which produce a non standard output form, they don't handle
37       multi character fields and have various quirks and inconsistencies.
38       Their use is strongly discouraged in new applications.
39
40       Although there are a large number of possible flags for most purposes
41       XN_FLAG_ONELINE, XN_FLAG_MULTILINE or XN_FLAG_RFC2253 will suffice.  As
42       noted on the ASN1_STRING_print_ex(3) manual page for UTF8 terminals the
43       ASN1_STRFLGS_ESC_MSB should be unset: so for example XN_FLAG_ONELINE &
44       ~ASN1_STRFLGS_ESC_MSB would be used.
45
46       The complete set of the flags supported by X509_NAME_print_ex() is
47       listed below.
48
49       Several options can be ored together.
50
51       The options XN_FLAG_SEP_COMMA_PLUS, XN_FLAG_SEP_CPLUS_SPC,
52       XN_FLAG_SEP_SPLUS_SPC and XN_FLAG_SEP_MULTILINE determine the field
53       separators to use. Two distinct separators are used between distinct
54       RelativeDistinguishedName components and separate values in the same
55       RDN for a multi-valued RDN. Multi-valued RDNs are currently very rare
56       so the second separator will hardly ever be used.
57
58       XN_FLAG_SEP_COMMA_PLUS uses comma and plus as separators.
59       XN_FLAG_SEP_CPLUS_SPC uses comma and plus with spaces: this is more
60       readable that plain comma and plus.  XN_FLAG_SEP_SPLUS_SPC uses spaced
61       semicolon and plus. XN_FLAG_SEP_MULTILINE uses spaced newline and plus
62       respectively.
63
64       If XN_FLAG_DN_REV is set the whole DN is printed in reversed order.
65
66       The fields XN_FLAG_FN_SN, XN_FLAG_FN_LN, XN_FLAG_FN_OID,
67       XN_FLAG_FN_NONE determine how a field name is displayed. It will use
68       the short name (e.g. CN) the long name (e.g. commonName) always use OID
69       numerical form (normally OIDs are only used if the field name is not
70       recognised) and no field name respectively.
71
72       If XN_FLAG_SPC_EQ is set then spaces will be placed around the '='
73       character separating field names and values.
74
75       If XN_FLAG_DUMP_UNKNOWN_FIELDS is set then the encoding of unknown
76       fields is printed instead of the values.
77
78       If XN_FLAG_FN_ALIGN is set then field names are padded to 20
79       characters: this is only of use for multiline format.
80
81       Additionally all the options supported by ASN1_STRING_print_ex() can be
82       used to control how each field value is displayed.
83
84       In addition a number options can be set for commonly used formats.
85
86       XN_FLAG_RFC2253 sets options which produce an output compatible with
87       RFC2253 it is equivalent to:
88        ASN1_STRFLGS_RFC2253 | XN_FLAG_SEP_COMMA_PLUS | XN_FLAG_DN_REV |
89       XN_FLAG_FN_SN | XN_FLAG_DUMP_UNKNOWN_FIELDS
90
91       XN_FLAG_ONELINE is a more readable one line format which is the same
92       as:
93        ASN1_STRFLGS_RFC2253 | ASN1_STRFLGS_ESC_QUOTE | XN_FLAG_SEP_CPLUS_SPC
94       | XN_FLAG_SPC_EQ | XN_FLAG_FN_SN
95
96       XN_FLAG_MULTILINE is a multiline format which is the same as:
97        ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB | XN_FLAG_SEP_MULTILINE |
98       XN_FLAG_SPC_EQ | XN_FLAG_FN_LN | XN_FLAG_FN_ALIGN
99
100       XN_FLAG_COMPAT uses a format identical to X509_NAME_print(): in fact it
101       calls X509_NAME_print() internally.
102

SEE ALSO

104       ASN1_STRING_print_ex(3)
105

HISTORY

107       TBA
108
109
110
1111.0.0e                            2007-09-24             X509_NAME_print_ex(3)
Impressum