summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-05-20 16:20:27 +0100
committerMatt Caswell <matt@openssl.org>2020-06-05 11:04:11 +0100
commit6a9bd9298bd706e3a4a40ecfa1d89f65f8592c65 (patch)
tree38fdba8151948162bbaf8df6c073844ee05c1e46 /include
parent0d52ede71685e4176999cc5e52000dcb540747fc (diff)
Make EVP_PKEY_[get1|set1]_tls_encodedpoint work with provided keys
EVP_PKEY_[get1|set1]_tls_encodedpoint() only worked if an ameth was present which isn't the case for provided keys. Support has been added to dh, ec and ecx keys. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/11898)
Diffstat (limited to 'include')
-rw-r--r--include/crypto/dh.h3
-rw-r--r--include/openssl/core_names.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/include/crypto/dh.h b/include/crypto/dh.h
index 1ae2c2f0a3..f67b4e01cd 100644
--- a/include/crypto/dh.h
+++ b/include/crypto/dh.h
@@ -32,3 +32,6 @@ int dh_check_priv_key(const DH *dh, const BIGNUM *priv_key, int *ret);
int dh_check_pairwise(DH *dh);
const DH_METHOD *dh_get_method(const DH *dh);
+
+int dh_buf2key(DH *key, const unsigned char *buf, size_t len);
+size_t dh_key2buf(const DH *dh, unsigned char **pbuf, size_t size, int alloc);
diff --git a/include/openssl/core_names.h b/include/openssl/core_names.h
index 8bafc1ba5e..f04168e819 100644
--- a/include/openssl/core_names.h
+++ b/include/openssl/core_names.h
@@ -194,6 +194,7 @@ extern "C" {
#define OSSL_PKEY_PARAM_MASKGENFUNC "mgf"
#define OSSL_PKEY_PARAM_MGF1_DIGEST "mgf1-digest"
#define OSSL_PKEY_PARAM_MGF1_PROPERTIES "mgf1-properties"
+#define OSSL_PKEY_PARAM_TLS_ENCODED_PT "tls-encoded-pt"
/* Diffie-Hellman/DSA public/private key */
#define OSSL_PKEY_PARAM_PUB_KEY "pub"