From 09db68252932a7ab4529a5bbce76e4014b192f37 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 11 Nov 2025 14:16:04 +0100 Subject: [PATCH] build: remove track `SSL_ERROR_ZERO_RETURN` explicitly patch (#48875) build: remove track SSL_ERROR_ZERO_RETURN explicitly patch --- patches/boringssl/.patches | 1 - ...ack_ssl_error_zero_return_explicitly.patch | 49 ------------------- 2 files changed, 50 deletions(-) delete mode 100644 patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch diff --git a/patches/boringssl/.patches b/patches/boringssl/.patches index 9dffabe3d9..74b9c25484 100644 --- a/patches/boringssl/.patches +++ b/patches/boringssl/.patches @@ -1,3 +1,2 @@ expose_ripemd160.patch -revert_track_ssl_error_zero_return_explicitly.patch feat_expose_several_extra_cipher_functions.patch diff --git a/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch b/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch deleted file mode 100644 index ab15299ae5..0000000000 --- a/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shelley Vohr -Date: Tue, 6 Sep 2022 09:42:52 +0200 -Subject: revert: track SSL_ERROR_ZERO_RETURN explicitly. - -This reverts commit ebd8b8965c74ab06bb91f7a00b23822e1f1f26ca. - -It is causing significant TLS failures in Node.js. - -diff --git a/ssl/ssl_buffer.cc b/ssl/ssl_buffer.cc -index 8c5c7bcd96229cfcfb605bd4728c52c3c03d6062..ad8f1e7a26c665fd471b62bd694aad1655500d33 100644 ---- a/ssl/ssl_buffer.cc -+++ b/ssl/ssl_buffer.cc -@@ -230,7 +230,6 @@ int ssl_handle_open_record(SSL *ssl, bool *out_retry, ssl_open_record_t ret, - return 1; - - case ssl_open_record_close_notify: -- ssl->s3->rwstate = SSL_ERROR_ZERO_RETURN; - return 0; - - case ssl_open_record_error: -diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc -index f64b103fbb7a298a22fe0ff4bc95a4415c58e305..9bc3e1c3114ae67c0eb6a31de05b85e517ea6ae2 100644 ---- a/ssl/ssl_lib.cc -+++ b/ssl/ssl_lib.cc -@@ -1211,7 +1211,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) { - } - - if (ret_code == 0) { -- if (ssl->s3->rwstate == SSL_ERROR_ZERO_RETURN) { -+ if (ssl->s3->read_shutdown == ssl_shutdown_close_notify) { - return SSL_ERROR_ZERO_RETURN; - } - // An EOF was observed which violates the protocol, and the underlying -@@ -2672,13 +2672,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) { - return CRYPTO_get_ex_data(&ctx->ex_data, idx); - } - --int SSL_want(const SSL *ssl) { -- // Historically, OpenSSL did not track |SSL_ERROR_ZERO_RETURN| as an |rwstate| -- // value. We do, but map it back to |SSL_ERROR_NONE| to preserve the original -- // behavior. -- return ssl->s3->rwstate == SSL_ERROR_ZERO_RETURN ? SSL_ERROR_NONE -- : ssl->s3->rwstate; --} -+int SSL_want(const SSL *ssl) { return ssl->s3->rwstate; } - - void SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx, - RSA *(*cb)(SSL *ssl, int is_export,