summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorschwarze <>2018-12-22 23:19:53 +0000
committerschwarze <>2018-12-22 23:19:53 +0000
commitdb4fe5dd19e962e5ea25c1740ae50fa5e2573348 (patch)
tree243438e001f6a4b032aedf99bc0a2257268c6315 /src
parentffdcbe28f5f0aaabcc52bd82b81dd20c45ad3f2b (diff)
downloadopenbsd-db4fe5dd19e962e5ea25c1740ae50fa5e2573348.tar.gz
openbsd-db4fe5dd19e962e5ea25c1740ae50fa5e2573348.tar.bz2
openbsd-db4fe5dd19e962e5ea25c1740ae50fa5e2573348.zip
Document EVP_PKEY_new_mac_key(3);
from Matt Caswell <matt at openssl dot org> via OpenSSL commit d45a97f4 Mar 5 17:41:49 2018 +0000.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/EVP_PKEY_new.358
1 files changed, 50 insertions, 8 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_new.3 b/src/lib/libcrypto/man/EVP_PKEY_new.3
index fade3d5cd2..777c108d83 100644
--- a/src/lib/libcrypto/man/EVP_PKEY_new.3
+++ b/src/lib/libcrypto/man/EVP_PKEY_new.3
@@ -1,8 +1,10 @@
1.\" $OpenBSD: EVP_PKEY_new.3,v 1.8 2018/03/27 17:35:50 schwarze Exp $ 1.\" $OpenBSD: EVP_PKEY_new.3,v 1.9 2018/12/22 23:19:53 schwarze Exp $
2.\" full merge up to: OpenSSL 99d63d42 Oct 26 13:56:48 2016 -0400 2.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
3.\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
3.\" 4.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 5.\" This file was written by Dr. Stephen Henson <steve@openssl.org>
5.\" Copyright (c) 2002 The OpenSSL Project. All rights reserved. 6.\" and Matt Caswell <matt@openssl.org>.
7.\" Copyright (c) 2002, 2018 The OpenSSL Project. All rights reserved.
6.\" 8.\"
7.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
@@ -48,13 +50,14 @@
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 50.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 51.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 52.\"
51.Dd $Mdocdate: March 27 2018 $ 53.Dd $Mdocdate: December 22 2018 $
52.Dt EVP_PKEY_NEW 3 54.Dt EVP_PKEY_NEW 3
53.Os 55.Os
54.Sh NAME 56.Sh NAME
55.Nm EVP_PKEY_new , 57.Nm EVP_PKEY_new ,
56.Nm EVP_PKEY_up_ref , 58.Nm EVP_PKEY_up_ref ,
57.Nm EVP_PKEY_free 59.Nm EVP_PKEY_free ,
60.Nm EVP_PKEY_new_mac_key
58.Nd private key allocation functions 61.Nd private key allocation functions
59.Sh SYNOPSIS 62.Sh SYNOPSIS
60.In openssl/evp.h 63.In openssl/evp.h
@@ -68,6 +71,13 @@
68.Fo EVP_PKEY_free 71.Fo EVP_PKEY_free
69.Fa "EVP_PKEY *key" 72.Fa "EVP_PKEY *key"
70.Fc 73.Fc
74.Ft EVP_PKEY *
75.Fo EVP_PKEY_new_mac_key
76.Fa "int type"
77.Fa "ENGINE *e"
78.Fa "const unsigned char *key"
79.Fa "int keylen"
80.Fc
71.Sh DESCRIPTION 81.Sh DESCRIPTION
72The 82The
73.Vt EVP_PKEY 83.Vt EVP_PKEY
@@ -80,7 +90,7 @@ function allocates an empty
80.Vt EVP_PKEY 90.Vt EVP_PKEY
81structure. 91structure.
82The reference count is set to 1. 92The reference count is set to 1.
83To add a private key to it, use the functions described in 93To add a private or public key to it, use the functions described in
84.Xr EVP_PKEY_set1_RSA 3 . 94.Xr EVP_PKEY_set1_RSA 3 .
85.Pp 95.Pp
86.Fn EVP_PKEY_up_ref 96.Fn EVP_PKEY_up_ref
@@ -97,9 +107,37 @@ If
97is a 107is a
98.Dv NULL 108.Dv NULL
99pointer, no action occurs. 109pointer, no action occurs.
110.Pp
111.Fn EVP_PKEY_new_mac_key
112allocates a new
113.Vt EVP_PKEY .
114If
115.Fa e
116is
117.Pf non- Dv NULL ,
118then the new
119.Vt EVP_PKEY
120structure is associated with the engine
121.Fa e .
122The
123.Fa type
124argument indicates what kind of key this is.
125The value should be a NID for a public key algorithm that supports
126raw private keys, for example
127.Dv EVP_PKEY_HMAC .
128.Fa key
129points to the raw private key data for this
130.Vt EVP_PKEY
131which should be of length
132.Fa keylen .
133The length should be appropriate for the type of the key.
134The public key data will be automatically derived from the given
135private key data (if appropriate for the algorithm type).
100.Sh RETURN VALUES 136.Sh RETURN VALUES
101.Fn EVP_PKEY_new 137.Fn EVP_PKEY_new
102returns either the newly allocated 138and
139.Fn EVP_PKEY_new_mac_key
140return either the newly allocated
103.Vt EVP_PKEY 141.Vt EVP_PKEY
104structure or 142structure or
105.Dv NULL 143.Dv NULL
@@ -117,6 +155,10 @@ and
117first appeared in SSLeay 0.6.0 and have been available since 155first appeared in SSLeay 0.6.0 and have been available since
118.Ox 2.4 . 156.Ox 2.4 .
119.Pp 157.Pp
158.Fn EVP_PKEY_new_mac_key
159first appeared in OpenSSL 1.0.0 and has been available since
160.Ox 4.9 .
161.Pp
120.Fn EVP_PKEY_up_ref 162.Fn EVP_PKEY_up_ref
121first appeared in OpenSSL 1.1.0 and has been available since 163first appeared in OpenSSL 1.1.0 and has been available since
122.Ox 6.3 . 164.Ox 6.3 .