php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch openssl-defaultmd.patch for OpenSSL related Bug #66833

Patch version 2014-03-06 11:42 UTC

Return to Bug #66833 | Download this patch
Patch Revisions:

Developer: remi

--- openssl.c.orig	2014-03-06 12:37:38.872298483 +0100
+++ openssl.c	2014-03-06 12:35:40.392897478 +0100
@@ -855,7 +855,11 @@
 		req->digest = req->md_alg = EVP_get_digestbyname(req->digest_name);
 	}
 	if (req->md_alg == NULL) {
-		req->md_alg = req->digest = EVP_md5();
+#if OPENSSL_VERSION_NUMBER >= 0x0090708fL
+		req->md_alg = req->digest = EVP_sha256();
+#else
+		req->md_alg = req->digest = EVP_sha1();
+#endif
 	}
 
 	PHP_SSL_CONFIG_SYNTAX_CHECK(extensions_section);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC