summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2019-03-18 04:01:54 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2019-03-18 04:01:54 +0000
commitff2856931bbf9f1b25140368d05f7df44160811d (patch)
treeb06b3fcea7a13565ac27ffb7f7c95cd547a3bcae
parent097b20e75378f8c3d6ec2c4880cc01a55ad32e63 (diff)
In evp.h rev. 1.75, tb@ provided EVP_PKEY_get0_hmac(3).
Document it. Even though OpenSSL muddles the waters by lumping the description together with the other EVP_PKEY_get0_*() functions, describe it separately because a char * has no reference count and because the function fills in an additional length parameter.
-rw-r--r--lib/libcrypto/man/EVP_PKEY_set1_RSA.332
1 files changed, 29 insertions, 3 deletions
diff --git a/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 b/lib/libcrypto/man/EVP_PKEY_set1_RSA.3
index 1d79584b257..948bec4fb3a 100644
--- a/lib/libcrypto/man/EVP_PKEY_set1_RSA.3
+++ b/lib/libcrypto/man/EVP_PKEY_set1_RSA.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: EVP_PKEY_set1_RSA.3,v 1.14 2018/05/13 16:44:57 schwarze Exp $
+.\" $OpenBSD: EVP_PKEY_set1_RSA.3,v 1.15 2019/03/18 04:01:53 schwarze Exp $
.\" full merge up to: OpenSSL bb9ad09e Jun 6 00:43:05 2016 -0400
.\" selective merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
@@ -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: May 13 2018 $
+.Dd $Mdocdate: March 18 2019 $
.Dt EVP_PKEY_SET1_RSA 3
.Os
.Sh NAME
@@ -65,6 +65,7 @@
.Nm EVP_PKEY_get0_DSA ,
.Nm EVP_PKEY_get0_DH ,
.Nm EVP_PKEY_get0_EC_KEY ,
+.Nm EVP_PKEY_get0_hmac ,
.Nm EVP_PKEY_assign_RSA ,
.Nm EVP_PKEY_assign_DSA ,
.Nm EVP_PKEY_assign_DH ,
@@ -127,6 +128,11 @@
.Fo EVP_PKEY_get0_EC_KEY
.Fa "EVP_PKEY *pkey"
.Fc
+.Ft const unsigned char *
+.Fo EVP_PKEY_get0_hmac
+.Fa "const EVP_PKEY *pkey"
+.Fa "size_t *len"
+.Fc
.Ft int
.Fo EVP_PKEY_assign_RSA
.Fa "EVP_PKEY *pkey"
@@ -189,6 +195,21 @@ and
are identical except that they do not increment the reference count.
Consequently, the returned key must not be freed by the caller.
.Pp
+.Fn EVP_PKEY_get0_hmac
+returns an internal pointer to the key referenced in
+.Fa pkey
+and sets
+.Pf * Fa len
+to its length in bytes.
+The returned pointer must not be freed by the caller.
+If
+.Fa pkey
+is not of the correct type,
+.Dv NULL
+is returned and the content of
+.Pf * Fa len
+becomes unspecified.
+.Pp
.Fn EVP_PKEY_assign_RSA ,
.Fn EVP_PKEY_assign_DSA ,
.Fn EVP_PKEY_assign_DH ,
@@ -268,8 +289,9 @@ return 1 for success or 0 for failure.
.Fn EVP_PKEY_get0_RSA ,
.Fn EVP_PKEY_get0_DSA ,
.Fn EVP_PKEY_get0_DH ,
+.Fn EVP_PKEY_get0_EC_KEY ,
and
-.Fn EVP_PKEY_get0_EC_KEY
+.Fn EVP_PKEY_get0_hmac
return the referenced key or
.Dv NULL
if an error occurred.
@@ -336,3 +358,7 @@ and
.Fn EVP_PKEY_get0_EC_KEY
first appeared in OpenSSL 1.1.0 and have been available since
.Ox 6.3 .
+.Pp
+.Fn EVP_PKEY_get0_hmac
+first appeared in OpenSSL 1.1.0 and has been available since
+.Ox 6.5 .