summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2018-02-15 12:52:37 +0000
committerschwarze <schwarze@openbsd.org>2018-02-15 12:52:37 +0000
commit3d0df02f879d52542728f3fead45ab5ad884b760 (patch)
treefd2e3c647db8d6cf56d5bc43e56a84514164d99c
parentImport the new manual page EVP_PKEY_asn1_get_count(3) from OpenSSL, (diff)
downloadwireguard-openbsd-3d0df02f879d52542728f3fead45ab5ad884b760.tar.xz
wireguard-openbsd-3d0df02f879d52542728f3fead45ab5ad884b760.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.
-rw-r--r--lib/libcrypto/man/EVP_PKEY_decrypt.318
-rw-r--r--lib/libcrypto/man/EVP_PKEY_derive.314
-rw-r--r--lib/libcrypto/man/EVP_PKEY_keygen.317
-rw-r--r--lib/libcrypto/man/EVP_PKEY_verify.321
-rw-r--r--lib/libcrypto/man/EVP_PKEY_verify_recover.316
5 files changed, 51 insertions, 35 deletions
diff --git a/lib/libcrypto/man/EVP_PKEY_decrypt.3 b/lib/libcrypto/man/EVP_PKEY_decrypt.3
index 485fafb5380..afba8976f1e 100644
--- a/lib/libcrypto/man/EVP_PKEY_decrypt.3
+++ b/lib/libcrypto/man/EVP_PKEY_decrypt.3
@@ -1,8 +1,9 @@
-.\" $OpenBSD: EVP_PKEY_decrypt.3,v 1.4 2016/11/27 15:27:19 schwarze Exp $
-.\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
+.\" $OpenBSD: EVP_PKEY_decrypt.3,v 1.5 2018/02/15 12:52:37 schwarze Exp $
+.\" full merge up to: OpenSSL 48e5119a Jan 19 10:49:22 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
-.\" Copyright (c) 2006, 2009, 2013 The OpenSSL Project. All rights reserved.
+.\" Copyright (c) 2006, 2009, 2013, 2018 The OpenSSL Project.
+.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -48,7 +49,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: November 27 2016 $
+.Dd $Mdocdate: February 15 2018 $
.Dt EVP_PKEY_DECRYPT 3
.Os
.Sh NAME
@@ -129,13 +130,16 @@ Decrypt data using OAEP (for RSA keys):
#include <openssl/rsa.h>
EVP_PKEY_CTX *ctx;
+ENGINE *eng;
unsigned char *out, *in;
size_t outlen, inlen;
EVP_PKEY *key;
-/* NB: assumes key in, inlen are already set up
- * and that key is an RSA private key
+
+/*
+ * Assumes that key, eng, in, and inlen are already set up
+ * and that key is an RSA private key.
*/
-ctx = EVP_PKEY_CTX_new(key);
+ctx = EVP_PKEY_CTX_new(key, eng);
if (!ctx)
/* Error occurred */
if (EVP_PKEY_decrypt_init(ctx) <= 0)
diff --git a/lib/libcrypto/man/EVP_PKEY_derive.3 b/lib/libcrypto/man/EVP_PKEY_derive.3
index b8c4c4d610d..61fc1bced8e 100644
--- a/lib/libcrypto/man/EVP_PKEY_derive.3
+++ b/lib/libcrypto/man/EVP_PKEY_derive.3
@@ -1,8 +1,9 @@
-.\" $OpenBSD: EVP_PKEY_derive.3,v 1.5 2017/04/10 17:45:06 schwarze Exp $
-.\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
+.\" $OpenBSD: EVP_PKEY_derive.3,v 1.6 2018/02/15 12:52:37 schwarze Exp $
+.\" full merge up to: OpenSSL 48e5119a Jan 19 10:49:22 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
-.\" Copyright (c) 2006, 2009, 2013 The OpenSSL Project. All rights reserved.
+.\" Copyright (c) 2006, 2009, 2013, 2018 The OpenSSL Project.
+.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -48,7 +49,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: April 10 2017 $
+.Dd $Mdocdate: February 15 2018 $
.Dt EVP_PKEY_DERIVE 3
.Os
.Sh NAME
@@ -132,12 +133,13 @@ Derive shared secret (for example DH or EC keys):
#include <openssl/rsa.h>
EVP_PKEY_CTX *ctx;
+ENGINE *eng;
unsigned char *skey;
size_t skeylen;
EVP_PKEY *pkey, *peerkey;
-/* NB: assumes pkey, peerkey have been already set up */
-ctx = EVP_PKEY_CTX_new(pkey);
+/* Assumes that pkey, eng, and peerkey have already been set up. */
+ctx = EVP_PKEY_CTX_new(pkey, eng);
if (!ctx)
/* Error occurred */
if (EVP_PKEY_derive_init(ctx) <= 0)
diff --git a/lib/libcrypto/man/EVP_PKEY_keygen.3 b/lib/libcrypto/man/EVP_PKEY_keygen.3
index a05e19f80e5..ded45b33026 100644
--- a/lib/libcrypto/man/EVP_PKEY_keygen.3
+++ b/lib/libcrypto/man/EVP_PKEY_keygen.3
@@ -1,8 +1,10 @@
-.\" $OpenBSD: EVP_PKEY_keygen.3,v 1.6 2017/08/01 14:57:03 schwarze Exp $
-.\" OpenSSL 99d63d466 Oct 26 13:56:48 2016 -0400
+.\" $OpenBSD: EVP_PKEY_keygen.3,v 1.7 2018/02/15 12:52:37 schwarze Exp $
+.\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
+.\" selective merge up to: OpenSSL 48e5119a Jan 19 10:49:22 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
-.\" Copyright (c) 2006, 2009, 2013, 2015, 2016 The OpenSSL Project. All rights reserved.
+.\" Copyright (c) 2006, 2009, 2013, 2015, 2016, 2018 The OpenSSL Project.
+.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -48,7 +50,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: August 1 2017 $
+.Dd $Mdocdate: February 15 2018 $
.Dt EVP_PKEY_KEYGEN 3
.Os
.Sh NAME
@@ -215,6 +217,7 @@ Generate a 2048-bit RSA key:
EVP_PKEY_CTX *ctx;
EVP_PKEY *pkey = NULL;
+
ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA, NULL);
if (!ctx)
/* Error occurred */
@@ -234,9 +237,11 @@ Generate a key from a set of parameters:
#include <openssl/rsa.h>
EVP_PKEY_CTX *ctx;
+ENGINE *eng;
EVP_PKEY *pkey = NULL, *param;
-/* Assumed param is set up already */
-ctx = EVP_PKEY_CTX_new(param);
+
+/* Assumes that param and eng are already set up. */
+ctx = EVP_PKEY_CTX_new(param, eng);
if (!ctx)
/* Error occurred */
if (EVP_PKEY_keygen_init(ctx) <= 0)
diff --git a/lib/libcrypto/man/EVP_PKEY_verify.3 b/lib/libcrypto/man/EVP_PKEY_verify.3
index b1739b2faa4..97c0a68cd89 100644
--- a/lib/libcrypto/man/EVP_PKEY_verify.3
+++ b/lib/libcrypto/man/EVP_PKEY_verify.3
@@ -1,8 +1,8 @@
-.\" $OpenBSD: EVP_PKEY_verify.3,v 1.4 2016/11/27 15:27:19 schwarze Exp $
-.\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
+.\" $OpenBSD: EVP_PKEY_verify.3,v 1.5 2018/02/15 12:52:37 schwarze Exp $
+.\" full merge up to: OpenSSL 48e5119a Jan 19 10:49:22 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
-.\" Copyright (c) 2006, 2009, 2010, 2013 The OpenSSL Project.
+.\" Copyright (c) 2006, 2009, 2010, 2013, 2018 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -49,7 +49,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: November 27 2016 $
+.Dd $Mdocdate: February 15 2018 $
.Dt EVP_PKEY_VERIFY 3
.Os
.Sh NAME
@@ -129,10 +129,12 @@ EVP_PKEY_CTX *ctx;
unsigned char *md, *sig;
size_t mdlen, siglen;
EVP_PKEY *verify_key;
-/* NB: assumes verify_key, sig, siglen md and mdlen are already set up
- * and that verify_key is an RSA public key
+
+/*
+ * Assumes that verify_key, sig, siglen, md, and mdlen are already set up
+ * and that verify_key is an RSA public key.
*/
-ctx = EVP_PKEY_CTX_new(verify_key);
+ctx = EVP_PKEY_CTX_new(verify_key, NULL);
if (!ctx)
/* Error occurred */
if (EVP_PKEY_verify_init(ctx) <= 0)
@@ -145,8 +147,9 @@ if (EVP_PKEY_CTX_set_signature_md(ctx, EVP_sha256()) <= 0)
/* Perform operation */
ret = EVP_PKEY_verify(ctx, sig, siglen, md, mdlen);
-/* ret == 1 indicates success, 0 verify failure and < 0 for some
- * other error.
+/*
+ * ret == 1 indicates success, 0 verify failure,
+ * and < 0 some other error.
*/
.Ed
.Sh SEE ALSO
diff --git a/lib/libcrypto/man/EVP_PKEY_verify_recover.3 b/lib/libcrypto/man/EVP_PKEY_verify_recover.3
index ae3eb0ef140..c453aa747ec 100644
--- a/lib/libcrypto/man/EVP_PKEY_verify_recover.3
+++ b/lib/libcrypto/man/EVP_PKEY_verify_recover.3
@@ -1,8 +1,8 @@
-.\" $OpenBSD: EVP_PKEY_verify_recover.3,v 1.6 2017/01/06 02:43:14 schwarze Exp $
-.\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
+.\" $OpenBSD: EVP_PKEY_verify_recover.3,v 1.7 2018/02/15 12:52:37 schwarze Exp $
+.\" full merge up to: OpenSSL 48e5119a Jan 19 10:49:22 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
-.\" Copyright (c) 2006, 2009, 2010, 2013 The OpenSSL Project.
+.\" Copyright (c) 2006, 2009, 2010, 2013, 2018 The OpenSSL Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -49,7 +49,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: January 6 2017 $
+.Dd $Mdocdate: February 15 2018 $
.Dt EVP_PKEY_VERIFY_RECOVER 3
.Os
.Sh NAME
@@ -144,10 +144,12 @@ EVP_PKEY_CTX *ctx;
unsigned char *rout, *sig;
size_t routlen, siglen;
EVP_PKEY *verify_key;
-/* NB: assumes verify_key, sig and siglen are already set up
- * and that verify_key is an RSA public key
+
+/*
+ * Assumes that verify_key, sig, and siglen are already set up
+ * and that verify_key is an RSA public key.
*/
-ctx = EVP_PKEY_CTX_new(verify_key);
+ctx = EVP_PKEY_CTX_new(verify_key, NULL);
if (!ctx)
/* Error occurred */
if (EVP_PKEY_verify_recover_init(ctx) <= 0)