xref: /PHP-7.4/ext/openssl/tests/bug72336.phpt (revision 3c42f64e)
1--TEST--
2Bug #72336 (openssl_pkey_new does not fail for invalid DSA params)
3--SKIPIF--
4<?php if (!extension_loaded("openssl")) print "skip"; ?>
5--FILE--
6<?php
7$p = '00f8000ae45b2dacb47dd977d58b719d097bdf07cb2c17660ad898518c08' .
8    '1a61659a16daadfaa406a0a994c743df5eda07e36bd0adcad921b77432ff' .
9    '24ccc31e782d647e66768122b578857e9293df78387dc8b44af2a4a3f305' .
10    '1f236b1000a3e31da489c6681b0031f7ec37c2e1091bdb698e7660f135b6' .
11    '996def90090303b7ad';
12
13$q = '009b3734fc9f7a4a9d6437ec314e0a78c2889af64b';
14
15$g = '00b320300a0bc55b8f0ec6edc218e2185250f38fbb8291db8a89227f6e41' .
16    '00d47d6ccb9c7d42fc43280ecc2ed386e81ff65bc5d6a2ae78db7372f5dc' .
17    'f780f4558e7ed3dd0c96a1b40727ac56c5165aed700a3b63997893a1fb21' .
18    '4e882221f0dd9604820dc34e2725dd6901c93e0ca56f6d76d495c332edc5' .
19    'b81747c4c447a941f3';
20
21var_dump(openssl_pkey_new(array('dsa' => array('p' => $p, 'q' => $q, 'g' => $g))));
22?>
23--EXPECT--
24bool(false)
25