diff options
Diffstat (limited to 'src/lib/libcrypto')
| -rw-r--r-- | src/lib/libcrypto/man/X509_ALGOR_dup.3 | 98 |
1 files changed, 81 insertions, 17 deletions
diff --git a/src/lib/libcrypto/man/X509_ALGOR_dup.3 b/src/lib/libcrypto/man/X509_ALGOR_dup.3 index 5ca80dc3f8..370dbc71db 100644 --- a/src/lib/libcrypto/man/X509_ALGOR_dup.3 +++ b/src/lib/libcrypto/man/X509_ALGOR_dup.3 | |||
| @@ -1,7 +1,24 @@ | |||
| 1 | .\" $OpenBSD: X509_ALGOR_dup.3,v 1.2 2016/12/05 16:38:24 jmc Exp $ | 1 | .\" $OpenBSD: X509_ALGOR_dup.3,v 1.3 2016/12/15 22:08:23 schwarze Exp $ |
| 2 | .\" OpenSSL 4692340e Jun 7 15:49:08 2016 -0400 | 2 | .\" OpenSSL 4692340e Jun 7 15:49:08 2016 -0400 |
| 3 | .\" | 3 | .\" |
| 4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | 4 | .\" This file is a derived work. |
| 5 | .\" The changes are covered by the following Copyright and license: | ||
| 6 | .\" | ||
| 7 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | ||
| 8 | .\" | ||
| 9 | .\" Permission to use, copy, modify, and distribute this software for any | ||
| 10 | .\" purpose with or without fee is hereby granted, provided that the above | ||
| 11 | .\" copyright notice and this permission notice appear in all copies. | ||
| 12 | .\" | ||
| 13 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 14 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 15 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 16 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 17 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 18 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 19 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 20 | .\" | ||
| 21 | .\" The original file was written by Dr. Stephen Henson <steve@openssl.org>. | ||
| 5 | .\" Copyright (c) 2002, 2015 The OpenSSL Project. All rights reserved. | 22 | .\" Copyright (c) 2002, 2015 The OpenSSL Project. All rights reserved. |
| 6 | .\" | 23 | .\" |
| 7 | .\" Redistribution and use in source and binary forms, with or without | 24 | .\" Redistribution and use in source and binary forms, with or without |
| @@ -48,19 +65,25 @@ | |||
| 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 50 | .\" | 67 | .\" |
| 51 | .Dd $Mdocdate: December 5 2016 $ | 68 | .Dd $Mdocdate: December 15 2016 $ |
| 52 | .Dt X509_ALGOR_DUP 3 | 69 | .Dt X509_ALGOR_DUP 3 |
| 53 | .Os | 70 | .Os |
| 54 | .Sh NAME | 71 | .Sh NAME |
| 72 | .Nm X509_ALGOR_new , | ||
| 73 | .Nm X509_ALGOR_free , | ||
| 55 | .Nm X509_ALGOR_dup , | 74 | .Nm X509_ALGOR_dup , |
| 56 | .Nm X509_ALGOR_set0 , | 75 | .Nm X509_ALGOR_set0 , |
| 57 | .Nm X509_ALGOR_get0 , | 76 | .Nm X509_ALGOR_get0 , |
| 58 | .Nm X509_ALGOR_set_md , | 77 | .Nm X509_ALGOR_set_md , |
| 59 | .Nm X509_ALGOR_cmp | 78 | .Nm X509_ALGOR_cmp |
| 60 | .Nd AlgorithmIdentifier functions | 79 | .Nd create, change, and inspect algorithm identifiers |
| 61 | .Sh SYNOPSIS | 80 | .Sh SYNOPSIS |
| 62 | .In openssl/x509.h | 81 | .In openssl/x509.h |
| 63 | .Ft X509_ALGOR * | 82 | .Ft X509_ALGOR * |
| 83 | .Fn X509_ALGOR_new void | ||
| 84 | .Ft void | ||
| 85 | .Fn X509_ALGOR_free "X509_ALGOR *alg" | ||
| 86 | .Ft X509_ALGOR * | ||
| 64 | .Fo X509_ALGOR_dup | 87 | .Fo X509_ALGOR_dup |
| 65 | .Fa "X509_ALGOR *alg" | 88 | .Fa "X509_ALGOR *alg" |
| 66 | .Fc | 89 | .Fc |
| @@ -89,9 +112,27 @@ | |||
| 89 | .Fa "const X509_ALGOR *b" | 112 | .Fa "const X509_ALGOR *b" |
| 90 | .Fc | 113 | .Fc |
| 91 | .Sh DESCRIPTION | 114 | .Sh DESCRIPTION |
| 115 | .Fn X509_ALGOR_new | ||
| 116 | allocates and initializes an empty | ||
| 117 | .Vt X509_ALGOR | ||
| 118 | object, representing an ASN.1 AlgorithmIdentifier structure | ||
| 119 | defined in RFC 5280 section 4.1.1.2. | ||
| 120 | Such objects can specify a cryptographic algorithm together | ||
| 121 | with algorithm-specific parameters. | ||
| 122 | They are used by many other objects, for example certificates, | ||
| 123 | certificate revocation lists, and certificate requests. | ||
| 124 | .Pp | ||
| 125 | .Fn X509_ALGOR_free | ||
| 126 | frees | ||
| 127 | .Fa alg. | ||
| 128 | .Pp | ||
| 92 | .Fn X509_ALGOR_dup | 129 | .Fn X509_ALGOR_dup |
| 93 | returns a copy of | 130 | copies |
| 94 | .Fa alg . | 131 | .Fa alg |
| 132 | by calling | ||
| 133 | .Xr i2d_X509_ALGOR 3 | ||
| 134 | and | ||
| 135 | .Xr d2i_X509_ALGOR 3 . | ||
| 95 | .Pp | 136 | .Pp |
| 96 | .Fn X509_ALGOR_set0 | 137 | .Fn X509_ALGOR_set0 |
| 97 | sets the algorithm OID of | 138 | sets the algorithm OID of |
| @@ -105,15 +146,15 @@ with value | |||
| 105 | If | 146 | If |
| 106 | .Fa ptype | 147 | .Fa ptype |
| 107 | is | 148 | is |
| 108 | .Sy V_ASN1_UNDEF | 149 | .Dv V_ASN1_UNDEF |
| 109 | the parameter is omitted, otherwise | 150 | the parameter is omitted, otherwise |
| 110 | .Fa ptype | 151 | .Fa ptype |
| 111 | and | 152 | and |
| 112 | .Fa pval | 153 | .Fa pval |
| 113 | have the same meaning as the | 154 | have the same meaning as the |
| 114 | .Sy type | 155 | .Fa type |
| 115 | and | 156 | and |
| 116 | .Sy value | 157 | .Fa value |
| 117 | parameters to | 158 | parameters to |
| 118 | .Xr ASN1_TYPE_set 3 . | 159 | .Xr ASN1_TYPE_set 3 . |
| 119 | All the supplied parameters are used internally so must | 160 | All the supplied parameters are used internally so must |
| @@ -124,18 +165,16 @@ be freed after this call. | |||
| 124 | is the inverse of | 165 | is the inverse of |
| 125 | .Fn X509_ALGOR_set0 : | 166 | .Fn X509_ALGOR_set0 : |
| 126 | it returns the algorithm OID in | 167 | it returns the algorithm OID in |
| 127 | .Sy *paobj | 168 | .Pf * Fa paobj |
| 128 | and the associated parameter in | 169 | and the associated parameter in |
| 129 | .Sy *pptype | 170 | .Pf * Fa pptype |
| 130 | and | 171 | and |
| 131 | .Sy *ppval | 172 | .Pf * Fa ppval |
| 132 | from the | 173 | from |
| 133 | .Sy AlgorithmIdentifier | ||
| 134 | .Fa alg . | 174 | .Fa alg . |
| 135 | .Pp | 175 | .Pp |
| 136 | .Fn X509_ALGOR_set_md | 176 | .Fn X509_ALGOR_set_md |
| 137 | sets the | 177 | sets |
| 138 | .Sy AlgorithmIdentifier | ||
| 139 | .Fa alg | 178 | .Fa alg |
| 140 | to appropriate values for the message digest | 179 | to appropriate values for the message digest |
| 141 | .Fa md . | 180 | .Fa md . |
| @@ -144,5 +183,30 @@ to appropriate values for the message digest | |||
| 144 | compares | 183 | compares |
| 145 | .Fa a | 184 | .Fa a |
| 146 | and | 185 | and |
| 186 | .Fa b . | ||
| 187 | .Sh RETURN VALUES | ||
| 188 | .Fn X509_ALGOR_new | ||
| 189 | and | ||
| 190 | .Fn X509_ALGOR_dup | ||
| 191 | return a new | ||
| 192 | .Vt X509_ALGOR | ||
| 193 | object or | ||
| 194 | .Dv NULL | ||
| 195 | if an error occurs. | ||
| 196 | .Pp | ||
| 197 | .Fn X509_ALGOR_set0 | ||
| 198 | returns 1 for success or 0 for failure. | ||
| 199 | .Pp | ||
| 200 | .Fn X509_ALGOR_cmp | ||
| 201 | returns 0 if | ||
| 202 | .Fa a | ||
| 203 | and | ||
| 147 | .Fa b | 204 | .Fa b |
| 148 | and returns 0 if they have identical encodings and non-zero otherwise. | 205 | have identical encodings or non-zero otherwise. |
| 206 | .Sh SEE ALSO | ||
| 207 | .Xr ASN1_TYPE_set 3 , | ||
| 208 | .Xr d2i_X509_ALGOR 3 , | ||
| 209 | .Xr X509_PUBKEY_get0_param 3 | ||
| 210 | .Sh STANDARDS | ||
| 211 | RFC 5280: Internet X.509 Public Key Infrastructure Certificate and | ||
| 212 | Certificate Revocation List (CRL) Profile | ||
