diff options
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 6e375e1c09..1cf64d1301 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.234 2020/09/24 18:12:00 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.234.4.1 2021/02/03 07:06:13 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -1710,8 +1710,17 @@ SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen, | |||
1710 | const char *label, size_t llen, const unsigned char *p, size_t plen, | 1710 | const char *label, size_t llen, const unsigned char *p, size_t plen, |
1711 | int use_context) | 1711 | int use_context) |
1712 | { | 1712 | { |
1713 | return (tls1_export_keying_material(s, out, olen, | 1713 | if (s->internal->tls13 != NULL && s->version == TLS1_3_VERSION) { |
1714 | label, llen, p, plen, use_context)); | 1714 | if (!use_context) { |
1715 | p = NULL; | ||
1716 | plen = 0; | ||
1717 | } | ||
1718 | return tls13_exporter(s->internal->tls13, label, llen, p, plen, | ||
1719 | out, olen); | ||
1720 | } | ||
1721 | |||
1722 | return (tls1_export_keying_material(s, out, olen, label, llen, p, plen, | ||
1723 | use_context)); | ||
1715 | } | 1724 | } |
1716 | 1725 | ||
1717 | static unsigned long | 1726 | static unsigned long |