summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_tlsext.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/ssl_tlsext.c')
-rw-r--r--src/lib/libssl/ssl_tlsext.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/libssl/ssl_tlsext.c b/src/lib/libssl/ssl_tlsext.c
index 1767104963..e12820ba62 100644
--- a/src/lib/libssl/ssl_tlsext.c
+++ b/src/lib/libssl/ssl_tlsext.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_tlsext.c,v 1.84 2020/10/11 01:16:31 guenther Exp $ */ 1/* $OpenBSD: ssl_tlsext.c,v 1.85 2020/10/14 16:57:33 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> 4 * Copyright (c) 2017 Doug Hogan <doug@openbsd.org>
@@ -854,7 +854,7 @@ tlsext_sni_client_parse(SSL *s, uint16_t msg_type, CBS *cbs, int *alert)
854int 854int
855tlsext_ocsp_client_needs(SSL *s, uint16_t msg_type) 855tlsext_ocsp_client_needs(SSL *s, uint16_t msg_type)
856{ 856{
857 if (SSL_IS_DTLS(s)) 857 if (SSL_is_dtls(s))
858 return 0; 858 return 0;
859 if (msg_type != SSL_TLSEXT_MSG_CH) 859 if (msg_type != SSL_TLSEXT_MSG_CH)
860 return 0; 860 return 0;
@@ -1204,7 +1204,7 @@ tlsext_sessionticket_client_parse(SSL *s, uint16_t msg_type, CBS *cbs,
1204int 1204int
1205tlsext_srtp_client_needs(SSL *s, uint16_t msg_type) 1205tlsext_srtp_client_needs(SSL *s, uint16_t msg_type)
1206{ 1206{
1207 return SSL_IS_DTLS(s) && SSL_get_srtp_profiles(s) != NULL; 1207 return SSL_is_dtls(s) && SSL_get_srtp_profiles(s) != NULL;
1208} 1208}
1209 1209
1210int 1210int
@@ -1327,7 +1327,7 @@ tlsext_srtp_server_parse(SSL *s, uint16_t msg_type, CBS *cbs, int *alert)
1327int 1327int
1328tlsext_srtp_server_needs(SSL *s, uint16_t msg_type) 1328tlsext_srtp_server_needs(SSL *s, uint16_t msg_type)
1329{ 1329{
1330 return SSL_IS_DTLS(s) && SSL_get_selected_srtp_profile(s) != NULL; 1330 return SSL_is_dtls(s) && SSL_get_selected_srtp_profile(s) != NULL;
1331} 1331}
1332 1332
1333int 1333int
@@ -1414,7 +1414,7 @@ tlsext_keyshare_client_needs(SSL *s, uint16_t msg_type)
1414 /* XXX once this gets initialized when we get tls13_client.c */ 1414 /* XXX once this gets initialized when we get tls13_client.c */
1415 if (S3I(s)->hs_tls13.max_version == 0) 1415 if (S3I(s)->hs_tls13.max_version == 0)
1416 return 0; 1416 return 0;
1417 return (!SSL_IS_DTLS(s) && S3I(s)->hs_tls13.max_version >= 1417 return (!SSL_is_dtls(s) && S3I(s)->hs_tls13.max_version >=
1418 TLS1_3_VERSION); 1418 TLS1_3_VERSION);
1419} 1419}
1420 1420
@@ -1490,7 +1490,7 @@ tlsext_keyshare_server_parse(SSL *s, uint16_t msg_type, CBS *cbs, int *alert)
1490int 1490int
1491tlsext_keyshare_server_needs(SSL *s, uint16_t msg_type) 1491tlsext_keyshare_server_needs(SSL *s, uint16_t msg_type)
1492{ 1492{
1493 if (SSL_IS_DTLS(s) || s->version < TLS1_3_VERSION) 1493 if (SSL_is_dtls(s) || s->version < TLS1_3_VERSION)
1494 return 0; 1494 return 0;
1495 1495
1496 return tlsext_extension_seen(s, TLSEXT_TYPE_key_share); 1496 return tlsext_extension_seen(s, TLSEXT_TYPE_key_share);
@@ -1555,7 +1555,7 @@ tlsext_keyshare_client_parse(SSL *s, uint16_t msg_type, CBS *cbs, int *alert)
1555int 1555int
1556tlsext_versions_client_needs(SSL *s, uint16_t msg_type) 1556tlsext_versions_client_needs(SSL *s, uint16_t msg_type)
1557{ 1557{
1558 if (SSL_IS_DTLS(s)) 1558 if (SSL_is_dtls(s))
1559 return 0; 1559 return 0;
1560 return (S3I(s)->hs_tls13.max_version >= TLS1_3_VERSION); 1560 return (S3I(s)->hs_tls13.max_version >= TLS1_3_VERSION);
1561} 1561}
@@ -1638,7 +1638,7 @@ tlsext_versions_server_parse(SSL *s, uint16_t msg_type, CBS *cbs, int *alert)
1638int 1638int
1639tlsext_versions_server_needs(SSL *s, uint16_t msg_type) 1639tlsext_versions_server_needs(SSL *s, uint16_t msg_type)
1640{ 1640{
1641 return (!SSL_IS_DTLS(s) && s->version >= TLS1_3_VERSION); 1641 return (!SSL_is_dtls(s) && s->version >= TLS1_3_VERSION);
1642} 1642}
1643 1643
1644int 1644int
@@ -1680,7 +1680,7 @@ tlsext_versions_client_parse(SSL *s, uint16_t msg_type, CBS *cbs, int *alert)
1680int 1680int
1681tlsext_cookie_client_needs(SSL *s, uint16_t msg_type) 1681tlsext_cookie_client_needs(SSL *s, uint16_t msg_type)
1682{ 1682{
1683 if (SSL_IS_DTLS(s)) 1683 if (SSL_is_dtls(s))
1684 return 0; 1684 return 0;
1685 if (S3I(s)->hs_tls13.max_version < TLS1_3_VERSION) 1685 if (S3I(s)->hs_tls13.max_version < TLS1_3_VERSION)
1686 return 0; 1686 return 0;
@@ -1740,7 +1740,7 @@ int
1740tlsext_cookie_server_needs(SSL *s, uint16_t msg_type) 1740tlsext_cookie_server_needs(SSL *s, uint16_t msg_type)
1741{ 1741{
1742 1742
1743 if (SSL_IS_DTLS(s)) 1743 if (SSL_is_dtls(s))
1744 return 0; 1744 return 0;
1745 if (S3I(s)->hs_tls13.max_version < TLS1_3_VERSION) 1745 if (S3I(s)->hs_tls13.max_version < TLS1_3_VERSION)
1746 return 0; 1746 return 0;
@@ -2148,7 +2148,7 @@ tlsext_parse(SSL *s, int is_server, uint16_t msg_type, CBS *cbs, int *alert)
2148 CBS_len(&extension_data), 2148 CBS_len(&extension_data),
2149 s->internal->tlsext_debug_arg); 2149 s->internal->tlsext_debug_arg);
2150 2150
2151 if (!SSL_IS_DTLS(s) && version >= TLS1_3_VERSION && is_server && 2151 if (!SSL_is_dtls(s) && version >= TLS1_3_VERSION && is_server &&
2152 msg_type == SSL_TLSEXT_MSG_CH) { 2152 msg_type == SSL_TLSEXT_MSG_CH) {
2153 if (!tlsext_clienthello_hash_extension(s, type, 2153 if (!tlsext_clienthello_hash_extension(s, type,
2154 &extension_data)) 2154 &extension_data))