diff options
| -rw-r--r-- | src/lib/libcrypto/man/EVP_PKEY_asn1_get_count.3 | 159 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/Makefile | 3 |
2 files changed, 161 insertions, 1 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 new file mode 100644 index 0000000000..df3d271bf6 --- /dev/null +++ b/src/lib/libcrypto/man/EVP_PKEY_asn1_get_count.3 | |||
| @@ -0,0 +1,159 @@ | |||
| 1 | .\" $OpenBSD: EVP_PKEY_asn1_get_count.3,v 1.1 2018/02/15 12:09:55 schwarze Exp $ | ||
| 2 | .\" full merge up to: OpenSSL 751148e2 Oct 27 00:11:11 2017 +0200 | ||
| 3 | .\" | ||
| 4 | .\" This file was written by Richard Levitte <levitte@openssl.org>. | ||
| 5 | .\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. | ||
| 6 | .\" | ||
| 7 | .\" Redistribution and use in source and binary forms, with or without | ||
| 8 | .\" modification, are permitted provided that the following conditions | ||
| 9 | .\" are met: | ||
| 10 | .\" | ||
| 11 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 12 | .\" notice, this list of conditions and the following disclaimer. | ||
| 13 | .\" | ||
| 14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 15 | .\" notice, this list of conditions and the following disclaimer in | ||
| 16 | .\" the documentation and/or other materials provided with the | ||
| 17 | .\" distribution. | ||
| 18 | .\" | ||
| 19 | .\" 3. All advertising materials mentioning features or use of this | ||
| 20 | .\" software must display the following acknowledgment: | ||
| 21 | .\" "This product includes software developed by the OpenSSL Project | ||
| 22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 23 | .\" | ||
| 24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 25 | .\" endorse or promote products derived from this software without | ||
| 26 | .\" prior written permission. For written permission, please contact | ||
| 27 | .\" openssl-core@openssl.org. | ||
| 28 | .\" | ||
| 29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
| 30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
| 31 | .\" permission of the OpenSSL Project. | ||
| 32 | .\" | ||
| 33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
| 34 | .\" acknowledgment: | ||
| 35 | .\" "This product includes software developed by the OpenSSL Project | ||
| 36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 37 | .\" | ||
| 38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 50 | .\" | ||
| 51 | .Dd $Mdocdate: February 15 2018 $ | ||
| 52 | .Dt EVP_PKEY_ASN1_GET_COUNT 3 | ||
| 53 | .Os | ||
| 54 | .Sh NAME | ||
| 55 | .Nm EVP_PKEY_asn1_get_count , | ||
| 56 | .Nm EVP_PKEY_asn1_get0 , | ||
| 57 | .Nm EVP_PKEY_asn1_find , | ||
| 58 | .Nm EVP_PKEY_asn1_find_str , | ||
| 59 | .Nm EVP_PKEY_asn1_get0_info | ||
| 60 | .Nd enumerate public key ASN.1 methods | ||
| 61 | .Sh SYNOPSIS | ||
| 62 | .In openssl/evp.h | ||
| 63 | .Ft int | ||
| 64 | .Fn EVP_PKEY_asn1_get_count void | ||
| 65 | .Ft const EVP_PKEY_ASN1_METHOD * | ||
| 66 | .Fo EVP_PKEY_asn1_get0 | ||
| 67 | .Fa "int idx" | ||
| 68 | .Fc | ||
| 69 | .Ft const EVP_PKEY_ASN1_METHOD * | ||
| 70 | .Fo EVP_PKEY_asn1_find | ||
| 71 | .Fa "ENGINE **pe" | ||
| 72 | .Fa "int type" | ||
| 73 | .Fc | ||
| 74 | .Ft const EVP_PKEY_ASN1_METHOD * | ||
| 75 | .Fo EVP_PKEY_asn1_find_str | ||
| 76 | .Fa "ENGINE **pe" | ||
| 77 | .Fa "const char *str" | ||
| 78 | .Fa "int len" | ||
| 79 | .Fc | ||
| 80 | .Ft int | ||
| 81 | .Fo EVP_PKEY_asn1_get0_info | ||
| 82 | .Fa "int *ppkey_id" | ||
| 83 | .Fa "int *pkey_base_id" | ||
| 84 | .Fa "int *ppkey_flags" | ||
| 85 | .Fa "const char **pinfo" | ||
| 86 | .Fa "const char **ppem_str" | ||
| 87 | .Fa "const EVP_PKEY_ASN1_METHOD *ameth" | ||
| 88 | .Fc | ||
| 89 | .Sh DESCRIPTION | ||
| 90 | .Fn EVP_PKEY_asn1_get_count | ||
| 91 | returns a count of the number of public key ASN.1 methods available. | ||
| 92 | It includes standard methods and any methods added by the application. | ||
| 93 | .Pp | ||
| 94 | .Fn EVP_PKEY_asn1_get0 | ||
| 95 | returns the public key ASN.1 method | ||
| 96 | .Fa idx . | ||
| 97 | The value of | ||
| 98 | .Fa idx | ||
| 99 | must be in the range from zero to | ||
| 100 | .Fn EVP_PKEY_asn1_get_count | ||
| 101 | \- 1. | ||
| 102 | .Pp | ||
| 103 | .Fn EVP_PKEY_asn1_find | ||
| 104 | looks up the method with NID | ||
| 105 | .Fa type . | ||
| 106 | If | ||
| 107 | .Fa pe | ||
| 108 | is not | ||
| 109 | .Dv NULL , | ||
| 110 | it first looks for an engine implementing a method for the NID | ||
| 111 | .Fa type . | ||
| 112 | If one is found, | ||
| 113 | .Pf * Fa pe | ||
| 114 | is set to that engine and the method from that engine is returned instead. | ||
| 115 | .Pp | ||
| 116 | .Fn EVP_PKEY_asn1_find_str | ||
| 117 | looks up the method with PEM type string | ||
| 118 | .Fa str . | ||
| 119 | Just like | ||
| 120 | .Fn EVP_PKEY_asn1_find , | ||
| 121 | if | ||
| 122 | .Fa pe | ||
| 123 | is not | ||
| 124 | .Dv NULL , | ||
| 125 | methods from engines are preferred. | ||
| 126 | .Pp | ||
| 127 | .Fn EVP_PKEY_asn1_get0_info | ||
| 128 | retrieves the public key ID, the base public key ID (both NIDs), any flags, | ||
| 129 | the method description and the PEM type string associated with the public | ||
| 130 | key ASN.1 method | ||
| 131 | .Sy *ameth . | ||
| 132 | .Pp | ||
| 133 | .Fn EVP_PKEY_asn1_get_count , | ||
| 134 | .Fn EVP_PKEY_asn1_get0 , | ||
| 135 | .Fn EVP_PKEY_asn1_find | ||
| 136 | and | ||
| 137 | .Fn EVP_PKEY_asn1_find_str | ||
| 138 | are not thread safe, but as long as all | ||
| 139 | .Vt EVP_PKEY_ASN1_METHOD | ||
| 140 | objects are added before the application gets threaded, using them is | ||
| 141 | safe. | ||
| 142 | See | ||
| 143 | .Xr EVP_PKEY_asn1_add0 3 . | ||
| 144 | .Sh RETURN VALUES | ||
| 145 | .Fn EVP_PKEY_asn1_get_count | ||
| 146 | returns the number of available public key methods. | ||
| 147 | .Pp | ||
| 148 | .Fn EVP_PKEY_asn1_get0 | ||
| 149 | returns a public key method or | ||
| 150 | .Dv NULL | ||
| 151 | if | ||
| 152 | .Fa idx | ||
| 153 | is out of range. | ||
| 154 | .Pp | ||
| 155 | .Fn EVP_PKEY_asn1_get0_info | ||
| 156 | returns 1 on success or 0 on failure. | ||
| 157 | .Sh SEE ALSO | ||
| 158 | .Xr EVP_PKEY_asn1_add0 3 , | ||
| 159 | .Xr EVP_PKEY_asn1_new 3 | ||
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 50e8f70510..606f346588 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.127 2018/02/15 10:01:33 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.128 2018/02/15 12:09:55 schwarze Exp $ |
| 2 | 2 | ||
| 3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
| 4 | 4 | ||
| @@ -114,6 +114,7 @@ MAN= \ | |||
| 114 | EVP_EncryptInit.3 \ | 114 | EVP_EncryptInit.3 \ |
| 115 | EVP_OpenInit.3 \ | 115 | EVP_OpenInit.3 \ |
| 116 | EVP_PKEY_asn1_new.3 \ | 116 | EVP_PKEY_asn1_new.3 \ |
| 117 | EVP_PKEY_asn1_get_count.3 \ | ||
| 117 | EVP_PKEY_CTX_ctrl.3 \ | 118 | EVP_PKEY_CTX_ctrl.3 \ |
| 118 | EVP_PKEY_CTX_new.3 \ | 119 | EVP_PKEY_CTX_new.3 \ |
| 119 | EVP_PKEY_cmp.3 \ | 120 | EVP_PKEY_cmp.3 \ |
