summaryrefslogtreecommitdiffstats
path: root/php-5.6.30-openssl11.patch
diff options
context:
space:
mode:
Diffstat (limited to 'php-5.6.30-openssl11.patch')
-rw-r--r--php-5.6.30-openssl11.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/php-5.6.30-openssl11.patch b/php-5.6.30-openssl11.patch
new file mode 100644
index 0000000..d7657ff
--- /dev/null
+++ b/php-5.6.30-openssl11.patch
@@ -0,0 +1,53 @@
+diff --git a/ext/phar/util.c b/ext/phar/util.c
+index 828be8f..06e4e55 100644
+--- a/ext/phar/util.c
++++ b/ext/phar/util.c
+@@ -1531,7 +1531,7 @@ int phar_verify_signature(php_stream *fp, size_t end_of_phar, php_uint32 sig_typ
+ BIO *in;
+ EVP_PKEY *key;
+ EVP_MD *mdtype = (EVP_MD *) EVP_sha1();
+- EVP_MD_CTX md_ctx;
++ EVP_MD_CTX *md_ctx;
+ #else
+ int tempsig;
+ #endif
+@@ -1608,7 +1608,8 @@ int phar_verify_signature(php_stream *fp, size_t end_of_phar, php_uint32 sig_typ
+ return FAILURE;
+ }
+
+- EVP_VerifyInit(&md_ctx, mdtype);
++ md_ctx = EVP_MD_CTX_create();
++ EVP_VerifyInit(md_ctx, mdtype);
+ read_len = end_of_phar;
+
+ if (read_len > sizeof(buf)) {
+@@ -1620,7 +1621,7 @@ int phar_verify_signature(php_stream *fp, size_t end_of_phar, php_uint32 sig_typ
+ php_stream_seek(fp, 0, SEEK_SET);
+
+ while (read_size && (len = php_stream_read(fp, (char*)buf, read_size)) > 0) {
+- EVP_VerifyUpdate (&md_ctx, buf, len);
++ EVP_VerifyUpdate (md_ctx, buf, len);
+ read_len -= (off_t)len;
+
+ if (read_len < read_size) {
+@@ -1628,9 +1629,9 @@ int phar_verify_signature(php_stream *fp, size_t end_of_phar, php_uint32 sig_typ
+ }
+ }
+
+- if (EVP_VerifyFinal(&md_ctx, (unsigned char *)sig, sig_len, key) != 1) {
++ if (EVP_VerifyFinal(md_ctx, (unsigned char *)sig, sig_len, key) != 1) {
+ /* 1: signature verified, 0: signature does not match, -1: failed signature operation */
+- EVP_MD_CTX_cleanup(&md_ctx);
++ EVP_MD_CTX_destroy(md_ctx);
+
+ if (error) {
+ spprintf(error, 0, "broken openssl signature");
+@@ -1639,7 +1640,7 @@ int phar_verify_signature(php_stream *fp, size_t end_of_phar, php_uint32 sig_typ
+ return FAILURE;
+ }
+
+- EVP_MD_CTX_cleanup(&md_ctx);
++ EVP_MD_CTX_destroy(md_ctx);
+ #endif
+
+ *signature_len = phar_hex_str((const char*)sig, sig_len, signature TSRMLS_CC);