X509_NAME_print_ex(3) OpenSSL X509_NAME_print_ex(3) NNAAMMEE X509_NAME_print_ex, X509_NAME_print_ex_fp, X509_NAME_print, X509_NAME_oneline - X509_NAME printing routines. SSYYNNOOPPSSIISS #include int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent, unsigned long flags); int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, unsigned long flags); char * X509_NAME_oneline(X509_NAME *a,char *buf,int size); int X509_NAME_print(BIO *bp, X509_NAME *name, int obase); DDEESSCCRRIIPPTTIIOONN _X_5_0_9___N_A_M_E___p_r_i_n_t___e_x_(_) prints a human readable version of nnmm to BIO oouutt. Each line (for multiline formats) is indented by iinnddeenntt spaces. The output format can be extensively customised by use of the ffllaaggss parame- ter. _X_5_0_9___N_A_M_E___p_r_i_n_t___e_x___f_p_(_) is identical to _X_5_0_9___N_A_M_E___p_r_i_n_t___e_x_(_) except the output is written to FILE pointer ffpp. _X_5_0_9___N_A_M_E___o_n_e_l_i_n_e_(_) prints an ASCII version of aa to bbuuff. At most ssiizzee bytes will be written. If bbuuff is NNUULLLL then a buffer is dynamically allocated and returned, otherwise bbuuff is returned. _X_5_0_9___N_A_M_E___p_r_i_n_t_(_) prints out nnaammee to bbpp indenting each line by oobbaassee characters. Multiple lines are used if the output (including indent) exceeds 80 characters. NNOOTTEESS The functions _X_5_0_9___N_A_M_E___o_n_e_l_i_n_e_(_) and _X_5_0_9___N_A_M_E___p_r_i_n_t_(_) are legacy functions which produce a non standard output form, they don't handle multi character fields and have various quirks and inconsistencies. Their use is strongly discouraged in new applications. Although there are a large number of possible flags for most purposes XXNN__FFLLAAGG__OONNEELLIINNEE, XXNN__FFLLAAGG__MMUULLTTIILLIINNEE or XXNN__FFLLAAGG__RRFFCC22225533 will suffice. As noted on the _A_S_N_1___S_T_R_I_N_G___p_r_i_n_t___e_x(3) manual page for UTF8 terminals the AASSNN11__SSTTRRFFLLGGSS__EESSCC__MMSSBB should be unset: so for example XXNN__FFLLAAGG__OONNEELLIINNEE && ~~AASSNN11__SSTTRRFFLLGGSS__EESSCC__MMSSBB would be used. The complete set of the flags supported by _X_5_0_9___N_A_M_E___p_r_i_n_t___e_x_(_) is listed below. Several options can be ored together. The options XXNN__FFLLAAGG__SSEEPP__CCOOMMMMAA__PPLLUUSS, XXNN__FFLLAAGG__SSEEPP__CCPPLLUUSS__SSPPCC, XXNN__FFLLAAGG__SSEEPP__SSPPLLUUSS__SSPPCC and XXNN__FFLLAAGG__SSEEPP__MMUULLTTIILLIINNEE determine the field separators to use. Two distinct separators are used between distinct RelativeDistinguishedName components and separate values in the same RDN for a multi-valued RDN. Multi-valued RDNs are currently very rare so the second separator will hardly ever be used. XXNN__FFLLAAGG__SSEEPP__CCOOMMMMAA__PPLLUUSS uses comma and plus as separators. XXNN__FFLLAAGG__SSEEPP__CCPPLLUUSS__SSPPCC uses comma and plus with spaces: this is more readable that plain comma and plus. XXNN__FFLLAAGG__SSEEPP__SSPPLLUUSS__SSPPCC uses spaced semicolon and plus. XXNN__FFLLAAGG__SSEEPP__MMUULLTTIILLIINNEE uses spaced newline and plus respectively. If XXNN__FFLLAAGG__DDNN__RREEVV is set the whole DN is printed in reversed order. The fields XXNN__FFLLAAGG__FFNN__SSNN, XXNN__FFLLAAGG__FFNN__LLNN, XXNN__FFLLAAGG__FFNN__OOIIDD, XXNN__FFLLAAGG__FFNN__NNOONNEE determine how a field name is displayed. It will use the short name (e.g. CN) the long name (e.g. commonName) always use OID numerical form (normally OIDs are only used if the field name is not recognised) and no field name respectively. If XXNN__FFLLAAGG__SSPPCC__EEQQ is set then spaces will be placed around the '=' character separating field names and values. If XXNN__FFLLAAGG__DDUUMMPP__UUNNKKNNOOWWNN__FFIIEELLDDSS is set then the encoding of unknown fields is printed instead of the values. If XXNN__FFLLAAGG__FFNN__AALLIIGGNN is set then field names are padded to 20 charac- ters: this is only of use for multiline format. Additionally all the options supported by _A_S_N_1___S_T_R_I_N_G___p_r_i_n_t___e_x_(_) can be used to control how each field value is displayed. In addition a number options can be set for commonly used formats. XXNN__FFLLAAGG__RRFFCC22225533 sets options which produce an output compatible with RFC2253 it is equivalent to: AASSNN11__SSTTRRFFLLGGSS__RRFFCC22225533 || XXNN__FFLLAAGG__SSEEPP__CCOOMMMMAA__PPLLUUSS || XXNN__FFLLAAGG__DDNN__RREEVV || XXNN__FFLLAAGG__FFNN__SSNN || XXNN__FFLLAAGG__DDUUMMPP__UUNNKKNNOOWWNN__FFIIEELLDDSS XXNN__FFLLAAGG__OONNEELLIINNEE is a more readable one line format which is the same as: AASSNN11__SSTTRRFFLLGGSS__RRFFCC22225533 || AASSNN11__SSTTRRFFLLGGSS__EESSCC__QQUUOOTTEE || XXNN__FFLLAAGG__SSEEPP__CCPPLLUUSS__SSPPCC || XXNN__FFLLAAGG__SSPPCC__EEQQ || XXNN__FFLLAAGG__FFNN__SSNN XXNN__FFLLAAGG__MMUULLTTIILLIINNEE is a multiline format which is the same as: AASSNN11__SSTTRRFFLLGGSS__EESSCC__CCTTRRLL || AASSNN11__SSTTRRFFLLGGSS__EESSCC__MMSSBB || XXNN__FFLLAAGG__SSEEPP__MMUULLTTIILLIINNEE || XXNN__FFLLAAGG__SSPPCC__EEQQ || XXNN__FFLLAAGG__FFNN__LLNN || XXNN__FFLLAAGG__FFNN__AALLIIGGNN XXNN__FFLLAAGG__CCOOMMPPAATT uses a format identical to _X_5_0_9___N_A_M_E___p_r_i_n_t_(_): in fact it calls _X_5_0_9___N_A_M_E___p_r_i_n_t_(_) internally. SSEEEE AALLSSOO _A_S_N_1___S_T_R_I_N_G___p_r_i_n_t___e_x(3) HHIISSTTOORRYY TBA 1.0.1u 2016-09-22 X509_NAME_print_ex(3)