summaryrefslogtreecommitdiffstats
path: root/crypto/include
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2018-06-01 12:22:28 +0100
committerMatt Caswell <matt@openssl.org>2018-06-08 10:04:09 +0100
commit0d124b0a51d3ad8c8807cab280ea18fc68489155 (patch)
tree0a77711f66e26da760c452c867999b024806bad6 /crypto/include
parentc0a58e034d3eff68ca5e0d36d7b4d147425b0599 (diff)
Add support getting raw private/public keys
Only applies to algorithms that support it. Both raw private and public keys can be obtained for X25519, Ed25519, X448, Ed448. Raw private keys only can be obtained for HMAC, Poly1305 and SipHash Fixes #6259 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6394)
Diffstat (limited to 'crypto/include')
-rw-r--r--crypto/include/internal/asn1_int.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/include/internal/asn1_int.h b/crypto/include/internal/asn1_int.h
index 962c3c6302..b8a6762aa1 100644
--- a/crypto/include/internal/asn1_int.h
+++ b/crypto/include/internal/asn1_int.h
@@ -61,6 +61,8 @@ struct evp_pkey_asn1_method_st {
/* 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);
+ int (*get_priv_key) (const EVP_PKEY *pk, unsigned char *priv, size_t *len);
+ int (*get_pub_key) (const EVP_PKEY *pk, unsigned char *pub, size_t *len);
} /* EVP_PKEY_ASN1_METHOD */ ;
DEFINE_STACK_OF_CONST(EVP_PKEY_ASN1_METHOD)