From e60f5a8fe5ed7844d5dc6f1c9dbcf86fce1ae298 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Wed, 14 Oct 2020 16:57:33 +0000 Subject: Replace SSL_IS_DTLS with SSL_is_dtls(). Garbage collect the now unused SSL_IS_DTLS macro. ok tb@ --- src/lib/libssl/ssl_tlsext.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/lib/libssl/ssl_tlsext.c') 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 @@ -/* $OpenBSD: ssl_tlsext.c,v 1.84 2020/10/11 01:16:31 guenther Exp $ */ +/* $OpenBSD: ssl_tlsext.c,v 1.85 2020/10/14 16:57:33 jsing Exp $ */ /* * Copyright (c) 2016, 2017, 2019 Joel Sing * Copyright (c) 2017 Doug Hogan @@ -854,7 +854,7 @@ tlsext_sni_client_parse(SSL *s, uint16_t msg_type, CBS *cbs, int *alert) int tlsext_ocsp_client_needs(SSL *s, uint16_t msg_type) { - if (SSL_IS_DTLS(s)) + if (SSL_is_dtls(s)) return 0; if (msg_type != SSL_TLSEXT_MSG_CH) return 0; @@ -1204,7 +1204,7 @@ tlsext_sessionticket_client_parse(SSL *s, uint16_t msg_type, CBS *cbs, int tlsext_srtp_client_needs(SSL *s, uint16_t msg_type) { - return SSL_IS_DTLS(s) && SSL_get_srtp_profiles(s) != NULL; + return SSL_is_dtls(s) && SSL_get_srtp_profiles(s) != NULL; } int @@ -1327,7 +1327,7 @@ tlsext_srtp_server_parse(SSL *s, uint16_t msg_type, CBS *cbs, int *alert) int tlsext_srtp_server_needs(SSL *s, uint16_t msg_type) { - return SSL_IS_DTLS(s) && SSL_get_selected_srtp_profile(s) != NULL; + return SSL_is_dtls(s) && SSL_get_selected_srtp_profile(s) != NULL; } int @@ -1414,7 +1414,7 @@ tlsext_keyshare_client_needs(SSL *s, uint16_t msg_type) /* XXX once this gets initialized when we get tls13_client.c */ if (S3I(s)->hs_tls13.max_version == 0) return 0; - return (!SSL_IS_DTLS(s) && S3I(s)->hs_tls13.max_version >= + return (!SSL_is_dtls(s) && S3I(s)->hs_tls13.max_version >= TLS1_3_VERSION); } @@ -1490,7 +1490,7 @@ tlsext_keyshare_server_parse(SSL *s, uint16_t msg_type, CBS *cbs, int *alert) int tlsext_keyshare_server_needs(SSL *s, uint16_t msg_type) { - if (SSL_IS_DTLS(s) || s->version < TLS1_3_VERSION) + if (SSL_is_dtls(s) || s->version < TLS1_3_VERSION) return 0; 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) int tlsext_versions_client_needs(SSL *s, uint16_t msg_type) { - if (SSL_IS_DTLS(s)) + if (SSL_is_dtls(s)) return 0; return (S3I(s)->hs_tls13.max_version >= TLS1_3_VERSION); } @@ -1638,7 +1638,7 @@ tlsext_versions_server_parse(SSL *s, uint16_t msg_type, CBS *cbs, int *alert) int tlsext_versions_server_needs(SSL *s, uint16_t msg_type) { - return (!SSL_IS_DTLS(s) && s->version >= TLS1_3_VERSION); + return (!SSL_is_dtls(s) && s->version >= TLS1_3_VERSION); } int @@ -1680,7 +1680,7 @@ tlsext_versions_client_parse(SSL *s, uint16_t msg_type, CBS *cbs, int *alert) int tlsext_cookie_client_needs(SSL *s, uint16_t msg_type) { - if (SSL_IS_DTLS(s)) + if (SSL_is_dtls(s)) return 0; if (S3I(s)->hs_tls13.max_version < TLS1_3_VERSION) return 0; @@ -1740,7 +1740,7 @@ int tlsext_cookie_server_needs(SSL *s, uint16_t msg_type) { - if (SSL_IS_DTLS(s)) + if (SSL_is_dtls(s)) return 0; if (S3I(s)->hs_tls13.max_version < TLS1_3_VERSION) return 0; @@ -2148,7 +2148,7 @@ tlsext_parse(SSL *s, int is_server, uint16_t msg_type, CBS *cbs, int *alert) CBS_len(&extension_data), s->internal->tlsext_debug_arg); - if (!SSL_IS_DTLS(s) && version >= TLS1_3_VERSION && is_server && + if (!SSL_is_dtls(s) && version >= TLS1_3_VERSION && is_server && msg_type == SSL_TLSEXT_MSG_CH) { if (!tlsext_clienthello_hash_extension(s, type, &extension_data)) -- cgit v1.2.3-55-g6feb