diff options
Diffstat (limited to 'src/lib/libcrypto/man/EVP_PKEY_asn1_get_count.3')
| -rw-r--r-- | src/lib/libcrypto/man/EVP_PKEY_asn1_get_count.3 | 202 |
1 files changed, 0 insertions, 202 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_asn1_get_count.3 b/src/lib/libcrypto/man/EVP_PKEY_asn1_get_count.3 deleted file mode 100644 index c14420ba5d..0000000000 --- a/src/lib/libcrypto/man/EVP_PKEY_asn1_get_count.3 +++ /dev/null | |||
| @@ -1,202 +0,0 @@ | |||
| 1 | .\" $OpenBSD: EVP_PKEY_asn1_get_count.3,v 1.5 2020/06/24 19:55:54 schwarze Exp $ | ||
| 2 | .\" full merge up to: OpenSSL 72a7a702 Feb 26 14:05:09 2019 +0000 | ||
| 3 | .\" | ||
| 4 | .\" This file is a derived work. | ||
| 5 | .\" The changes are covered by the following Copyright and license: | ||
| 6 | .\" | ||
| 7 | .\" Copyright (c) 2020 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 Richard Levitte <levitte@openssl.org>. | ||
| 22 | .\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. | ||
| 23 | .\" | ||
| 24 | .\" Redistribution and use in source and binary forms, with or without | ||
| 25 | .\" modification, are permitted provided that the following conditions | ||
| 26 | .\" are met: | ||
| 27 | .\" | ||
| 28 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 29 | .\" notice, this list of conditions and the following disclaimer. | ||
| 30 | .\" | ||
| 31 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 32 | .\" notice, this list of conditions and the following disclaimer in | ||
| 33 | .\" the documentation and/or other materials provided with the | ||
| 34 | .\" distribution. | ||
| 35 | .\" | ||
| 36 | .\" 3. All advertising materials mentioning features or use of this | ||
| 37 | .\" software must display the following acknowledgment: | ||
| 38 | .\" "This product includes software developed by the OpenSSL Project | ||
| 39 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 40 | .\" | ||
| 41 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 42 | .\" endorse or promote products derived from this software without | ||
| 43 | .\" prior written permission. For written permission, please contact | ||
| 44 | .\" openssl-core@openssl.org. | ||
| 45 | .\" | ||
| 46 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
| 47 | .\" nor may "OpenSSL" appear in their names without prior written | ||
| 48 | .\" permission of the OpenSSL Project. | ||
| 49 | .\" | ||
| 50 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
| 51 | .\" acknowledgment: | ||
| 52 | .\" "This product includes software developed by the OpenSSL Project | ||
| 53 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 54 | .\" | ||
| 55 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 56 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 57 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 58 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 59 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 60 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 61 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 62 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 63 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 64 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 67 | .\" | ||
| 68 | .Dd $Mdocdate: June 24 2020 $ | ||
| 69 | .Dt EVP_PKEY_ASN1_GET_COUNT 3 | ||
| 70 | .Os | ||
| 71 | .Sh NAME | ||
| 72 | .Nm EVP_PKEY_asn1_get_count , | ||
| 73 | .Nm EVP_PKEY_asn1_get0 , | ||
| 74 | .Nm EVP_PKEY_get0_asn1 , | ||
| 75 | .Nm EVP_PKEY_asn1_find , | ||
| 76 | .Nm EVP_PKEY_asn1_find_str , | ||
| 77 | .Nm EVP_PKEY_asn1_get0_info | ||
| 78 | .Nd enumerate public key ASN.1 methods | ||
| 79 | .Sh SYNOPSIS | ||
| 80 | .In openssl/evp.h | ||
| 81 | .Ft int | ||
| 82 | .Fn EVP_PKEY_asn1_get_count void | ||
| 83 | .Ft const EVP_PKEY_ASN1_METHOD * | ||
| 84 | .Fo EVP_PKEY_asn1_get0 | ||
| 85 | .Fa "int idx" | ||
| 86 | .Fc | ||
| 87 | .Ft const EVP_PKEY_ASN1_METHOD * | ||
| 88 | .Fo EVP_PKEY_get0_asn1 | ||
| 89 | .Fa "const EVP_PKEY *pkey" | ||
| 90 | .Fc | ||
| 91 | .Ft const EVP_PKEY_ASN1_METHOD * | ||
| 92 | .Fo EVP_PKEY_asn1_find | ||
| 93 | .Fa "ENGINE **pe" | ||
| 94 | .Fa "int type" | ||
| 95 | .Fc | ||
| 96 | .Ft const EVP_PKEY_ASN1_METHOD * | ||
| 97 | .Fo EVP_PKEY_asn1_find_str | ||
| 98 | .Fa "ENGINE **pe" | ||
| 99 | .Fa "const char *str" | ||
| 100 | .Fa "int len" | ||
| 101 | .Fc | ||
| 102 | .Ft int | ||
| 103 | .Fo EVP_PKEY_asn1_get0_info | ||
| 104 | .Fa "int *ppkey_id" | ||
| 105 | .Fa "int *pkey_base_id" | ||
| 106 | .Fa "int *ppkey_flags" | ||
| 107 | .Fa "const char **pinfo" | ||
| 108 | .Fa "const char **ppem_str" | ||
| 109 | .Fa "const EVP_PKEY_ASN1_METHOD *ameth" | ||
| 110 | .Fc | ||
| 111 | .Sh DESCRIPTION | ||
| 112 | .Fn EVP_PKEY_asn1_get_count | ||
| 113 | returns the number of public key ASN.1 methods available. | ||
| 114 | It includes standard methods and any methods added by the application. | ||
| 115 | .Pp | ||
| 116 | .Fn EVP_PKEY_asn1_get0 | ||
| 117 | returns the public key ASN.1 method | ||
| 118 | .Fa idx . | ||
| 119 | The value of | ||
| 120 | .Fa idx | ||
| 121 | must be in the range from zero to | ||
| 122 | .Fn EVP_PKEY_asn1_get_count | ||
| 123 | \- 1. | ||
| 124 | .Pp | ||
| 125 | .Fn EVP_PKEY_asn1_find | ||
| 126 | looks up the method with NID | ||
| 127 | .Fa type , | ||
| 128 | which can be any of the values that | ||
| 129 | .Xr EVP_PKEY_base_id 3 | ||
| 130 | and | ||
| 131 | .Xr EVP_PKEY_id 3 | ||
| 132 | may return. | ||
| 133 | If | ||
| 134 | .Fa pe | ||
| 135 | is not | ||
| 136 | .Dv NULL , | ||
| 137 | it first looks for an engine implementing a method for the NID | ||
| 138 | .Fa type . | ||
| 139 | If one is found, | ||
| 140 | .Pf * Fa pe | ||
| 141 | is set to that engine and the method from that engine is returned instead. | ||
| 142 | .Pp | ||
| 143 | .Fn EVP_PKEY_asn1_find_str | ||
| 144 | looks up the method with PEM type string | ||
| 145 | .Fa str . | ||
| 146 | The PEM type strings supported by default are listed in the | ||
| 147 | .Xr EVP_PKEY_base_id 3 | ||
| 148 | manual page. | ||
| 149 | Just like | ||
| 150 | .Fn EVP_PKEY_asn1_find , | ||
| 151 | if | ||
| 152 | .Fa pe | ||
| 153 | is not | ||
| 154 | .Dv NULL , | ||
| 155 | methods from engines are preferred. | ||
| 156 | .Pp | ||
| 157 | .Fn EVP_PKEY_asn1_get0_info | ||
| 158 | retrieves the public key ID as returned by | ||
| 159 | .Xr EVP_PKEY_id 3 , | ||
| 160 | the base public key ID as returned by | ||
| 161 | .Xr EVP_PKEY_base_id 3 | ||
| 162 | .Pq both NIDs , | ||
| 163 | any flags, the method description, | ||
| 164 | and the PEM type string associated with | ||
| 165 | .Fa ameth . | ||
| 166 | .Pp | ||
| 167 | .Fn EVP_PKEY_asn1_get_count , | ||
| 168 | .Fn EVP_PKEY_asn1_get0 , | ||
| 169 | .Fn EVP_PKEY_asn1_find | ||
| 170 | and | ||
| 171 | .Fn EVP_PKEY_asn1_find_str | ||
| 172 | are not thread safe, but as long as all | ||
| 173 | .Vt EVP_PKEY_ASN1_METHOD | ||
| 174 | objects are added before the application gets threaded, using them is | ||
| 175 | safe. | ||
| 176 | See | ||
| 177 | .Xr EVP_PKEY_asn1_add0 3 . | ||
| 178 | .Sh RETURN VALUES | ||
| 179 | .Fn EVP_PKEY_asn1_get_count | ||
| 180 | returns the number of available public key methods. | ||
| 181 | .Pp | ||
| 182 | .Fn EVP_PKEY_asn1_get0 | ||
| 183 | returns a public key method or | ||
| 184 | .Dv NULL | ||
| 185 | if | ||
| 186 | .Fa idx | ||
| 187 | is out of range. | ||
| 188 | .Pp | ||
| 189 | .Fn EVP_PKEY_get0_asn1 | ||
| 190 | returns the public key method used by | ||
| 191 | .Fa pkey . | ||
| 192 | .Pp | ||
| 193 | .Fn EVP_PKEY_asn1_get0_info | ||
| 194 | returns 1 on success or 0 on failure. | ||
| 195 | .Sh SEE ALSO | ||
| 196 | .Xr EVP_PKEY_asn1_new 3 , | ||
| 197 | .Xr EVP_PKEY_base_id 3 , | ||
| 198 | .Xr EVP_PKEY_new 3 | ||
| 199 | .Sh HISTORY | ||
| 200 | These functions first appeared in OpenSSL 1.0.0 | ||
| 201 | and have been available since | ||
| 202 | .Ox 4.9 . | ||
