diff options
author | jsing <> | 2015-02-07 04:17:11 +0000 |
---|---|---|
committer | jsing <> | 2015-02-07 04:17:11 +0000 |
commit | be1d02917370f48d43c5e741fbb7b49e6aaa7484 (patch) | |
tree | 0df75ae3b916b1b72c13a0fd2ac4593d824ab8aa /src/lib/libssl/ssl.h | |
parent | a6d663db02ac0a71cccf58cb65c2fd12eb475516 (diff) | |
download | openbsd-be1d02917370f48d43c5e741fbb7b49e6aaa7484.tar.gz openbsd-be1d02917370f48d43c5e741fbb7b49e6aaa7484.tar.bz2 openbsd-be1d02917370f48d43c5e741fbb7b49e6aaa7484.zip |
Provide a SSL_CIPHER_get_by_value() function that allows a cipher to be
retrieved via its cipher suite value. A corresponding SSL_CIPHER_by_value()
function returns the cipher suite value for a given SSL_CIPHER. These
functions should mean that software does not need to resort to
put_cipher_by_char()/get_cipher_by_char() in order to locate a cipher.
Begrudgingly also provide a SSL_CIPHER_get_by_id() function that locates a
cipher via the internal cipher identifier. Unfortunately these have already
been leaked outside the library via SSL_CIPHER_by_id() and the various
SSL3_CK_* and TLS1_CK_* defines in the ssl3.h/tls1.h headers.
ok beck@ miod@
Diffstat (limited to 'src/lib/libssl/ssl.h')
-rw-r--r-- | src/lib/libssl/ssl.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h index 571786dcf6..75103426f3 100644 --- a/src/lib/libssl/ssl.h +++ b/src/lib/libssl/ssl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl.h,v 1.80 2015/02/06 08:30:23 jsing Exp $ */ | 1 | /* $OpenBSD: ssl.h,v 1.81 2015/02/07 04:17:11 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 | * |
@@ -1545,10 +1545,13 @@ int SSL_clear(SSL *s); | |||
1545 | void SSL_CTX_flush_sessions(SSL_CTX *ctx, long tm); | 1545 | void SSL_CTX_flush_sessions(SSL_CTX *ctx, long tm); |
1546 | 1546 | ||
1547 | const SSL_CIPHER *SSL_get_current_cipher(const SSL *s); | 1547 | const SSL_CIPHER *SSL_get_current_cipher(const SSL *s); |
1548 | const SSL_CIPHER *SSL_CIPHER_get_by_id(unsigned int id); | ||
1549 | const SSL_CIPHER *SSL_CIPHER_get_by_value(uint16_t value); | ||
1548 | int SSL_CIPHER_get_bits(const SSL_CIPHER *c, int *alg_bits); | 1550 | int SSL_CIPHER_get_bits(const SSL_CIPHER *c, int *alg_bits); |
1549 | char * SSL_CIPHER_get_version(const SSL_CIPHER *c); | 1551 | char * SSL_CIPHER_get_version(const SSL_CIPHER *c); |
1550 | const char * SSL_CIPHER_get_name(const SSL_CIPHER *c); | 1552 | const char * SSL_CIPHER_get_name(const SSL_CIPHER *c); |
1551 | unsigned long SSL_CIPHER_get_id(const SSL_CIPHER *c); | 1553 | unsigned long SSL_CIPHER_get_id(const SSL_CIPHER *c); |
1554 | uint16_t SSL_CIPHER_get_value(const SSL_CIPHER *c); | ||
1552 | 1555 | ||
1553 | int SSL_get_fd(const SSL *s); | 1556 | int SSL_get_fd(const SSL *s); |
1554 | int SSL_get_rfd(const SSL *s); | 1557 | int SSL_get_rfd(const SSL *s); |