[openssl-commits] [openssl] master update
Rich Salz
rsalz at openssl.org
Tue May 31 21:16:41 UTC 2016
The branch master has been updated
via 80c630f6574a33b1c633815a174110d10ec37c60 (commit)
via 73271290fe2fe47f122a80f7b67fde556d873a47 (commit)
via bd01f6498c2c5007df64ba88c5d88ff15b0376cb (commit)
from 6d1e7709c67fa258527e58b797dc581c4e236f20 (commit)
- Log -----------------------------------------------------------------
commit 80c630f6574a33b1c633815a174110d10ec37c60
Author: TJ Saunders <tj at castaglia.org>
Date: Tue May 31 14:09:17 2016 -0700
Remove null check, per review feedback. Note this in the docs.
Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1135)
commit 73271290fe2fe47f122a80f7b67fde556d873a47
Author: TJ Saunders <tj at castaglia.org>
Date: Fri May 27 10:22:17 2016 -0700
Add requested HISTORY section, remove copy/pastos, per review feedback.
Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1135)
commit bd01f6498c2c5007df64ba88c5d88ff15b0376cb
Author: TJ Saunders <tj at castaglia.org>
Date: Thu May 26 15:40:13 2016 -0700
Add an SSL_SESSION accessor for obtaining the protocol version number, with
accompanying documentation.
Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1135)
-----------------------------------------------------------------------
Summary of changes:
doc/ssl/SSL_SESSION_get_protocol_version.pod | 44 ++++++++++++++++++++++++++++
include/openssl/ssl.h | 1 +
ssl/ssl_sess.c | 5 ++++
3 files changed, 50 insertions(+)
create mode 100644 doc/ssl/SSL_SESSION_get_protocol_version.pod
diff --git a/doc/ssl/SSL_SESSION_get_protocol_version.pod b/doc/ssl/SSL_SESSION_get_protocol_version.pod
new file mode 100644
index 0000000..a033fdd
--- /dev/null
+++ b/doc/ssl/SSL_SESSION_get_protocol_version.pod
@@ -0,0 +1,44 @@
+=pod
+
+=head1 NAME
+
+SSL_SESSION_get_protocol_version - retrieve session protocol version
+
+=head1 SYNOPSIS
+
+ #include <openssl/ssl.h>
+
+ int SSL_SESSION_get_protocol_version(const SSL_SESSION *s);
+
+=head1 DESCRIPTION
+
+SSL_SESSION_get_protocol_version() returns the protocol version number used
+by session B<s>.
+
+=head1 RETURN VALUES
+
+SSL_SESSION_get_protocol_version() returns a number indicating the protocol
+version used for the session; this number matches the constants I<e.g.>
+B<TLS1_VERSION> or B<TLS1_2_VERSION>.
+
+Note that the SSL_SESSION_get_protocol_version() function
+does B<not> perform a null check on the provided session B<s> pointer.
+
+=head1 SEE ALSO
+
+L<ssl(3)>
+
+=head1 HISTORY
+
+SSL_SESSION_get_protocol_version() was first added to OpenSSL 1.1.0
+
+=head1 COPYRIGHT
+
+Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved.
+
+Licensed under the OpenSSL license (the "License"). You may not use
+this file except in compliance with the License. You can obtain a copy
+in the file LICENSE in the source distribution or at
+L<https://www.openssl.org/source/license.html>.
+
+=cut
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index f019f64..c6c3576 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -1376,6 +1376,7 @@ __owur long SSL_SESSION_get_time(const SSL_SESSION *s);
__owur long SSL_SESSION_set_time(SSL_SESSION *s, long t);
__owur long SSL_SESSION_get_timeout(const SSL_SESSION *s);
__owur long SSL_SESSION_set_timeout(SSL_SESSION *s, long t);
+__owur int SSL_SESSION_get_protocol_version(const SSL_SESSION *s);
__owur const char *SSL_SESSION_get0_hostname(const SSL_SESSION *s);
__owur int SSL_SESSION_has_ticket(const SSL_SESSION *s);
__owur unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s);
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c
index f168900..f13e466 100644
--- a/ssl/ssl_sess.c
+++ b/ssl/ssl_sess.c
@@ -828,6 +828,11 @@ long SSL_SESSION_set_time(SSL_SESSION *s, long t)
return (t);
}
+int SSL_SESSION_get_protocol_version(const SSL_SESSION *s)
+{
+ return s->ssl_version;
+}
+
const char *SSL_SESSION_get0_hostname(const SSL_SESSION *s)
{
return s->tlsext_hostname;
More information about the openssl-commits
mailing list