aboutsummaryrefslogtreecommitdiffstats
path: root/ssl/s3_both.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssl/s3_both.c')
-rw-r--r--ssl/s3_both.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/s3_both.c b/ssl/s3_both.c
index 019e21cd0274..09d0661e81f6 100644
--- a/ssl/s3_both.c
+++ b/ssl/s3_both.c
@@ -648,7 +648,7 @@ int ssl3_setup_read_buffer(SSL *s)
unsigned char *p;
size_t len, align = 0, headerlen;
- if (SSL_version(s) == DTLS1_VERSION || SSL_version(s) == DTLS1_BAD_VER)
+ if (SSL_IS_DTLS(s))
headerlen = DTLS1_RT_HEADER_LENGTH;
else
headerlen = SSL3_RT_HEADER_LENGTH;
@@ -687,7 +687,7 @@ int ssl3_setup_write_buffer(SSL *s)
unsigned char *p;
size_t len, align = 0, headerlen;
- if (SSL_version(s) == DTLS1_VERSION || SSL_version(s) == DTLS1_BAD_VER)
+ if (SSL_IS_DTLS(s))
headerlen = DTLS1_RT_HEADER_LENGTH + 1;
else
headerlen = SSL3_RT_HEADER_LENGTH;