Remove legacy SSL_CTX_sess_set_get_cb overload.
Update-Note: I believe everything relying on this overload has since been updated. Change-Id: I7facf59cde56098e5e3c79470293b67abb715f4c Reviewed-on: https://boringssl-review.googlesource.com/27485 Reviewed-by: Steven Valdez <svaldez@google.com> Commit-Queue: David Benjamin <davidben@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
parent
68478b7e9b
commit
5ad94767ab
@ -4116,16 +4116,6 @@ OPENSSL_EXPORT SSL_SESSION *SSL_get1_session(SSL *ssl);
|
|||||||
OPENSSL_EXPORT int OPENSSL_init_ssl(uint64_t opts,
|
OPENSSL_EXPORT int OPENSSL_init_ssl(uint64_t opts,
|
||||||
const OPENSSL_INIT_SETTINGS *settings);
|
const OPENSSL_INIT_SETTINGS *settings);
|
||||||
|
|
||||||
#if !defined(BORINGSSL_NO_CXX)
|
|
||||||
// SSL_CTX_sess_set_get_cb is a legacy C++ overload of |SSL_CTX_sess_set_get_cb|
|
|
||||||
// which supports the old callback signature.
|
|
||||||
//
|
|
||||||
// TODO(davidben): Remove this once Node is compatible with OpenSSL 1.1.0.
|
|
||||||
extern "C++" OPENSSL_EXPORT void SSL_CTX_sess_set_get_cb(
|
|
||||||
SSL_CTX *ctx, SSL_SESSION *(*get_session_cb)(SSL *ssl, uint8_t *id,
|
|
||||||
int id_len, int *out_copy));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// Private structures.
|
// Private structures.
|
||||||
//
|
//
|
||||||
|
@ -2027,8 +2027,6 @@ struct SSLContext {
|
|||||||
void (*remove_session_cb)(SSL_CTX *ctx, SSL_SESSION *sess);
|
void (*remove_session_cb)(SSL_CTX *ctx, SSL_SESSION *sess);
|
||||||
SSL_SESSION *(*get_session_cb)(SSL *ssl, const uint8_t *data, int len,
|
SSL_SESSION *(*get_session_cb)(SSL *ssl, const uint8_t *data, int len,
|
||||||
int *copy);
|
int *copy);
|
||||||
SSL_SESSION *(*get_session_cb_legacy)(SSL *ssl, uint8_t *data, int len,
|
|
||||||
int *copy);
|
|
||||||
|
|
||||||
CRYPTO_refcount_t references;
|
CRYPTO_refcount_t references;
|
||||||
|
|
||||||
|
@ -682,17 +682,10 @@ static enum ssl_hs_wait_t ssl_lookup_session(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fall back to the external cache, if it exists.
|
// Fall back to the external cache, if it exists.
|
||||||
if (!session && (ssl->session_ctx->get_session_cb != nullptr ||
|
if (!session && ssl->session_ctx->get_session_cb != nullptr) {
|
||||||
ssl->session_ctx->get_session_cb_legacy != nullptr)) {
|
|
||||||
int copy = 1;
|
int copy = 1;
|
||||||
if (ssl->session_ctx->get_session_cb != nullptr) {
|
|
||||||
session.reset(ssl->session_ctx->get_session_cb(ssl, session_id,
|
session.reset(ssl->session_ctx->get_session_cb(ssl, session_id,
|
||||||
session_id_len, ©));
|
session_id_len, ©));
|
||||||
} else {
|
|
||||||
session.reset(ssl->session_ctx->get_session_cb_legacy(
|
|
||||||
ssl, const_cast<uint8_t *>(session_id), session_id_len, ©));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!session) {
|
if (!session) {
|
||||||
return ssl_hs_ok;
|
return ssl_hs_ok;
|
||||||
}
|
}
|
||||||
@ -1192,12 +1185,6 @@ void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx,
|
|||||||
ctx->get_session_cb = cb;
|
ctx->get_session_cb = cb;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx,
|
|
||||||
SSL_SESSION *(*cb)(SSL *ssl, uint8_t *id,
|
|
||||||
int id_len, int *out_copy)) {
|
|
||||||
ctx->get_session_cb_legacy = cb;
|
|
||||||
}
|
|
||||||
|
|
||||||
SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx))(SSL *ssl,
|
SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx))(SSL *ssl,
|
||||||
const uint8_t *id,
|
const uint8_t *id,
|
||||||
int id_len,
|
int id_len,
|
||||||
|
Loading…
Reference in New Issue
Block a user