summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_lib.c
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2018-02-04 12:20:37 +0900
committerMatt Caswell <matt@openssl.org>2018-02-26 13:35:54 +0000
commitb38ede8043439d99a3c6c174f17b91875cce66ac (patch)
treee4766b5fe52ffc7dbd61513a0c220027f479cee3 /ssl/ssl_lib.c
parente454f3add638fda5c2aa32cd368c8929c0b1eb09 (diff)
Export keying material using early exporter master secret
This commit adds SSL_export_keying_material_early() which exports keying material using early exporter master secret. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5252)
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r--ssl/ssl_lib.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 00e02f4dc7..59b507e788 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -2810,6 +2810,18 @@ int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
contextlen, use_context);
}
+int SSL_export_keying_material_early(SSL *s, unsigned char *out, size_t olen,
+ const char *label, size_t llen,
+ const unsigned char *context,
+ size_t contextlen)
+{
+ if (s->version != TLS1_3_VERSION)
+ return 0;
+
+ return tls13_export_keying_material_early(s, out, olen, label, llen,
+ context, contextlen);
+}
+
static unsigned long ssl_session_hash(const SSL_SESSION *a)
{
const unsigned char *session_id = a->session_id;