diff options
author | Matt Caswell <matt@openssl.org> | 2018-03-09 11:02:28 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2018-03-15 12:47:27 +0000 |
commit | e8f9f08f17e4f15ee737115d336d110dc8dea0ec (patch) | |
tree | ac3c70094de603808efdbd015822b7dbb183fe43 /doc/man3/EVP_PKEY_ASN1_METHOD.pod | |
parent | 0bcc8ec9d386bc067410f169682cef6b5da4455b (diff) |
Add functions for setting the new EVP_PKEY_ASN1_METHOD functions
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5520)
Diffstat (limited to 'doc/man3/EVP_PKEY_ASN1_METHOD.pod')
-rw-r--r-- | doc/man3/EVP_PKEY_ASN1_METHOD.pod | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/doc/man3/EVP_PKEY_ASN1_METHOD.pod b/doc/man3/EVP_PKEY_ASN1_METHOD.pod index cb03b473aa..9b635c480e 100644 --- a/doc/man3/EVP_PKEY_ASN1_METHOD.pod +++ b/doc/man3/EVP_PKEY_ASN1_METHOD.pod @@ -19,6 +19,8 @@ EVP_PKEY_asn1_set_check, EVP_PKEY_asn1_set_public_check, EVP_PKEY_asn1_set_param_check, EVP_PKEY_asn1_set_security_bits, +EVP_PKEY_asn1_set_set_priv_key, +EVP_PKEY_asn1_set_set_pub_key, EVP_PKEY_get0_asn1 - manipulating and registering EVP_PKEY_ASN1_METHOD structure @@ -112,6 +114,17 @@ EVP_PKEY_get0_asn1 int (*pkey_security_bits) (const EVP_PKEY *pk)); + void EVP_PKEY_asn1_set_set_priv_key(EVP_PKEY_ASN1_METHOD *ameth, + int (*set_priv_key) (EVP_PKEY *pk, + const unsigned char + *priv, + size_t len)); + + void EVP_PKEY_asn1_set_set_pub_key(EVP_PKEY_ASN1_METHOD *ameth, + int (*set_pub_key) (EVP_PKEY *pk, + const unsigned char *pub, + size_t len)); + const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(const EVP_PKEY *pkey); =head1 DESCRIPTION @@ -327,6 +340,14 @@ They MUST return 0 for an invalid key, or 1 for a valid key. They are called by L<EVP_PKEY_check(3)>, L<EVP_PKEY_public_check(3)> and L<EVP_PKEY_param_check(3)> respectively. + int (*set_priv_key) (EVP_PKEY *pk, const unsigned char *priv, size_t len); + int (*set_pub_key) (EVP_PKEY *pk, const unsigned char *pub, size_t len); + +The set_priv_key() and set_pub_key() methods are used to set the raw private and +public key data for an EVP_PKEY. They MUST return 0 on error, or 1 on success. +They are called by L<EVP_PKEY_new_private_key(3)>, and +L<EVP_PKEY_new_public_key(3)> respectively. + =head2 Functions EVP_PKEY_asn1_new() creates and returns a new B<EVP_PKEY_ASN1_METHOD> @@ -368,8 +389,9 @@ EVP_PKEY_asn1_set_public(), EVP_PKEY_asn1_set_private(), EVP_PKEY_asn1_set_param(), EVP_PKEY_asn1_set_free(), EVP_PKEY_asn1_set_ctrl(), EVP_PKEY_asn1_set_item(), EVP_PKEY_asn1_set_siginf(), EVP_PKEY_asn1_set_check(), -EVP_PKEY_asn1_set_public_check(), EVP_PKEY_asn1_set_param_check() and -EVP_PKEY_asn1_set_security_bits() set the diverse methods of the given +EVP_PKEY_asn1_set_public_check(), EVP_PKEY_asn1_set_param_check(), +EVP_PKEY_asn1_set_security_bits(), EVP_PKEY_asn1_set_set_priv_key() and +EVP_PKEY_asn1_set_set_pub_key() set the diverse methods of the given B<EVP_PKEY_ASN1_METHOD> object. EVP_PKEY_get0_asn1() finds the B<EVP_PKEY_ASN1_METHOD> associated |