X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=openssl.patch;fp=openssl.patch;h=33f759d2fdf2d3eeb644bb6ecd941064d4975570;hb=2d2410bef4739689b5b8bf27c59229248e8b4363;hp=0000000000000000000000000000000000000000;hpb=17de2b7fc3fe040c2c2a2f291cadc174c335cc0c;p=packages%2Fphp.git diff --git a/openssl.patch b/openssl.patch new file mode 100644 index 0000000..33f759d --- /dev/null +++ b/openssl.patch @@ -0,0 +1,38 @@ +--- php-5.3.29/ext/openssl/openssl.c~ 2021-10-23 19:18:21.000000000 +0200 ++++ php-5.3.29/ext/openssl/openssl.c 2021-10-23 19:19:01.483125024 +0200 +@@ -1044,7 +1044,9 @@ PHP_MINIT_FUNCTION(openssl) + REGISTER_LONG_CONSTANT("PKCS7_NOSIGS", PKCS7_NOSIGS, CONST_CS|CONST_PERSISTENT); + + REGISTER_LONG_CONSTANT("OPENSSL_PKCS1_PADDING", RSA_PKCS1_PADDING, CONST_CS|CONST_PERSISTENT); ++#ifdef RSA_SSLV23_PADDING + REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT); ++#endif + REGISTER_LONG_CONSTANT("OPENSSL_NO_PADDING", RSA_NO_PADDING, CONST_CS|CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("OPENSSL_PKCS1_OAEP_PADDING", RSA_PKCS1_OAEP_PADDING, CONST_CS|CONST_PERSISTENT); + +diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c +index 5564bf6f08..423f696c76 100644 +--- a/ext/openssl/xp_ssl.c ++++ b/ext/openssl/xp_ssl.c +@@ -1286,6 +1286,10 @@ static int php_openssl_set_server_specific_opts(php_stream *stream, SSL_CTX *ctx + zval *zv; + long ssl_ctx_options = SSL_CTX_get_options(ctx); + ++#ifdef SSL_OP_IGNORE_UNEXPECTED_EOF ++ ssl_ctx_options |= SSL_OP_IGNORE_UNEXPECTED_EOF; ++#endif ++ + #if defined(HAVE_ECDH) && PHP_OPENSSL_API_VERSION < 0x10100 + if (php_openssl_set_server_ecdh_curve(stream, ctx) == FAILURE) { + return FAILURE; +@@ -1628,6 +1632,10 @@ int php_openssl_setup_crypto(php_stream *stream, + ssl_ctx_options = SSL_OP_ALL; + #endif + ++#ifdef SSL_OP_IGNORE_UNEXPECTED_EOF ++ ssl_ctx_options |= SSL_OP_IGNORE_UNEXPECTED_EOF; ++#endif ++ + if (sslsock->ctx == NULL) { + php_error_docref(NULL, E_WARNING, "SSL context creation failure"); + return FAILURE;