diff options
author | schwarze <> | 2018-02-15 12:52:37 +0000 |
---|---|---|
committer | schwarze <> | 2018-02-15 12:52:37 +0000 |
commit | e1414da8fc5a02d747dccce1a23820b605221d28 (patch) | |
tree | 1f473242b82130c5298281067dbd9e244426e668 /src/lib/libcrypto/man/EVP_PKEY_verify.3 | |
parent | 910bd000d19583a217cb39aac0639505f0fabea2 (diff) | |
download | openbsd-e1414da8fc5a02d747dccce1a23820b605221d28.tar.gz openbsd-e1414da8fc5a02d747dccce1a23820b605221d28.tar.bz2 openbsd-e1414da8fc5a02d747dccce1a23820b605221d28.zip |
In some EXAMPLES, correct calls to EVP_PKEY_CTX_new(3) that
lacked an argument; from Jakub Jelen <jjelen at redhat dot com>
via OpenSSL commit 9db6673a Jan 17 19:23:37 2018 -0500.
Diffstat (limited to 'src/lib/libcrypto/man/EVP_PKEY_verify.3')
-rw-r--r-- | src/lib/libcrypto/man/EVP_PKEY_verify.3 | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_verify.3 b/src/lib/libcrypto/man/EVP_PKEY_verify.3 index b1739b2faa..97c0a68cd8 100644 --- a/src/lib/libcrypto/man/EVP_PKEY_verify.3 +++ b/src/lib/libcrypto/man/EVP_PKEY_verify.3 | |||
@@ -1,8 +1,8 @@ | |||
1 | .\" $OpenBSD: EVP_PKEY_verify.3,v 1.4 2016/11/27 15:27:19 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_PKEY_verify.3,v 1.5 2018/02/15 12:52:37 schwarze Exp $ |
2 | .\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 | 2 | .\" full merge up to: OpenSSL 48e5119a Jan 19 10:49:22 2018 +0100 |
3 | .\" | 3 | .\" |
4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | 4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. |
5 | .\" Copyright (c) 2006, 2009, 2010, 2013 The OpenSSL Project. | 5 | .\" Copyright (c) 2006, 2009, 2010, 2013, 2018 The OpenSSL Project. |
6 | .\" All rights reserved. | 6 | .\" All rights reserved. |
7 | .\" | 7 | .\" |
8 | .\" Redistribution and use in source and binary forms, with or without | 8 | .\" Redistribution and use in source and binary forms, with or without |
@@ -49,7 +49,7 @@ | |||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
51 | .\" | 51 | .\" |
52 | .Dd $Mdocdate: November 27 2016 $ | 52 | .Dd $Mdocdate: February 15 2018 $ |
53 | .Dt EVP_PKEY_VERIFY 3 | 53 | .Dt EVP_PKEY_VERIFY 3 |
54 | .Os | 54 | .Os |
55 | .Sh NAME | 55 | .Sh NAME |
@@ -129,10 +129,12 @@ EVP_PKEY_CTX *ctx; | |||
129 | unsigned char *md, *sig; | 129 | unsigned char *md, *sig; |
130 | size_t mdlen, siglen; | 130 | size_t mdlen, siglen; |
131 | EVP_PKEY *verify_key; | 131 | EVP_PKEY *verify_key; |
132 | /* NB: assumes verify_key, sig, siglen md and mdlen are already set up | 132 | |
133 | * and that verify_key is an RSA public key | 133 | /* |
134 | * Assumes that verify_key, sig, siglen, md, and mdlen are already set up | ||
135 | * and that verify_key is an RSA public key. | ||
134 | */ | 136 | */ |
135 | ctx = EVP_PKEY_CTX_new(verify_key); | 137 | ctx = EVP_PKEY_CTX_new(verify_key, NULL); |
136 | if (!ctx) | 138 | if (!ctx) |
137 | /* Error occurred */ | 139 | /* Error occurred */ |
138 | if (EVP_PKEY_verify_init(ctx) <= 0) | 140 | if (EVP_PKEY_verify_init(ctx) <= 0) |
@@ -145,8 +147,9 @@ if (EVP_PKEY_CTX_set_signature_md(ctx, EVP_sha256()) <= 0) | |||
145 | /* Perform operation */ | 147 | /* Perform operation */ |
146 | ret = EVP_PKEY_verify(ctx, sig, siglen, md, mdlen); | 148 | ret = EVP_PKEY_verify(ctx, sig, siglen, md, mdlen); |
147 | 149 | ||
148 | /* ret == 1 indicates success, 0 verify failure and < 0 for some | 150 | /* |
149 | * other error. | 151 | * ret == 1 indicates success, 0 verify failure, |
152 | * and < 0 some other error. | ||
150 | */ | 153 | */ |
151 | .Ed | 154 | .Ed |
152 | .Sh SEE ALSO | 155 | .Sh SEE ALSO |