summaryrefslogtreecommitdiffstats
path: root/crypto/include/internal/asn1_int.h
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2018-03-05 14:06:41 +0000
committerMatt Caswell <matt@openssl.org>2018-03-15 12:47:27 +0000
commita08802ce296a90d8cf9032987b0dac959ccf00ad (patch)
tree25dba98c7dbf1e46afdaeeec5348016045485e20 /crypto/include/internal/asn1_int.h
parent9e381e8a018592a2a42e83df402e1ef921469e9f (diff)
Add functions to create an EVP_PKEY from raw private/public key data
Not all algorithms will support this, since their keys are not a simple block of data. But many can. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5520)
Diffstat (limited to 'crypto/include/internal/asn1_int.h')
-rw-r--r--crypto/include/internal/asn1_int.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/include/internal/asn1_int.h b/crypto/include/internal/asn1_int.h
index 664d4d69cb..90673ab3fe 100644
--- a/crypto/include/internal/asn1_int.h
+++ b/crypto/include/internal/asn1_int.h
@@ -58,6 +58,9 @@ struct evp_pkey_asn1_method_st {
int (*pkey_check) (const EVP_PKEY *pk);
int (*pkey_public_check) (const EVP_PKEY *pk);
int (*pkey_param_check) (const EVP_PKEY *pk);
+ /* Get/set raw private/public key data */
+ 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);
} /* EVP_PKEY_ASN1_METHOD */ ;
DEFINE_STACK_OF_CONST(EVP_PKEY_ASN1_METHOD)