]>
Commit | Line | Data |
---|---|---|
5d9d126f AM |
1 | --- php-5.3.29/ext/openssl/openssl.c~ 2021-10-23 19:18:21.000000000 +0200 |
2 | +++ php-5.3.29/ext/openssl/openssl.c 2021-10-23 19:19:01.483125024 +0200 | |
3 | @@ -1044,7 +1044,9 @@ PHP_MINIT_FUNCTION(openssl) | |
4 | REGISTER_LONG_CONSTANT("PKCS7_NOSIGS", PKCS7_NOSIGS, CONST_CS|CONST_PERSISTENT); | |
5 | ||
6 | REGISTER_LONG_CONSTANT("OPENSSL_PKCS1_PADDING", RSA_PKCS1_PADDING, CONST_CS|CONST_PERSISTENT); | |
7 | +#ifdef RSA_SSLV23_PADDING | |
8 | REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT); | |
9 | +#endif | |
10 | REGISTER_LONG_CONSTANT("OPENSSL_NO_PADDING", RSA_NO_PADDING, CONST_CS|CONST_PERSISTENT); | |
11 | REGISTER_LONG_CONSTANT("OPENSSL_PKCS1_OAEP_PADDING", RSA_PKCS1_OAEP_PADDING, CONST_CS|CONST_PERSISTENT); | |
12 | ||
740da1cb AM |
13 | diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c |
14 | index 5564bf6f08..423f696c76 100644 | |
15 | --- a/ext/openssl/xp_ssl.c | |
16 | +++ b/ext/openssl/xp_ssl.c | |
17 | @@ -1286,6 +1286,10 @@ static int php_openssl_set_server_specific_opts(php_stream *stream, SSL_CTX *ctx | |
18 | zval *zv; | |
19 | long ssl_ctx_options = SSL_CTX_get_options(ctx); | |
20 | ||
21 | +#ifdef SSL_OP_IGNORE_UNEXPECTED_EOF | |
22 | + ssl_ctx_options |= SSL_OP_IGNORE_UNEXPECTED_EOF; | |
23 | +#endif | |
24 | + | |
25 | #if defined(HAVE_ECDH) && PHP_OPENSSL_API_VERSION < 0x10100 | |
26 | if (php_openssl_set_server_ecdh_curve(stream, ctx) == FAILURE) { | |
27 | return FAILURE; | |
28 | @@ -1628,6 +1632,10 @@ int php_openssl_setup_crypto(php_stream *stream, | |
29 | ssl_ctx_options = SSL_OP_ALL; | |
30 | #endif | |
31 | ||
32 | +#ifdef SSL_OP_IGNORE_UNEXPECTED_EOF | |
33 | + ssl_ctx_options |= SSL_OP_IGNORE_UNEXPECTED_EOF; | |
34 | +#endif | |
35 | + | |
36 | if (sslsock->ctx == NULL) { | |
37 | php_error_docref(NULL, E_WARNING, "SSL context creation failure"); | |
38 | return FAILURE; |