build: shrink unnecessary test changes in patch revert (#38505)

build: shrink unneccesary test changes in patch revert
This commit is contained in:
Shelley Vohr 2023-05-31 15:52:13 +02:00 committed by GitHub
parent 2c742cfadb
commit 115d37477e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,42 +47,3 @@ index 838761af5cb8498d8bcb66b1a7a6f9c1a233cac7..b9bda24dd4d372485622ff99873ee34e
void SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx, void SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx,
RSA *(*cb)(SSL *ssl, int is_export, RSA *(*cb)(SSL *ssl, int is_export,
diff --git a/ssl/ssl_test.cc b/ssl/ssl_test.cc
index be00e7c342759d3059d77cbfd938438df96b5c33..6e551c4d48d1633509dbb95a9619abaa84f84cb2 100644
--- a/ssl/ssl_test.cc
+++ b/ssl/ssl_test.cc
@@ -8558,11 +8558,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) {
EXPECT_EQ(ret, 0);
EXPECT_EQ(SSL_get_error(client.get(), ret), SSL_ERROR_ZERO_RETURN);
- // Further calls to |SSL_read| continue to report |SSL_ERROR_ZERO_RETURN|.
- ret = SSL_read(client.get(), buf, sizeof(buf));
- EXPECT_EQ(ret, 0);
- EXPECT_EQ(SSL_get_error(client.get(), ret), SSL_ERROR_ZERO_RETURN);
-
// Although the client has seen close_notify, it should continue to report
// |SSL_ERROR_SYSCALL| when its writes fail.
ret = SSL_write(client.get(), data, sizeof(data));
@@ -8570,22 +8565,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) {
EXPECT_EQ(SSL_get_error(client.get(), ret), SSL_ERROR_SYSCALL);
EXPECT_TRUE(write_failed);
write_failed = false;
-
- // Cause |BIO_write| to fail with a return value of zero instead.
- // |SSL_get_error| should not misinterpret this as a close_notify.
- //
- // This is not actually a correct implementation of |BIO_write|, but the rest
- // of the code treats zero from |BIO_write| as an error, so ensure it does so
- // correctly. Fixing https://crbug.com/boringssl/503 will make this case moot.
- BIO_meth_set_write(method.get(), [](BIO *, const char *, int) -> int {
- write_failed = true;
- return 0;
- });
- ret = SSL_write(client.get(), data, sizeof(data));
- EXPECT_EQ(ret, 0);
- EXPECT_EQ(SSL_get_error(client.get(), ret), SSL_ERROR_SYSCALL);
- EXPECT_TRUE(write_failed);
- write_failed = false;
}
// Test that |SSL_shutdown|, when quiet shutdown is enabled, simulates receiving