Update tests to match new test key

This commit is contained in:
Jakub Zelenka 2019-09-29 17:14:01 +01:00
parent 0d91de88ab
commit 467980cf56
19 changed files with 94 additions and 82 deletions

View file

@ -26,7 +26,7 @@ array(1) {
[0]=> [0]=>
array(5) { array(5) {
["fingerprint"]=> ["fingerprint"]=>
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
["validity"]=> ["validity"]=>
int(0) int(0)
["timestamp"]=> ["timestamp"]=>

View file

@ -15,26 +15,32 @@ var_dump($ret);
--EXPECTF-- --EXPECTF--
string(%d) "-----BEGIN PGP PUBLIC KEY BLOCK----- string(%d) "-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGiBENQAKwRBADpy828KU+0SuoetJTrJ5dR86PiO3CsH8K6QRP7wY82Eh/9NTJ3 mQENBF11JawBCAC6bWTtKtAj1dBih/UHR9iH1iADEmZde52aKyd7EXKtjs4Q2aXJ
afRj0FNPaVSP0NciPeM4G4uFoQ3lsIf+FBEPXH1D97/XigWObU8K6ha2/s8wU98z kbn9R+kcJNx+AlnTSePQBkNz5brmEAQgk93rOsHaPUEROkfBR2C6AkjaJNnk0E43
/samjTHLR+VKZ031B5/8p5Y49yvkkEyBkF1G85yeIXK0WZorKBPncRKuUwCgxOi/ pbUy6bWhmGR4kmpbvRnR/7kxVyplb5zSFAcio1I8RQ3ql0HkF//zLUouYzrMJn6e
IEa+ZuqHlmlDF2LTRIBOfrkEAK+WLRMWUD0bqj1TYwnxwPWiuns32/ZXLWuPfb5o GvffHw1revlSxo0leCcOsNE7AHGVgMxvUWYO0JT4Fs+JcpsTxG8MFE6I6SLZoY5W
crNt7x5LSe7wJhjyIiFhiU0qR33X/FrT2umzOxlRYfINXT9DUHDocxxbED6fxAHw XmtOsO0vMNJoTaXdqfJoLTkviPkRUZuF0DtzuT1oQLUTTaKvWxx2+33YF5HYrlNy
X2IDd5tWXgCkSBHn2yAneNY6ycPdS3RvqJGl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IC KEY BLOCK-----
" "
--CLEAN-- --CLEAN--

View file

@ -31,7 +31,7 @@ array(9) {
["skippedkeys"]=> ["skippedkeys"]=>
int(0) int(0)
["fingerprint"]=> ["fingerprint"]=>
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
} }
--CLEAN-- --CLEAN--
<?php <?php

View file

@ -11,17 +11,17 @@ $gpg = new gnupg();
$gpg->seterrormode(gnupg::ERROR_WARNING); $gpg->seterrormode(gnupg::ERROR_WARNING);
$ret = $gpg->listsignatures($fingerprint); $ret = $gpg->listsignatures($fingerprint);
$k1 = "testkey (testkey) <test@example.net>"; $k1 = "PHP GnuPG <gnupg@php.net>";
$k2 = "2E96F141B3DD2B2E"; $k2 = "669E775E0A6284B3";
gnupgt::check_array('testkey (testkey) <test@example.net>', $ret, $k1, $k2, 'uid'); gnupgt::check_array('PHP GnuPG <gnupg@php.net>', $ret, $k1, $k2, 'uid');
gnupgt::check_array('testkey', $ret, $k1, $k2, 'name'); gnupgt::check_array('PHP GnuPG', $ret, $k1, $k2, 'name');
gnupgt::check_array('test@example.net', $ret, $k1, $k2, 'email'); gnupgt::check_array('gnupg@php.net', $ret, $k1, $k2, 'email');
gnupgt::check_array('testkey', $ret, $k1, $k2, 'comment'); gnupgt::check_array('', $ret, $k1, $k2, 'comment');
gnupgt::check_array(0, $ret, $k1, $k2, 'expires'); gnupgt::check_array(0, $ret, $k1, $k2, 'expires');
gnupgt::check_array(false, $ret, $k1, $k2, 'revoked'); gnupgt::check_array(false, $ret, $k1, $k2, 'revoked');
gnupgt::check_array(false, $ret, $k1, $k2, 'expired'); gnupgt::check_array(false, $ret, $k1, $k2, 'expired');
gnupgt::check_array(false, $ret, $k1, $k2, 'invalid'); 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 Done

View file

@ -27,7 +27,7 @@ array(1) {
[0]=> [0]=>
array(5) { array(5) {
["fingerprint"]=> ["fingerprint"]=>
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
["validity"]=> ["validity"]=>
int(0) int(0)
["timestamp"]=> ["timestamp"]=>

View file

@ -27,7 +27,7 @@ array(1) {
[0]=> [0]=>
array(5) { array(5) {
["fingerprint"]=> ["fingerprint"]=>
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
["validity"]=> ["validity"]=>
int(0) int(0)
["timestamp"]=> ["timestamp"]=>

View file

@ -28,7 +28,7 @@ array(1) {
[0]=> [0]=>
array(5) { array(5) {
["fingerprint"]=> ["fingerprint"]=>
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
["validity"]=> ["validity"]=>
int(0) int(0)
["timestamp"]=> ["timestamp"]=>

View file

@ -28,7 +28,7 @@ array(1) {
[0]=> [0]=>
array(5) { array(5) {
["fingerprint"]=> ["fingerprint"]=>
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
["validity"]=> ["validity"]=>
int(0) int(0)
["timestamp"]=> ["timestamp"]=>

View file

@ -27,7 +27,7 @@ array(1) {
[0]=> [0]=>
array(5) { array(5) {
["fingerprint"]=> ["fingerprint"]=>
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
["validity"]=> ["validity"]=>
int(0) int(0)
["timestamp"]=> ["timestamp"]=>

View file

@ -31,7 +31,7 @@ array(9) {
["skippedkeys"]=> ["skippedkeys"]=>
int(0) int(0)
["fingerprint"]=> ["fingerprint"]=>
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
} }
--CLEAN-- --CLEAN--
<?php <?php

View file

@ -28,7 +28,7 @@ array(1) {
[0]=> [0]=>
array(5) { array(5) {
["fingerprint"]=> ["fingerprint"]=>
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
["validity"]=> ["validity"]=>
int(0) int(0)
["timestamp"]=> ["timestamp"]=>

View file

@ -15,26 +15,32 @@ var_dump($ret);
--EXPECTF-- --EXPECTF--
string(%d) "-----BEGIN PGP PUBLIC KEY BLOCK----- string(%d) "-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGiBENQAKwRBADpy828KU+0SuoetJTrJ5dR86PiO3CsH8K6QRP7wY82Eh/9NTJ3 mQENBF11JawBCAC6bWTtKtAj1dBih/UHR9iH1iADEmZde52aKyd7EXKtjs4Q2aXJ
afRj0FNPaVSP0NciPeM4G4uFoQ3lsIf+FBEPXH1D97/XigWObU8K6ha2/s8wU98z kbn9R+kcJNx+AlnTSePQBkNz5brmEAQgk93rOsHaPUEROkfBR2C6AkjaJNnk0E43
/samjTHLR+VKZ031B5/8p5Y49yvkkEyBkF1G85yeIXK0WZorKBPncRKuUwCgxOi/ pbUy6bWhmGR4kmpbvRnR/7kxVyplb5zSFAcio1I8RQ3ql0HkF//zLUouYzrMJn6e
IEa+ZuqHlmlDF2LTRIBOfrkEAK+WLRMWUD0bqj1TYwnxwPWiuns32/ZXLWuPfb5o GvffHw1revlSxo0leCcOsNE7AHGVgMxvUWYO0JT4Fs+JcpsTxG8MFE6I6SLZoY5W
crNt7x5LSe7wJhjyIiFhiU0qR33X/FrT2umzOxlRYfINXT9DUHDocxxbED6fxAHw XmtOsO0vMNJoTaXdqfJoLTkviPkRUZuF0DtzuT1oQLUTTaKvWxx2+33YF5HYrlNy
X2IDd5tWXgCkSBHn2yAneNY6ycPdS3Rv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PUBLIC KEY BLOCK-----
" "
--CLEAN-- --CLEAN--

View file

@ -11,17 +11,17 @@ $gpg = gnupg_init();
gnupg_seterrormode($gpg, GNUPG_ERROR_WARNING); gnupg_seterrormode($gpg, GNUPG_ERROR_WARNING);
$ret = gnupg_listsignatures($gpg, $fingerprint); $ret = gnupg_listsignatures($gpg, $fingerprint);
$k1 = "testkey (testkey) <test@example.net>"; $k1 = "PHP GnuPG <gnupg@php.net>";
$k2 = "2E96F141B3DD2B2E"; $k2 = "669E775E0A6284B3";
gnupgt::check_array('testkey (testkey) <test@example.net>', $ret, $k1, $k2, 'uid'); gnupgt::check_array('PHP GnuPG <gnupg@php.net>', $ret, $k1, $k2, 'uid');
gnupgt::check_array('testkey', $ret, $k1, $k2, 'name'); gnupgt::check_array('PHP GnuPG', $ret, $k1, $k2, 'name');
gnupgt::check_array('test@example.net', $ret, $k1, $k2, 'email'); gnupgt::check_array('gnupg@php.net', $ret, $k1, $k2, 'email');
gnupgt::check_array('testkey', $ret, $k1, $k2, 'comment'); gnupgt::check_array('', $ret, $k1, $k2, 'comment');
gnupgt::check_array(0, $ret, $k1, $k2, 'expires'); gnupgt::check_array(0, $ret, $k1, $k2, 'expires');
gnupgt::check_array(false, $ret, $k1, $k2, 'revoked'); gnupgt::check_array(false, $ret, $k1, $k2, 'revoked');
gnupgt::check_array(false, $ret, $k1, $k2, 'expired'); gnupgt::check_array(false, $ret, $k1, $k2, 'expired');
gnupgt::check_array(false, $ret, $k1, $k2, 'invalid'); 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 Done

View file

@ -25,7 +25,7 @@ array(1) {
[0]=> [0]=>
array(5) { array(5) {
["fingerprint"]=> ["fingerprint"]=>
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
["validity"]=> ["validity"]=>
int(0) int(0)
["timestamp"]=> ["timestamp"]=>

View file

@ -25,7 +25,7 @@ array(1) {
[0]=> [0]=>
array(5) { array(5) {
["fingerprint"]=> ["fingerprint"]=>
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
["validity"]=> ["validity"]=>
int(0) int(0)
["timestamp"]=> ["timestamp"]=>

View file

@ -28,7 +28,7 @@ array(1) {
[0]=> [0]=>
array(5) { array(5) {
["fingerprint"]=> ["fingerprint"]=>
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
["validity"]=> ["validity"]=>
int(0) int(0)
["timestamp"]=> ["timestamp"]=>

View file

@ -28,7 +28,7 @@ array(1) {
[0]=> [0]=>
array(5) { array(5) {
["fingerprint"]=> ["fingerprint"]=>
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
["validity"]=> ["validity"]=>
int(0) int(0)
["timestamp"]=> ["timestamp"]=>

View file

@ -28,7 +28,7 @@ array(1) {
[0]=> [0]=>
array(5) { array(5) {
["fingerprint"]=> ["fingerprint"]=>
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3"
["validity"]=> ["validity"]=>
int(0) int(0)
["timestamp"]=> ["timestamp"]=>

View file

@ -114,17 +114,17 @@ class gnupgt {
self::check_array(true, $ret, 0, 'can_sign'); self::check_array(true, $ret, 0, 'can_sign');
self::check_array(true, $ret, 0, 'can_encrypt'); self::check_array(true, $ret, 0, 'can_encrypt');
// uid // uid
self::check_array('testkey', $ret, 0, 'uids', 0, 'name'); self::check_array('PHP GnuPG', $ret, 0, 'uids', 0, 'name');
self::check_array('testkey', $ret, 0, 'uids', 0, 'comment'); self::check_array('', $ret, 0, 'uids', 0, 'comment');
self::check_array('test@example.net', $ret, 0, 'uids', 0, 'email'); self::check_array('gnupg@php.net', $ret, 0, 'uids', 0, 'email');
self::check_array('testkey (testkey) <test@example.net>', $ret, 0, 'uids', 0, 'uid'); 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, 'revoked');
self::check_array(false, $ret, 0, 'uids', 0, 'invalid'); self::check_array(false, $ret, 0, 'uids', 0, 'invalid');
self::check_array(false, $ret, 0, 'uids', 0, 'invalid'); self::check_array(false, $ret, 0, 'uids', 0, 'invalid');
// subkey 1 // subkey 1
self::check_array("64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E", $ret, 0, 'subkeys', 0, 'fingerprint'); self::check_array("2DF0DD02DC9B70B7F64F572E669E775E0A6284B3", $ret, 0, 'subkeys', 0, 'fingerprint');
self::check_array("2E96F141B3DD2B2E", $ret, 0, 'subkeys', 0, 'keyid'); self::check_array("669E775E0A6284B3", $ret, 0, 'subkeys', 0, 'keyid');
self::check_array(1129316524, $ret, 0, 'subkeys', 0, 'timestamp'); self::check_array(1567958444, $ret, 0, 'subkeys', 0, 'timestamp');
self::check_array(0, $ret, 0, 'subkeys', 0, 'expires'); self::check_array(0, $ret, 0, 'subkeys', 0, 'expires');
self::check_array($secret_only, $ret, 0, 'subkeys', 0, 'is_secret'); self::check_array($secret_only, $ret, 0, 'subkeys', 0, 'is_secret');
self::check_array(false, $ret, 0, 'subkeys', 0, 'can_encrypt'); 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, 'can_authenticate');
self::check_array(false, $ret, 0, 'subkeys', 0, 'is_qualified'); 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_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(GNUPG_PK_RSA, $ret, 0, 'subkeys', 0, 'pubkey_algo');
self::check_array(1024, $ret, 0, 'subkeys', 0, 'length'); self::check_array(2048, $ret, 0, 'subkeys', 0, 'length');
self::check_array_from_version('1.7.0', false, $ret, 0, 'subkeys', 0, 'is_cardkey'); self::check_array_from_version('1.7.0', false, $ret, 0, 'subkeys', 0, 'is_cardkey');
// subkey 2 // subkey 2
self::check_array("A3437D3651E27CF9864198F0BFE8D07DDACDEAC8", $ret, 0, 'subkeys', 1, 'fingerprint'); self::check_array("9E84AE800874DFF647B6062B46DCA9B3662C7DFC", $ret, 0, 'subkeys', 1, 'fingerprint');
self::check_array("BFE8D07DDACDEAC8", $ret, 0, 'subkeys', 1, 'keyid'); self::check_array("46DCA9B3662C7DFC", $ret, 0, 'subkeys', 1, 'keyid');
self::check_array(1129316525, $ret, 0, 'subkeys', 1, 'timestamp'); self::check_array(1567958444, $ret, 0, 'subkeys', 1, 'timestamp');
self::check_array(0, $ret, 0, 'subkeys', 1, 'expires'); self::check_array(0, $ret, 0, 'subkeys', 1, 'expires');
self::check_array($secret_only, $ret, 0, 'subkeys', 1, 'is_secret'); self::check_array($secret_only, $ret, 0, 'subkeys', 1, 'is_secret');
self::check_array(true, $ret, 0, 'subkeys', 1, 'can_encrypt'); 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, 'can_authenticate');
self::check_array(false, $ret, 0, 'subkeys', 1, 'is_qualified'); 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_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(GNUPG_PK_RSA, $ret, 0, 'subkeys', 1, 'pubkey_algo');
self::check_array(1024, $ret, 0, 'subkeys', 1, 'length'); self::check_array(2048, $ret, 0, 'subkeys', 1, 'length');
self::check_array_from_version('1.7.0', false, $ret, 0, 'subkeys', 1, 'is_cardkey'); self::check_array_from_version('1.7.0', false, $ret, 0, 'subkeys', 1, 'is_cardkey');
} }
} }