diff options
| author | cvs2svn <admin@example.com> | 2021-08-18 16:06:57 +0000 |
|---|---|---|
| committer | cvs2svn <admin@example.com> | 2021-08-18 16:06:57 +0000 |
| commit | d56c8fa8260d226f98b26f017b45b9c2b135f38d (patch) | |
| tree | 348178b41617813cc93787187984a734ef8379ca /src/lib/libcrypto/man/X509_NAME_print_ex.3 | |
| parent | 18b9c1bcab7c37d8c5bd05b8e0d14d0c59d96650 (diff) | |
| download | openbsd-tb_20210818.tar.gz openbsd-tb_20210818.tar.bz2 openbsd-tb_20210818.zip | |
This commit was manufactured by cvs2git to create tag 'tb_20210818'.tb_20210818
Diffstat (limited to 'src/lib/libcrypto/man/X509_NAME_print_ex.3')
| -rw-r--r-- | src/lib/libcrypto/man/X509_NAME_print_ex.3 | 286 |
1 files changed, 0 insertions, 286 deletions
diff --git a/src/lib/libcrypto/man/X509_NAME_print_ex.3 b/src/lib/libcrypto/man/X509_NAME_print_ex.3 deleted file mode 100644 index 494066ff9c..0000000000 --- a/src/lib/libcrypto/man/X509_NAME_print_ex.3 +++ /dev/null | |||
| @@ -1,286 +0,0 @@ | |||
| 1 | .\" $OpenBSD: X509_NAME_print_ex.3,v 1.11 2018/05/19 22:05:58 schwarze Exp $ | ||
| 2 | .\" full merge up to: OpenSSL aebb9aac Jul 19 09:27:53 2016 -0400 | ||
| 3 | .\" selective merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800 | ||
| 4 | .\" | ||
| 5 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | ||
| 6 | .\" Copyright (c) 2002, 2004, 2007, 2016, 2017 The OpenSSL Project. | ||
| 7 | .\" All rights reserved. | ||
| 8 | .\" | ||
| 9 | .\" Redistribution and use in source and binary forms, with or without | ||
| 10 | .\" modification, are permitted provided that the following conditions | ||
| 11 | .\" are met: | ||
| 12 | .\" | ||
| 13 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 14 | .\" notice, this list of conditions and the following disclaimer. | ||
| 15 | .\" | ||
| 16 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 17 | .\" notice, this list of conditions and the following disclaimer in | ||
| 18 | .\" the documentation and/or other materials provided with the | ||
| 19 | .\" distribution. | ||
| 20 | .\" | ||
| 21 | .\" 3. All advertising materials mentioning features or use of this | ||
| 22 | .\" software must display the following acknowledgment: | ||
| 23 | .\" "This product includes software developed by the OpenSSL Project | ||
| 24 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 25 | .\" | ||
| 26 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 27 | .\" endorse or promote products derived from this software without | ||
| 28 | .\" prior written permission. For written permission, please contact | ||
| 29 | .\" openssl-core@openssl.org. | ||
| 30 | .\" | ||
| 31 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
| 32 | .\" nor may "OpenSSL" appear in their names without prior written | ||
| 33 | .\" permission of the OpenSSL Project. | ||
| 34 | .\" | ||
| 35 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
| 36 | .\" acknowledgment: | ||
| 37 | .\" "This product includes software developed by the OpenSSL Project | ||
| 38 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 39 | .\" | ||
| 40 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 41 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 42 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 43 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 44 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 45 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 46 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 47 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 49 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 52 | .\" | ||
| 53 | .Dd $Mdocdate: May 19 2018 $ | ||
| 54 | .Dt X509_NAME_PRINT_EX 3 | ||
| 55 | .Os | ||
| 56 | .Sh NAME | ||
| 57 | .Nm X509_NAME_print_ex , | ||
| 58 | .Nm X509_NAME_print_ex_fp , | ||
| 59 | .Nm X509_NAME_oneline , | ||
| 60 | .Nm X509_NAME_print | ||
| 61 | .Nd X509_NAME printing routines | ||
| 62 | .Sh SYNOPSIS | ||
| 63 | .In openssl/x509.h | ||
| 64 | .Ft int | ||
| 65 | .Fo X509_NAME_print_ex | ||
| 66 | .Fa "BIO *out" | ||
| 67 | .Fa "const X509_NAME *nm" | ||
| 68 | .Fa "int indent" | ||
| 69 | .Fa "unsigned long flags" | ||
| 70 | .Fc | ||
| 71 | .Ft int | ||
| 72 | .Fo X509_NAME_print_ex_fp | ||
| 73 | .Fa "FILE *fp" | ||
| 74 | .Fa "const X509_NAME *nm" | ||
| 75 | .Fa "int indent" | ||
| 76 | .Fa "unsigned long flags" | ||
| 77 | .Fc | ||
| 78 | .Ft char * | ||
| 79 | .Fo X509_NAME_oneline | ||
| 80 | .Fa "const X509_NAME *a" | ||
| 81 | .Fa "char *buf" | ||
| 82 | .Fa "int size" | ||
| 83 | .Fc | ||
| 84 | .Ft int | ||
| 85 | .Fo X509_NAME_print | ||
| 86 | .Fa "BIO *bp" | ||
| 87 | .Fa "const X509_NAME *name" | ||
| 88 | .Fa "int obase" | ||
| 89 | .Fc | ||
| 90 | .Sh DESCRIPTION | ||
| 91 | .Fn X509_NAME_print_ex | ||
| 92 | prints a human readable version of | ||
| 93 | .Fa nm | ||
| 94 | to | ||
| 95 | .Vt BIO | ||
| 96 | .Fa out . | ||
| 97 | Each line (for multiline formats) is indented by | ||
| 98 | .Fa indent | ||
| 99 | spaces. | ||
| 100 | The output format can be extensively customised by use of the | ||
| 101 | .Fa flags | ||
| 102 | parameter. | ||
| 103 | .Pp | ||
| 104 | .Fn X509_NAME_print_ex_fp | ||
| 105 | is identical to | ||
| 106 | .Fn X509_NAME_print_ex | ||
| 107 | except the output is written to the | ||
| 108 | .Vt FILE | ||
| 109 | pointer | ||
| 110 | .Fa fp . | ||
| 111 | .Pp | ||
| 112 | .Fn X509_NAME_oneline | ||
| 113 | prints an ASCII version of | ||
| 114 | .Fa a | ||
| 115 | to | ||
| 116 | .Fa buf . | ||
| 117 | If | ||
| 118 | .Fa buf | ||
| 119 | is | ||
| 120 | .Dv NULL , | ||
| 121 | then a buffer is dynamically allocated and returned, and | ||
| 122 | .Fa size | ||
| 123 | is ignored. | ||
| 124 | Otherwise, at most | ||
| 125 | .Fa size | ||
| 126 | bytes will be written, including the ending NUL, and | ||
| 127 | .Fa buf | ||
| 128 | is returned. | ||
| 129 | .Pp | ||
| 130 | .Fn X509_NAME_print | ||
| 131 | prints out | ||
| 132 | .Fa name | ||
| 133 | to | ||
| 134 | .Fa bp | ||
| 135 | indenting each line by | ||
| 136 | .Fa obase | ||
| 137 | characters. | ||
| 138 | Multiple lines are used if the output (including indent) exceeds 80 | ||
| 139 | characters. | ||
| 140 | .Pp | ||
| 141 | The functions | ||
| 142 | .Fn X509_NAME_oneline | ||
| 143 | and | ||
| 144 | .Fn X509_NAME_print | ||
| 145 | are legacy functions which produce a non-standard output form. | ||
| 146 | They don't handle multi-character fields and have various quirks | ||
| 147 | and inconsistencies. | ||
| 148 | Their use is strongly discouraged in new applications. | ||
| 149 | .Pp | ||
| 150 | Although there are a large number of possible flags, for most purposes | ||
| 151 | .Dv XN_FLAG_ONELINE , | ||
| 152 | .Dv XN_FLAG_MULTILINE , | ||
| 153 | or | ||
| 154 | .Dv XN_FLAG_RFC2253 | ||
| 155 | will suffice. | ||
| 156 | As noted on the | ||
| 157 | .Xr ASN1_STRING_print_ex 3 | ||
| 158 | manual page, for UTF-8 terminals the | ||
| 159 | .Dv ASN1_STRFLGS_ESC_MSB | ||
| 160 | should be unset: so for example | ||
| 161 | .Dv XN_FLAG_ONELINE No & Pf ~ Dv ASN1_STRFLGS_ESC_MSB | ||
| 162 | would be used. | ||
| 163 | .Pp | ||
| 164 | The complete set of the flags supported by | ||
| 165 | .Dv X509_NAME_print_ex | ||
| 166 | is listed below. | ||
| 167 | .Pp | ||
| 168 | Several options can be OR'ed together. | ||
| 169 | .Pp | ||
| 170 | The options | ||
| 171 | .Dv XN_FLAG_SEP_COMMA_PLUS , | ||
| 172 | .Dv XN_FLAG_SEP_CPLUS_SPC , | ||
| 173 | .Dv XN_FLAG_SEP_SPLUS_SPC , | ||
| 174 | and | ||
| 175 | .Dv XN_FLAG_SEP_MULTILINE | ||
| 176 | determine the field separators to use. | ||
| 177 | Two distinct separators are used between distinct | ||
| 178 | .Vt RelativeDistinguishedName | ||
| 179 | components and separate values in the same RDN for a multi-valued RDN. | ||
| 180 | Multi-valued RDNs are currently very rare so the second separator | ||
| 181 | will hardly ever be used. | ||
| 182 | .Pp | ||
| 183 | .Dv XN_FLAG_SEP_COMMA_PLUS | ||
| 184 | uses comma and plus as separators. | ||
| 185 | .Dv XN_FLAG_SEP_CPLUS_SPC | ||
| 186 | uses comma and plus with spaces: | ||
| 187 | this is more readable that plain comma and plus. | ||
| 188 | .Dv XN_FLAG_SEP_SPLUS_SPC | ||
| 189 | uses spaced semicolon and plus. | ||
| 190 | .Dv XN_FLAG_SEP_MULTILINE | ||
| 191 | uses spaced newline and plus respectively. | ||
| 192 | .Pp | ||
| 193 | If | ||
| 194 | .Dv XN_FLAG_DN_REV | ||
| 195 | is set, the whole DN is printed in reversed order. | ||
| 196 | .Pp | ||
| 197 | The fields | ||
| 198 | .Dv XN_FLAG_FN_SN , | ||
| 199 | .Dv XN_FLAG_FN_LN , | ||
| 200 | .Dv XN_FLAG_FN_OID , | ||
| 201 | and | ||
| 202 | .Dv XN_FLAG_FN_NONE | ||
| 203 | determine how a field name is displayed. | ||
| 204 | It will use the short name (e.g. CN), the long name (e.g. commonName), | ||
| 205 | always use OID numerical form (normally OIDs are only used if the | ||
| 206 | field name is not recognised) and no field name, respectively. | ||
| 207 | .Pp | ||
| 208 | If | ||
| 209 | .Dv XN_FLAG_SPC_EQ | ||
| 210 | is set, then spaces will be placed around the | ||
| 211 | .Ql = | ||
| 212 | character separating field names and values. | ||
| 213 | .Pp | ||
| 214 | If | ||
| 215 | .Dv XN_FLAG_DUMP_UNKNOWN_FIELDS | ||
| 216 | is set, then the encoding of unknown fields is printed instead of the | ||
| 217 | values. | ||
| 218 | .Pp | ||
| 219 | If | ||
| 220 | .Dv XN_FLAG_FN_ALIGN | ||
| 221 | is set, then field names are padded to 20 characters: | ||
| 222 | this is only of use for multiline format. | ||
| 223 | .Pp | ||
| 224 | Additionally, all the options supported by | ||
| 225 | .Xr ASN1_STRING_print_ex 3 | ||
| 226 | can be used to control how each field value is displayed. | ||
| 227 | .Pp | ||
| 228 | In addition a number of options can be set for commonly used formats. | ||
| 229 | .Pp | ||
| 230 | .Dv XN_FLAG_RFC2253 | ||
| 231 | sets options which produce an output compatible with RFC 2253. | ||
| 232 | It is equivalent to | ||
| 233 | .Dv ASN1_STRFLGS_RFC2253 | XN_FLAG_SEP_COMMA_PLUS | XN_FLAG_DN_REV | | ||
| 234 | .Dv XN_FLAG_FN_SN | XN_FLAG_DUMP_UNKNOWN_FIELDS . | ||
| 235 | .Pp | ||
| 236 | .Dv XN_FLAG_ONELINE | ||
| 237 | is a more readable one line format which is the same as: | ||
| 238 | .Dv ASN1_STRFLGS_RFC2253 | ASN1_STRFLGS_ESC_QUOTE | XN_FLAG_SEP_CPLUS_SPC | | ||
| 239 | .Dv XN_FLAG_SPC_EQ | XN_FLAG_FN_SN . | ||
| 240 | .Pp | ||
| 241 | .Dv XN_FLAG_MULTILINE | ||
| 242 | is a multiline format which is the same as: | ||
| 243 | .Dv ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB | XN_FLAG_SEP_MULTILINE | | ||
| 244 | .Dv XN_FLAG_SPC_EQ | XN_FLAG_FN_LN | XN_FLAG_FN_ALIGN . | ||
| 245 | .Pp | ||
| 246 | .Dv XN_FLAG_COMPAT | ||
| 247 | uses a format identical to | ||
| 248 | .Fn X509_NAME_print : | ||
| 249 | in fact it calls | ||
| 250 | .Fn X509_NAME_print | ||
| 251 | internally. | ||
| 252 | .Sh RETURN VALUES | ||
| 253 | .Fn X509_NAME_print_ex | ||
| 254 | and | ||
| 255 | .Fn X509_NAME_print_ex_fp | ||
| 256 | return 1 on success or 0 on error if | ||
| 257 | .Dv XN_FLAG_COMPAT | ||
| 258 | is set in | ||
| 259 | .Fa flags . | ||
| 260 | Otherwise, they return the number of printed bytes including the | ||
| 261 | indentation or \-1 on error. | ||
| 262 | .Pp | ||
| 263 | .Fn X509_NAME_oneline | ||
| 264 | returns a valid string on success or | ||
| 265 | .Dv NULL | ||
| 266 | on error. | ||
| 267 | .Pp | ||
| 268 | .Fn X509_NAME_print | ||
| 269 | returns 1 on success or 0 on error. | ||
| 270 | .Sh SEE ALSO | ||
| 271 | .Xr ASN1_STRING_print_ex 3 , | ||
| 272 | .Xr d2i_X509_NAME 3 , | ||
| 273 | .Xr X509_NAME_get_index_by_NID 3 , | ||
| 274 | .Xr X509_NAME_new 3 | ||
| 275 | .Sh HISTORY | ||
| 276 | .Fn X509_NAME_oneline | ||
| 277 | and | ||
| 278 | .Fn X509_NAME_print | ||
| 279 | first appeared in SSLeay 0.5.1 and have been available since | ||
| 280 | .Ox 2.4 . | ||
| 281 | .Pp | ||
| 282 | .Fn X509_NAME_print_ex | ||
| 283 | and | ||
| 284 | .Fn X509_NAME_print_ex_fp | ||
| 285 | first appeared in OpenSSL 0.9.6 and have been available since | ||
| 286 | .Ox 2.9 . | ||
