[openssl-commits] [openssl] master update
Matt Caswell
matt at openssl.org
Mon May 16 15:01:18 UTC 2016
The branch master has been updated
via 6385ffd12d82ec9ef601100e1bdbd21ef240dc5b (commit)
via 6546e9b2210c98da68f5a481ad81ebabad892977 (commit)
from c408b80c50b3839816aa6608c9a27db35adc8fb6 (commit)
- Log -----------------------------------------------------------------
commit 6385ffd12d82ec9ef601100e1bdbd21ef240dc5b
Author: Alessandro Ghedini <alessandro at cloudflare.com>
Date: Mon May 9 12:59:26 2016 +0100
Do not access SSL struct directly in TLS1_get_version and TLS1_get_client_version macros
Reviewed-by: Rich Salz <rsalz at openssl.org>
Reviewed-by: Tim Hudson <tjh at openssl.org>
Reviewed-by: Matt Caswell <matt at openssl.org>
commit 6546e9b2210c98da68f5a481ad81ebabad892977
Author: Alessandro Ghedini <alessandro at cloudflare.com>
Date: Mon May 9 12:58:01 2016 +0100
Add SSL_client_version() getter function
Reviewed-by: Rich Salz <rsalz at openssl.org>
Reviewed-by: Tim Hudson <tjh at openssl.org>
Reviewed-by: Matt Caswell <matt at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
include/openssl/ssl.h | 1 +
include/openssl/tls1.h | 4 ++--
ssl/ssl_lib.c | 11 ++++++++---
util/libssl.num | 1 +
4 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index cf02047..b5e2161 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -1741,6 +1741,7 @@ __owur int SSL_get_quiet_shutdown(const SSL *ssl);
void SSL_set_shutdown(SSL *ssl, int mode);
__owur int SSL_get_shutdown(const SSL *ssl);
__owur int SSL_version(const SSL *ssl);
+__owur int SSL_client_version(const SSL *s);
__owur int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx);
__owur int SSL_CTX_set_default_verify_dir(SSL_CTX *ctx);
__owur int SSL_CTX_set_default_verify_file(SSL_CTX *ctx);
diff --git a/include/openssl/tls1.h b/include/openssl/tls1.h
index 61d5bcc..a0a3698 100644
--- a/include/openssl/tls1.h
+++ b/include/openssl/tls1.h
@@ -179,10 +179,10 @@ extern "C" {
# define TLS1_2_VERSION_MINOR 0x03
# define TLS1_get_version(s) \
- ((s->version >> 8) == TLS1_VERSION_MAJOR ? s->version : 0)
+ ((SSL_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_version(s) : 0)
# define TLS1_get_client_version(s) \
- ((s->client_version >> 8) == TLS1_VERSION_MAJOR ? s->client_version : 0)
+ ((SSL_client_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_client_version(s) : 0)
# define TLS1_AD_DECRYPTION_FAILED 21
# define TLS1_AD_RECORD_OVERFLOW 22
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 14e8c1e..471779b 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -3395,17 +3395,22 @@ void SSL_set_shutdown(SSL *s, int mode)
int SSL_get_shutdown(const SSL *s)
{
- return (s->shutdown);
+ return s->shutdown;
}
int SSL_version(const SSL *s)
{
- return (s->version);
+ return s->version;
+}
+
+int SSL_client_version(const SSL *s)
+{
+ return s->client_version;
}
SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl)
{
- return (ssl->ctx);
+ return ssl->ctx;
}
SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX *ctx)
diff --git a/util/libssl.num b/util/libssl.num
index 636892c..8af95d1 100644
--- a/util/libssl.num
+++ b/util/libssl.num
@@ -394,3 +394,4 @@ SSL_enable_ct 393 1_1_0 EXIST::FUNCTION:CT
SSL_CTX_enable_ct 394 1_1_0 EXIST::FUNCTION:CT
SSL_CTX_get_ciphers 395 1_1_0 EXIST::FUNCTION:
SSL_SESSION_get0_hostname 396 1_1_0 EXIST::FUNCTION:
+SSL_client_version 397 1_1_0 EXIST::FUNCTION:
More information about the openssl-commits
mailing list