Skip to content

Commit

Permalink
Fix occasionally failing OpenSSL DH bug test
Browse files Browse the repository at this point in the history
The test was failing when first byte was 0
  • Loading branch information
bukka committed Jun 16, 2016
1 parent 5f4113e commit 84948e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ext/openssl/tests/bug55259.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ $dh = openssl_pkey_new(array( 'dh'=> array( 'p' => hex2bin($phex), 'g' => '2' ))
$details = openssl_pkey_get_details($dh);
var_dump(bin2hex($details['dh']['p']));
var_dump($details['dh']['g']);
var_dump(strlen($details['dh']['pub_key']));
var_dump(strlen($details['dh']['priv_key']));
var_dump(strlen($details['dh']['pub_key']) > 0);
var_dump(strlen($details['dh']['priv_key']) > 0);
echo "Done";
?>
--EXPECT--
bool(false)
string(256) "dcf93a0b883972ec0e19989ac5a2ce310e1d37717e8d9571bb7623731866e61ef75a2e27898b057f9891c2e27a639c3f29b60814581cd3b2ca3986d2683705577d45c2e7e52dc81c7a171876e5cea74b1448bfdfaf18828efd2519f14e45e3826634af1949e5b535cc829a483b8a76223e5d490a257f05bdff16f2fb22c583ab"
string(1) "2"
int(128)
int(128)
bool(true)
bool(true)
Done

0 comments on commit 84948e6

Please sign in to comment.