diff options
author | tb <> | 2019-01-22 01:12:18 +0000 |
---|---|---|
committer | tb <> | 2019-01-22 01:12:18 +0000 |
commit | bd68e8ca28679b15d2f2db1e696ed66903f425a6 (patch) | |
tree | c4cd8d23400b7f35a0bd063c1aa0503727c5263e /src/lib | |
parent | df28bcfd8ca7899fe1720f88f176c93f2e320329 (diff) | |
download | openbsd-bd68e8ca28679b15d2f2db1e696ed66903f425a6.tar.gz openbsd-bd68e8ca28679b15d2f2db1e696ed66903f425a6.tar.bz2 openbsd-bd68e8ca28679b15d2f2db1e696ed66903f425a6.zip |
Provide SSL_get_client_ciphers().
Part of OpenSSL 1.1 API, pre-licence change.
ok jsing
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libssl/Symbols.list | 1 | ||||
-rw-r--r-- | src/lib/libssl/ssl.h | 3 | ||||
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 10 |
3 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/libssl/Symbols.list b/src/lib/libssl/Symbols.list index 4508a362d1..bae1950899 100644 --- a/src/lib/libssl/Symbols.list +++ b/src/lib/libssl/Symbols.list | |||
@@ -189,6 +189,7 @@ SSL_get_certificate | |||
189 | SSL_get_cipher_list | 189 | SSL_get_cipher_list |
190 | SSL_get_ciphers | 190 | SSL_get_ciphers |
191 | SSL_get_client_CA_list | 191 | SSL_get_client_CA_list |
192 | SSL_get_client_ciphers | ||
192 | SSL_get_client_random | 193 | SSL_get_client_random |
193 | SSL_get_current_cipher | 194 | SSL_get_current_cipher |
194 | SSL_get_current_compression | 195 | SSL_get_current_compression |
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h index ba5241850f..d440e0ccef 100644 --- a/src/lib/libssl/ssl.h +++ b/src/lib/libssl/ssl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl.h,v 1.162 2018/11/11 06:58:14 tb Exp $ */ | 1 | /* $OpenBSD: ssl.h,v 1.163 2019/01/22 01:12:18 tb 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 | * |
@@ -1437,6 +1437,7 @@ const SSL_METHOD *DTLSv1_server_method(void); /* DTLSv1.0 */ | |||
1437 | const SSL_METHOD *DTLSv1_client_method(void); /* DTLSv1.0 */ | 1437 | const SSL_METHOD *DTLSv1_client_method(void); /* DTLSv1.0 */ |
1438 | 1438 | ||
1439 | STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *s); | 1439 | STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *s); |
1440 | STACK_OF(SSL_CIPHER) *SSL_get_client_ciphers(const SSL *s); | ||
1440 | 1441 | ||
1441 | int SSL_do_handshake(SSL *s); | 1442 | int SSL_do_handshake(SSL *s); |
1442 | int SSL_renegotiate(SSL *s); | 1443 | int SSL_renegotiate(SSL *s); |
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index e3ab8431ab..839bead755 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.199 2019/01/21 14:12:13 tb Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.200 2019/01/22 01:12:18 tb 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 | * |
@@ -1255,6 +1255,14 @@ SSL_get_ciphers(const SSL *s) | |||
1255 | return (NULL); | 1255 | return (NULL); |
1256 | } | 1256 | } |
1257 | 1257 | ||
1258 | STACK_OF(SSL_CIPHER) * | ||
1259 | SSL_get_client_ciphers(const SSL *s) | ||
1260 | { | ||
1261 | if (s == NULL || s->session == NULL || !s->server) | ||
1262 | return NULL; | ||
1263 | return s->session->ciphers; | ||
1264 | } | ||
1265 | |||
1258 | /* | 1266 | /* |
1259 | * Return a STACK of the ciphers available for the SSL and in order of | 1267 | * Return a STACK of the ciphers available for the SSL and in order of |
1260 | * algorithm id. | 1268 | * algorithm id. |