diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/man/Makefile | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/X509_check_private_key.3 | 63 |
2 files changed, 65 insertions, 1 deletions
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 66144c8231..fa966f028e 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.123 2017/08/20 20:15:13 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.124 2017/08/20 23:18:53 schwarze Exp $ |
| 2 | 2 | ||
| 3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
| 4 | 4 | ||
| @@ -229,6 +229,7 @@ MAN= \ | |||
| 229 | X509_check_ca.3 \ | 229 | X509_check_ca.3 \ |
| 230 | X509_check_host.3 \ | 230 | X509_check_host.3 \ |
| 231 | X509_check_issued.3 \ | 231 | X509_check_issued.3 \ |
| 232 | X509_check_private_key.3 \ | ||
| 232 | X509_cmp_time.3 \ | 233 | X509_cmp_time.3 \ |
| 233 | X509_digest.3 \ | 234 | X509_digest.3 \ |
| 234 | X509_get_pubkey.3 \ | 235 | X509_get_pubkey.3 \ |
diff --git a/src/lib/libcrypto/man/X509_check_private_key.3 b/src/lib/libcrypto/man/X509_check_private_key.3 new file mode 100644 index 0000000000..76192fece4 --- /dev/null +++ b/src/lib/libcrypto/man/X509_check_private_key.3 | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | .\" $OpenBSD: X509_check_private_key.3,v 1.1 2017/08/20 23:18:53 schwarze Exp $ | ||
| 2 | .\" OpenSSL X509_check_private_key.pod 09ddb878 Jun 5 03:56:07 2017 +0800 | ||
| 3 | .\" | ||
| 4 | .\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org> | ||
| 5 | .\" | ||
| 6 | .\" Permission to use, copy, modify, and distribute this software for any | ||
| 7 | .\" purpose with or without fee is hereby granted, provided that the above | ||
| 8 | .\" copyright notice and this permission notice appear in all copies. | ||
| 9 | .\" | ||
| 10 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 11 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 12 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 13 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 14 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 15 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 16 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 17 | .\" | ||
| 18 | .Dd $Mdocdate: August 20 2017 $ | ||
| 19 | .Dt X509_CHECK_PRIVATE_KEY 3 | ||
| 20 | .Os | ||
| 21 | .Sh NAME | ||
| 22 | .Nm X509_check_private_key , | ||
| 23 | .Nm X509_REQ_check_private_key | ||
| 24 | .Nd compare public key components | ||
| 25 | .Sh SYNOPSIS | ||
| 26 | .In openssl/x509.h | ||
| 27 | .Ft int | ||
| 28 | .Fo X509_check_private_key | ||
| 29 | .Fa "X509 *x" | ||
| 30 | .Fa "EVP_PKEY *k" | ||
| 31 | .Fc | ||
| 32 | .Ft int | ||
| 33 | .Fo X509_REQ_check_private_key | ||
| 34 | .Fa "X509_REQ *x" | ||
| 35 | .Fa "EVP_PKEY *k" | ||
| 36 | .Fc | ||
| 37 | .Sh DESCRIPTION | ||
| 38 | These functions are seriously misnamed. | ||
| 39 | .Fn X509_check_private_key | ||
| 40 | compares the | ||
| 41 | .Em public | ||
| 42 | key components (e.g. exponent and modulus of an RSA key) | ||
| 43 | and parameters (e.g. EC params of an EC key) of | ||
| 44 | .Fa k | ||
| 45 | with the corresponding properties of | ||
| 46 | .Fa x . | ||
| 47 | Despite the name, it neither checks whether | ||
| 48 | .Fa k | ||
| 49 | contains private key components at all, nor, if any are present, | ||
| 50 | whether they are consistent with the public key components. | ||
| 51 | .Pp | ||
| 52 | .Fn X509_REQ_check_private_key | ||
| 53 | is equivalent to | ||
| 54 | .Fn X509_check_private_key | ||
| 55 | except that it compares to the public key | ||
| 56 | contained in a certificate request. | ||
| 57 | .Sh RETURN VALUES | ||
| 58 | These functions return 1 if the public key components and parameters | ||
| 59 | match, or 0 if they do not or if an error occurs. | ||
| 60 | On error or mismatch, a reason code can be obtained using | ||
| 61 | .Xr ERR_get_error 3 . | ||
| 62 | .Sh SEE ALSO | ||
| 63 | .Xr SSL_check_private_key 3 | ||
