summaryrefslogtreecommitdiff
path: root/src/lib/libssl/tls1.h
diff options
context:
space:
mode:
authorjsing <>2019-03-17 15:16:39 +0000
committerjsing <>2019-03-17 15:16:39 +0000
commit02f7540b7cb04e4e3a520c240503b8185e76f372 (patch)
treeb2a6421379d8e567df8d954c56e0eb13500776ab /src/lib/libssl/tls1.h
parent053bde557c5f57a91664558a9e44f1368c444de5 (diff)
downloadopenbsd-02f7540b7cb04e4e3a520c240503b8185e76f372.tar.gz
openbsd-02f7540b7cb04e4e3a520c240503b8185e76f372.tar.bz2
openbsd-02f7540b7cb04e4e3a520c240503b8185e76f372.zip
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 'src/lib/libssl/tls1.h')
-rw-r--r--src/lib/libssl/tls1.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/libssl/tls1.h b/src/lib/libssl/tls1.h
index c253f6d2c0..e4ebbcbb00 100644
--- a/src/lib/libssl/tls1.h
+++ b/src/lib/libssl/tls1.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls1.h,v 1.37 2018/11/09 00:34:55 beck Exp $ */ 1/* $OpenBSD: tls1.h,v 1.38 2019/03/17 15:16:39 jsing 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 *
@@ -177,11 +177,10 @@ extern "C" {
177#define TLS1_VERSION_MAJOR 0x03 177#define TLS1_VERSION_MAJOR 0x03
178#define TLS1_VERSION_MINOR 0x01 178#define TLS1_VERSION_MINOR 0x01
179 179
180#define TLS1_get_version(s) \ 180#ifndef LIBRESSL_INTERNAL
181 ((s->version >> 8) == TLS1_VERSION_MAJOR ? s->version : 0) 181#define TLS1_get_version(s) (s->version)
182 182#define TLS1_get_client_version(s) (s->client_version)
183#define TLS1_get_client_version(s) \ 183#endif
184 ((s->client_version >> 8) == TLS1_VERSION_MAJOR ? s->client_version : 0)
185 184
186/* 185/*
187 * TLS Alert codes. 186 * TLS Alert codes.