Remove MoveTestConfig().
Inf2bc5f4davidben pointed out that this function seems unnecessary in my desired end-state. In fact, I think it may have been unnecessary since56986f90. (This was easier to miss at the time, since at the time the function was part of MoveExData(), having not yet been factored out.) Change-Id: Ia9b4a909c93cb595666bcf7356a9f9a085901455 Reviewed-on: https://boringssl-review.googlesource.com/29604 Commit-Queue: Matt Braithwaite <mab@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> Reviewed-by: David Benjamin <davidben@google.com>
This commit is contained in:
committed by
CQ bot account: commit-bot@chromium.org
parent
82639e6f53
commit
c312fd02f6
@@ -790,8 +790,7 @@ static bool DoExchange(bssl::UniquePtr<SSL_SESSION> *out_session,
|
||||
return false;
|
||||
}
|
||||
SSL_set_accept_state(ssl_handoff.get());
|
||||
if (!MoveTestConfig(ssl_handoff.get(), ssl) ||
|
||||
!MoveTestState(ssl_handoff.get(), ssl)) {
|
||||
if (!MoveTestState(ssl_handoff.get(), ssl)) {
|
||||
return false;
|
||||
}
|
||||
MoveBIOs(ssl_handoff.get(), ssl);
|
||||
@@ -821,8 +820,7 @@ static bool DoExchange(bssl::UniquePtr<SSL_SESSION> *out_session,
|
||||
}
|
||||
|
||||
MoveBIOs(ssl, ssl_handoff.get());
|
||||
if (!MoveTestConfig(ssl, ssl_handoff.get()) ||
|
||||
!MoveTestState(ssl, ssl_handoff.get())) {
|
||||
if (!MoveTestState(ssl, ssl_handoff.get())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -865,8 +863,7 @@ static bool DoExchange(bssl::UniquePtr<SSL_SESSION> *out_session,
|
||||
return false;
|
||||
}
|
||||
MoveBIOs(ssl_handback.get(), ssl);
|
||||
if (!MoveTestConfig(ssl_handback.get(), ssl) ||
|
||||
!MoveTestState(ssl_handback.get(), ssl)) {
|
||||
if (!MoveTestState(ssl_handback.get(), ssl)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -372,16 +372,6 @@ const TestConfig *GetTestConfig(const SSL *ssl) {
|
||||
return (const TestConfig *)SSL_get_ex_data(ssl, g_config_index);
|
||||
}
|
||||
|
||||
bool MoveTestConfig(SSL *dest, SSL *src) {
|
||||
const TestConfig *config = GetTestConfig(src);
|
||||
if (!SSL_set_ex_data(src, g_config_index, nullptr) ||
|
||||
!SSL_set_ex_data(dest, g_config_index, (void *)config)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static int LegacyOCSPCallback(SSL *ssl, void *arg) {
|
||||
const TestConfig *config = GetTestConfig(ssl);
|
||||
if (!SSL_is_server(ssl)) {
|
||||
|
||||
@@ -179,8 +179,6 @@ bool SetTestConfig(SSL *ssl, const TestConfig *config);
|
||||
|
||||
const TestConfig *GetTestConfig(const SSL *ssl);
|
||||
|
||||
bool MoveTestConfig(SSL *dest, SSL *src);
|
||||
|
||||
bool LoadCertificate(bssl::UniquePtr<X509> *out_x509,
|
||||
bssl::UniquePtr<STACK_OF(X509)> *out_chain,
|
||||
const std::string &file);
|
||||
|
||||
Reference in New Issue
Block a user