mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2024-11-21 14:07:10 +00:00
Update tests to match new test key
This commit is contained in:
parent
0d91de88ab
commit
467980cf56
19 changed files with 94 additions and 82 deletions
|
@ -26,7 +26,7 @@ array(1) {
|
|||
[0]=>
|
||||
array(5) {
|
||||
["fingerprint"]=>
|
||||
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E"
|
||||
string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
|
||||
["validity"]=>
|
||||
int(0)
|
||||
["timestamp"]=>
|
||||
|
|
|
@ -15,26 +15,32 @@ var_dump($ret);
|
|||
--EXPECTF--
|
||||
string(%d) "-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQGiBENQAKwRBADpy828KU+0SuoetJTrJ5dR86PiO3CsH8K6QRP7wY82Eh/9NTJ3
|
||||
afRj0FNPaVSP0NciPeM4G4uFoQ3lsIf+FBEPXH1D97/XigWObU8K6ha2/s8wU98z
|
||||
/samjTHLR+VKZ031B5/8p5Y49yvkkEyBkF1G85yeIXK0WZorKBPncRKuUwCgxOi/
|
||||
IEa+ZuqHlmlDF2LTRIBOfrkEAK+WLRMWUD0bqj1TYwnxwPWiuns32/ZXLWuPfb5o
|
||||
crNt7x5LSe7wJhjyIiFhiU0qR33X/FrT2umzOxlRYfINXT9DUHDocxxbED6fxAHw
|
||||
X2IDd5tWXgCkSBHn2yAneNY6ycPdS3RvqJGlYFg7cOc0kz4urjqRt9fIagzpZQtL
|
||||
fXHfBACl3EWgvLhVBo5ExZbrtlOA2q0x9UGhhNaSkeBWBr2qDeZErQjMTO0+viaN
|
||||
/SX0zxeWtM3z06rkUHd1DKORDRM5R7shBTv9/Quojn0gbYbOem+e1mlCe27TRxcP
|
||||
yeIKk00PqbVuff9QlK9GqKEWGzsEXCmxZ160Dul3CGlf/vQZHbQkdGVzdGtleSAo
|
||||
dGVzdGtleSkgPHRlc3RAZXhhbXBsZS5uZXQ+iF4EExECAB4F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wJ/VGS9KEWut1F5akJNv/3klMW6
|
||||
UTIxnj0IMlnL+GaPBf+f1+3Pxoli37aeISxzvLhtquLXc++ls9ICwF6CN9D+Vtp+
|
||||
H2JaNPDtdHUzVBv0xQ1E3B1XeCiOIDFwWPWvCCY1FbgKXNrn5fdgsk69dLtTGJ4A
|
||||
WU7na8AWygvMcdtuGjpNE4g24ln7Rrce
|
||||
=sQ2w
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
"
|
||||
--CLEAN--
|
||||
|
|
|
@ -31,7 +31,7 @@ array(9) {
|
|||
["skippedkeys"]=>
|
||||
int(0)
|
||||
["fingerprint"]=>
|
||||
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E"
|
||||
string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
|
||||
}
|
||||
--CLEAN--
|
||||
<?php
|
||||
|
|
|
@ -11,17 +11,17 @@ $gpg = new gnupg();
|
|||
$gpg->seterrormode(gnupg::ERROR_WARNING);
|
||||
$ret = $gpg->listsignatures($fingerprint);
|
||||
|
||||
$k1 = "testkey (testkey) <test@example.net>";
|
||||
$k2 = "2E96F141B3DD2B2E";
|
||||
gnupgt::check_array('testkey (testkey) <test@example.net>', $ret, $k1, $k2, 'uid');
|
||||
gnupgt::check_array('testkey', $ret, $k1, $k2, 'name');
|
||||
gnupgt::check_array('test@example.net', $ret, $k1, $k2, 'email');
|
||||
gnupgt::check_array('testkey', $ret, $k1, $k2, 'comment');
|
||||
$k1 = "PHP GnuPG <gnupg@php.net>";
|
||||
$k2 = "669E775E0A6284B3";
|
||||
gnupgt::check_array('PHP GnuPG <gnupg@php.net>', $ret, $k1, $k2, 'uid');
|
||||
gnupgt::check_array('PHP GnuPG', $ret, $k1, $k2, 'name');
|
||||
gnupgt::check_array('gnupg@php.net', $ret, $k1, $k2, 'email');
|
||||
gnupgt::check_array('', $ret, $k1, $k2, 'comment');
|
||||
gnupgt::check_array(0, $ret, $k1, $k2, 'expires');
|
||||
gnupgt::check_array(false, $ret, $k1, $k2, 'revoked');
|
||||
gnupgt::check_array(false, $ret, $k1, $k2, 'expired');
|
||||
gnupgt::check_array(false, $ret, $k1, $k2, 'invalid');
|
||||
gnupgt::check_array(1129316524, $ret, $k1, $k2, 'timestamp');
|
||||
gnupgt::check_array(1567958444, $ret, $k1, $k2, 'timestamp');
|
||||
|
||||
?>
|
||||
Done
|
||||
|
|
|
@ -27,7 +27,7 @@ array(1) {
|
|||
[0]=>
|
||||
array(5) {
|
||||
["fingerprint"]=>
|
||||
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E"
|
||||
string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
|
||||
["validity"]=>
|
||||
int(0)
|
||||
["timestamp"]=>
|
||||
|
|
|
@ -27,7 +27,7 @@ array(1) {
|
|||
[0]=>
|
||||
array(5) {
|
||||
["fingerprint"]=>
|
||||
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E"
|
||||
string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
|
||||
["validity"]=>
|
||||
int(0)
|
||||
["timestamp"]=>
|
||||
|
|
|
@ -28,7 +28,7 @@ array(1) {
|
|||
[0]=>
|
||||
array(5) {
|
||||
["fingerprint"]=>
|
||||
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E"
|
||||
string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
|
||||
["validity"]=>
|
||||
int(0)
|
||||
["timestamp"]=>
|
||||
|
|
|
@ -28,7 +28,7 @@ array(1) {
|
|||
[0]=>
|
||||
array(5) {
|
||||
["fingerprint"]=>
|
||||
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E"
|
||||
string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
|
||||
["validity"]=>
|
||||
int(0)
|
||||
["timestamp"]=>
|
||||
|
|
|
@ -27,7 +27,7 @@ array(1) {
|
|||
[0]=>
|
||||
array(5) {
|
||||
["fingerprint"]=>
|
||||
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E"
|
||||
string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
|
||||
["validity"]=>
|
||||
int(0)
|
||||
["timestamp"]=>
|
||||
|
|
|
@ -31,7 +31,7 @@ array(9) {
|
|||
["skippedkeys"]=>
|
||||
int(0)
|
||||
["fingerprint"]=>
|
||||
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E"
|
||||
string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
|
||||
}
|
||||
--CLEAN--
|
||||
<?php
|
||||
|
|
|
@ -28,7 +28,7 @@ array(1) {
|
|||
[0]=>
|
||||
array(5) {
|
||||
["fingerprint"]=>
|
||||
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E"
|
||||
string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
|
||||
["validity"]=>
|
||||
int(0)
|
||||
["timestamp"]=>
|
||||
|
|
|
@ -15,26 +15,32 @@ var_dump($ret);
|
|||
--EXPECTF--
|
||||
string(%d) "-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQGiBENQAKwRBADpy828KU+0SuoetJTrJ5dR86PiO3CsH8K6QRP7wY82Eh/9NTJ3
|
||||
afRj0FNPaVSP0NciPeM4G4uFoQ3lsIf+FBEPXH1D97/XigWObU8K6ha2/s8wU98z
|
||||
/samjTHLR+VKZ031B5/8p5Y49yvkkEyBkF1G85yeIXK0WZorKBPncRKuUwCgxOi/
|
||||
IEa+ZuqHlmlDF2LTRIBOfrkEAK+WLRMWUD0bqj1TYwnxwPWiuns32/ZXLWuPfb5o
|
||||
crNt7x5LSe7wJhjyIiFhiU0qR33X/FrT2umzOxlRYfINXT9DUHDocxxbED6fxAHw
|
||||
X2IDd5tWXgCkSBHn2yAneNY6ycPdS3RvqJGlYFg7cOc0kz4urjqRt9fIagzpZQtL
|
||||
fXHfBACl3EWgvLhVBo5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OOtRot3bUAEQEAAYkBHwQYAQIACQUCXXUlrAIbDAAKCRBmnnde
|
||||
CmKEs3t+B/4vUc2oXZXuEzIfL7Atv20VJomQCHrsbnNHErqCDJ+TpH6yjcKGGBNR
|
||||
zlOOUpZWFN1Ii2Wml+XIIzOXiOhhH/A6iTTAVl72RQWwiRjm8kYYWThT4msPd5yX
|
||||
QulbZRMxorIIrzs0tjIc5z5FXhSQhIaRjMSKqwJ/VGS9KEWut1F5akJNv/3klMW6
|
||||
UTIxnj0IMlnL+GaPBf+f1+3Pxoli37aeISxzvLhtquLXc++ls9ICwF6CN9D+Vtp+
|
||||
H2JaNPDtdHUzVBv0xQ1E3B1XeCiOIDFwWPWvCCY1FbgKXNrn5fdgsk69dLtTGJ4A
|
||||
WU7na8AWygvMcdtuGjpNE4g24ln7Rrce
|
||||
=sQ2w
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
"
|
||||
--CLEAN--
|
||||
|
|
|
@ -11,17 +11,17 @@ $gpg = gnupg_init();
|
|||
gnupg_seterrormode($gpg, GNUPG_ERROR_WARNING);
|
||||
$ret = gnupg_listsignatures($gpg, $fingerprint);
|
||||
|
||||
$k1 = "testkey (testkey) <test@example.net>";
|
||||
$k2 = "2E96F141B3DD2B2E";
|
||||
gnupgt::check_array('testkey (testkey) <test@example.net>', $ret, $k1, $k2, 'uid');
|
||||
gnupgt::check_array('testkey', $ret, $k1, $k2, 'name');
|
||||
gnupgt::check_array('test@example.net', $ret, $k1, $k2, 'email');
|
||||
gnupgt::check_array('testkey', $ret, $k1, $k2, 'comment');
|
||||
$k1 = "PHP GnuPG <gnupg@php.net>";
|
||||
$k2 = "669E775E0A6284B3";
|
||||
gnupgt::check_array('PHP GnuPG <gnupg@php.net>', $ret, $k1, $k2, 'uid');
|
||||
gnupgt::check_array('PHP GnuPG', $ret, $k1, $k2, 'name');
|
||||
gnupgt::check_array('gnupg@php.net', $ret, $k1, $k2, 'email');
|
||||
gnupgt::check_array('', $ret, $k1, $k2, 'comment');
|
||||
gnupgt::check_array(0, $ret, $k1, $k2, 'expires');
|
||||
gnupgt::check_array(false, $ret, $k1, $k2, 'revoked');
|
||||
gnupgt::check_array(false, $ret, $k1, $k2, 'expired');
|
||||
gnupgt::check_array(false, $ret, $k1, $k2, 'invalid');
|
||||
gnupgt::check_array(1129316524, $ret, $k1, $k2, 'timestamp');
|
||||
gnupgt::check_array(1567958444, $ret, $k1, $k2, 'timestamp');
|
||||
|
||||
?>
|
||||
Done
|
||||
|
|
|
@ -25,7 +25,7 @@ array(1) {
|
|||
[0]=>
|
||||
array(5) {
|
||||
["fingerprint"]=>
|
||||
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E"
|
||||
string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
|
||||
["validity"]=>
|
||||
int(0)
|
||||
["timestamp"]=>
|
||||
|
|
|
@ -25,7 +25,7 @@ array(1) {
|
|||
[0]=>
|
||||
array(5) {
|
||||
["fingerprint"]=>
|
||||
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E"
|
||||
string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
|
||||
["validity"]=>
|
||||
int(0)
|
||||
["timestamp"]=>
|
||||
|
|
|
@ -28,7 +28,7 @@ array(1) {
|
|||
[0]=>
|
||||
array(5) {
|
||||
["fingerprint"]=>
|
||||
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E"
|
||||
string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
|
||||
["validity"]=>
|
||||
int(0)
|
||||
["timestamp"]=>
|
||||
|
|
|
@ -28,7 +28,7 @@ array(1) {
|
|||
[0]=>
|
||||
array(5) {
|
||||
["fingerprint"]=>
|
||||
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E"
|
||||
string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
|
||||
["validity"]=>
|
||||
int(0)
|
||||
["timestamp"]=>
|
||||
|
|
|
@ -28,7 +28,7 @@ array(1) {
|
|||
[0]=>
|
||||
array(5) {
|
||||
["fingerprint"]=>
|
||||
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E"
|
||||
string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
|
||||
["validity"]=>
|
||||
int(0)
|
||||
["timestamp"]=>
|
||||
|
|
|
@ -114,17 +114,17 @@ class gnupgt {
|
|||
self::check_array(true, $ret, 0, 'can_sign');
|
||||
self::check_array(true, $ret, 0, 'can_encrypt');
|
||||
// uid
|
||||
self::check_array('testkey', $ret, 0, 'uids', 0, 'name');
|
||||
self::check_array('testkey', $ret, 0, 'uids', 0, 'comment');
|
||||
self::check_array('test@example.net', $ret, 0, 'uids', 0, 'email');
|
||||
self::check_array('testkey (testkey) <test@example.net>', $ret, 0, 'uids', 0, 'uid');
|
||||
self::check_array('PHP GnuPG', $ret, 0, 'uids', 0, 'name');
|
||||
self::check_array('', $ret, 0, 'uids', 0, 'comment');
|
||||
self::check_array('gnupg@php.net', $ret, 0, 'uids', 0, 'email');
|
||||
self::check_array('PHP GnuPG <gnupg@php.net>', $ret, 0, 'uids', 0, 'uid');
|
||||
self::check_array(false, $ret, 0, 'uids', 0, 'revoked');
|
||||
self::check_array(false, $ret, 0, 'uids', 0, 'invalid');
|
||||
self::check_array(false, $ret, 0, 'uids', 0, 'invalid');
|
||||
// subkey 1
|
||||
self::check_array("64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E", $ret, 0, 'subkeys', 0, 'fingerprint');
|
||||
self::check_array("2E96F141B3DD2B2E", $ret, 0, 'subkeys', 0, 'keyid');
|
||||
self::check_array(1129316524, $ret, 0, 'subkeys', 0, 'timestamp');
|
||||
self::check_array("2DF0DD02DC9B70B7F64F572E669E775E0A6284B3", $ret, 0, 'subkeys', 0, 'fingerprint');
|
||||
self::check_array("669E775E0A6284B3", $ret, 0, 'subkeys', 0, 'keyid');
|
||||
self::check_array(1567958444, $ret, 0, 'subkeys', 0, 'timestamp');
|
||||
self::check_array(0, $ret, 0, 'subkeys', 0, 'expires');
|
||||
self::check_array($secret_only, $ret, 0, 'subkeys', 0, 'is_secret');
|
||||
self::check_array(false, $ret, 0, 'subkeys', 0, 'can_encrypt');
|
||||
|
@ -136,13 +136,13 @@ class gnupgt {
|
|||
self::check_array(false, $ret, 0, 'subkeys', 0, 'can_authenticate');
|
||||
self::check_array(false, $ret, 0, 'subkeys', 0, 'is_qualified');
|
||||
self::check_array_from_version('1.9.0', false, $ret, 0, 'subkeys', 0, 'is_de_vs');
|
||||
self::check_array(GNUPG_PK_DSA, $ret, 0, 'subkeys', 0, 'pubkey_algo');
|
||||
self::check_array(1024, $ret, 0, 'subkeys', 0, 'length');
|
||||
self::check_array(GNUPG_PK_RSA, $ret, 0, 'subkeys', 0, 'pubkey_algo');
|
||||
self::check_array(2048, $ret, 0, 'subkeys', 0, 'length');
|
||||
self::check_array_from_version('1.7.0', false, $ret, 0, 'subkeys', 0, 'is_cardkey');
|
||||
// subkey 2
|
||||
self::check_array("A3437D3651E27CF9864198F0BFE8D07DDACDEAC8", $ret, 0, 'subkeys', 1, 'fingerprint');
|
||||
self::check_array("BFE8D07DDACDEAC8", $ret, 0, 'subkeys', 1, 'keyid');
|
||||
self::check_array(1129316525, $ret, 0, 'subkeys', 1, 'timestamp');
|
||||
self::check_array("9E84AE800874DFF647B6062B46DCA9B3662C7DFC", $ret, 0, 'subkeys', 1, 'fingerprint');
|
||||
self::check_array("46DCA9B3662C7DFC", $ret, 0, 'subkeys', 1, 'keyid');
|
||||
self::check_array(1567958444, $ret, 0, 'subkeys', 1, 'timestamp');
|
||||
self::check_array(0, $ret, 0, 'subkeys', 1, 'expires');
|
||||
self::check_array($secret_only, $ret, 0, 'subkeys', 1, 'is_secret');
|
||||
self::check_array(true, $ret, 0, 'subkeys', 1, 'can_encrypt');
|
||||
|
@ -154,8 +154,8 @@ class gnupgt {
|
|||
self::check_array(false, $ret, 0, 'subkeys', 1, 'can_authenticate');
|
||||
self::check_array(false, $ret, 0, 'subkeys', 1, 'is_qualified');
|
||||
self::check_array_from_version('1.9.0', false, $ret, 0, 'subkeys', 1, 'is_de_vs');
|
||||
self::check_array(GNUPG_PK_ELG_E, $ret, 0, 'subkeys', 1, 'pubkey_algo');
|
||||
self::check_array(1024, $ret, 0, 'subkeys', 1, 'length');
|
||||
self::check_array(GNUPG_PK_RSA, $ret, 0, 'subkeys', 1, 'pubkey_algo');
|
||||
self::check_array(2048, $ret, 0, 'subkeys', 1, 'length');
|
||||
self::check_array_from_version('1.7.0', false, $ret, 0, 'subkeys', 1, 'is_cardkey');
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue