php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #62122
Patch openssl_pkcs7_verify.patch revision 2012-05-23 13:06 UTC by f-roth at megaera dot de

Patch openssl_pkcs7_verify.patch for OpenSSL related Bug #62122

Patch version 2012-05-23 13:06 UTC

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

Developer: f-roth@megaera.de

diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index a48ab20..a0238c2 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -3361,7 +3361,13 @@ PHP_FUNCTION(openssl_pkcs7_verify)
 	if (in == NULL) {
 		goto clean_exit;
 	}
-	p7 = SMIME_read_PKCS7(in, &datain);
+
+	if (flags & PKCS7_BINARY) {
+		p7 = d2i_PKCS7_bio(in, NULL);
+	} else {
+		p7 = SMIME_read_PKCS7(in, &datain);
+	}  
+
 	if (p7 == NULL) {
 #if DEBUG_SMIME
 		zend_printf("SMIME_read_PKCS7 failed\n");
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 18:01:35 2024 UTC