diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2019-03-17 15:16:40 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2019-03-17 15:16:40 +0000 |
commit | bb22eef1a04dd56b150b527bd08f1aa2580f97ec (patch) | |
tree | 66783a629ec7281a39f300489bbd2d25a7e38d79 /lib/libssl/ssl_pkt.c | |
parent | c46b386708a48cefaf0507c43c51a954070646c9 (diff) |
Partially clean up the TLS1_get_{,client}_version macros.
LibreSSL only supports TLSv1.0 and above, hence the checks the macros are
performing are useless. Simplify them to their effective code. Also place
both under #ifndef LIBRESSL_INTERNAL and use the variables directly in our
code, which improves readability.
ok tb@
Diffstat (limited to 'lib/libssl/ssl_pkt.c')
-rw-r--r-- | lib/libssl/ssl_pkt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/ssl_pkt.c b/lib/libssl/ssl_pkt.c index 6e3764d360f..336856bccf9 100644 --- a/lib/libssl/ssl_pkt.c +++ b/lib/libssl/ssl_pkt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_pkt.c,v 1.14 2018/10/24 18:04:50 jsing Exp $ */ +/* $OpenBSD: ssl_pkt.c,v 1.15 2019/03/17 15:16:39 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -729,7 +729,7 @@ do_ssl3_write(SSL *s, int type, const unsigned char *buf, * bytes and record version number > TLS 1.0 */ if (S3I(s)->hs.state == SSL3_ST_CW_CLNT_HELLO_B && !s->internal->renegotiate && - TLS1_get_version(s) > TLS1_VERSION) + s->version > TLS1_VERSION) *(p++) = 0x1; else *(p++) = s->version&0xff; |