File tree 5 files changed +31
-0
lines changed
5 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 9
9
. Fixed Bug #53823 (preg_replace: * qualifier on unicode replace garbles the
10
10
string). (cmb)
11
11
12
+ - OpenSSL:
13
+ . Fixed bug #69882 (OpenSSL error “key values mismatch” after
14
+ openssl_pkcs12_read with extra cert) (Tomasz Sawicki)
15
+
12
16
25 Jun 2015, PHP 7.0.0 Alpha 2
13
17
14
18
- Core:
Original file line number Diff line number Diff line change @@ -2575,6 +2575,14 @@ PHP_FUNCTION(openssl_pkcs12_read)
2575
2575
X509 * aCA = sk_X509_pop (ca );
2576
2576
if (!aCA ) break ;
2577
2577
2578
+ /* fix for bug 69882 */
2579
+ {
2580
+ int err = ERR_peek_error ();
2581
+ if (err == OPENSSL_ERROR_X509_PRIVATE_KEY_VALUES_MISMATCH ) {
2582
+ ERR_get_error ();
2583
+ }
2584
+ }
2585
+
2578
2586
bio_out = BIO_new (BIO_s_mem ());
2579
2587
if (PEM_write_bio_X509 (bio_out , aCA )) {
2580
2588
BUF_MEM * bio_buf ;
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ extern zend_module_entry openssl_module_entry;
32
32
#define OPENSSL_RAW_DATA 1
33
33
#define OPENSSL_ZERO_PADDING 2
34
34
35
+ #define OPENSSL_ERROR_X509_PRIVATE_KEY_VALUES_MISMATCH 0x0B080074
36
+
35
37
/* Used for client-initiated handshake renegotiation DoS protection*/
36
38
#define OPENSSL_DEFAULT_RENEG_LIMIT 2
37
39
#define OPENSSL_DEFAULT_RENEG_WINDOW 300
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #69882: OpenSSL error "key values mismatch" after openssl_pkcs12_read with extra certs
3
+ --SKIPIF--
4
+ <?php
5
+ if (!extension_loaded ("openssl " )) die ("skip " );
6
+ ?>
7
+ --FILE--
8
+ <?php
9
+ $ p12 = file_get_contents (__DIR__ .'/p12_with_extra_certs.p12 ' );
10
+
11
+ $ result = openssl_pkcs12_read ($ p12 , $ cert_data , 'qwerty ' );
12
+ var_dump ($ result );
13
+ var_dump (openssl_error_string ());
14
+ ?>
15
+ --EXPECTF--
16
+ bool(true)
17
+ bool(false)
You can’t perform that action at this time.
0 commit comments