Skip to content

Commit 78675eb

Browse files
committed
Fix flaky openssl_pkey_new test
Public key size may vary by one bit... switch to using %d for key sizes.
1 parent d0fcc74 commit 78675eb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ext/openssl/tests/openssl_pkey_new_basic.phpt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ $details = openssl_pkey_get_details($dh);
8686
$dh_details = $details['dh'];
8787
openssl_pkey_test_cmp($phex, $dh_details['p']);
8888
var_dump($dh_details['g']);
89-
var_dump(strlen($dh_details['pub_key']) > 0);
90-
var_dump(strlen($dh_details['priv_key']) > 0);
89+
var_dump(strlen($dh_details['pub_key']));
90+
var_dump(strlen($dh_details['priv_key']));
9191
?>
92-
--EXPECT--
92+
--EXPECTF--
9393
int(0)
9494
int(0)
9595
int(0)
@@ -98,9 +98,9 @@ int(0)
9898
int(0)
9999
int(0)
100100
int(0)
101-
int(20)
102-
int(128)
101+
int(%d)
102+
int(%d)
103103
int(0)
104104
string(1) "2"
105-
bool(true)
106-
bool(true)
105+
int(%d)
106+
int(%d)

0 commit comments

Comments
 (0)