From 467980cf56c4a6920c3cc435be5250ab8e488c52 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sun, 29 Sep 2019 17:14:01 +0100 Subject: [PATCH] Update tests to match new test key --- tests/gnupg_oo_encryptsign.phpt | 2 +- tests/gnupg_oo_export.phpt | 46 +++++++++++++---------- tests/gnupg_oo_import.phpt | 2 +- tests/gnupg_oo_listsignatures.phpt | 14 +++---- tests/gnupg_oo_sign_clear.phpt | 2 +- tests/gnupg_oo_sign_detach.phpt | 2 +- tests/gnupg_oo_sign_detach_nonarmor.phpt | 2 +- tests/gnupg_oo_sign_normal.phpt | 2 +- tests/gnupg_oo_sign_normal_noarmor.phpt | 2 +- tests/gnupg_res_0001_import.phpt | 2 +- tests/gnupg_res_encryptsign.phpt | 2 +- tests/gnupg_res_export.phpt | 46 +++++++++++++---------- tests/gnupg_res_listsignatures.phpt | 14 +++---- tests/gnupg_res_sign_clear.phpt | 2 +- tests/gnupg_res_sign_detach.phpt | 2 +- tests/gnupg_res_sign_detach_nonarmor.phpt | 2 +- tests/gnupg_res_sign_normal.phpt | 2 +- tests/gnupg_res_sign_normal_noarmor.phpt | 2 +- tests/gnupgt.inc | 28 +++++++------- 19 files changed, 94 insertions(+), 82 deletions(-) diff --git a/tests/gnupg_oo_encryptsign.phpt b/tests/gnupg_oo_encryptsign.phpt index d0de745..3501276 100644 --- a/tests/gnupg_oo_encryptsign.phpt +++ b/tests/gnupg_oo_encryptsign.phpt @@ -26,7 +26,7 @@ array(1) { [0]=> array(5) { ["fingerprint"]=> - string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" + string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3" ["validity"]=> int(0) ["timestamp"]=> diff --git a/tests/gnupg_oo_export.phpt b/tests/gnupg_oo_export.phpt index cf0630b..c3cc480 100644 --- a/tests/gnupg_oo_export.phpt +++ b/tests/gnupg_oo_export.phpt @@ -15,26 +15,32 @@ var_dump($ret); --EXPECTF-- string(%d) "-----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F4 +NIe2OX6tEAK/hYkH0o91BwbMGAwiljKomL45G4vPb0ve86d/MGrtdeDRt8WhlDEB +VfKpxi1bFtq7KvHvnv51iATndM1wE2v79vssMdmJEPRipo+GHiPoThEoO2bdtwI1 +thHpUsdXPGpeMcM3F9FmdYpdsFsoyzZ6if7cbijhO4OArGNUm3oJTu66Vok9GjSa +V7HsLHJMNf/6Lc66FQSG8+kUKZ/R7s8NY+fS2oFONba3DT5qzA80rfiAFheeAFUz +HE3NLkkdPsnzNBOOtRot3bUAEQEAAYkBHwQYAQIACQUCXXUlrAIbDAAKCRBmnnde +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-- diff --git a/tests/gnupg_oo_import.phpt b/tests/gnupg_oo_import.phpt index 66f0e03..80ed575 100644 --- a/tests/gnupg_oo_import.phpt +++ b/tests/gnupg_oo_import.phpt @@ -31,7 +31,7 @@ array(9) { ["skippedkeys"]=> int(0) ["fingerprint"]=> - string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" + string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3" } --CLEAN-- seterrormode(gnupg::ERROR_WARNING); $ret = $gpg->listsignatures($fingerprint); -$k1 = "testkey (testkey) "; -$k2 = "2E96F141B3DD2B2E"; -gnupgt::check_array('testkey (testkey) ', $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 "; +$k2 = "669E775E0A6284B3"; +gnupgt::check_array('PHP GnuPG ', $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 diff --git a/tests/gnupg_oo_sign_clear.phpt b/tests/gnupg_oo_sign_clear.phpt index 40b3e84..4f9b79c 100644 --- a/tests/gnupg_oo_sign_clear.phpt +++ b/tests/gnupg_oo_sign_clear.phpt @@ -27,7 +27,7 @@ array(1) { [0]=> array(5) { ["fingerprint"]=> - string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" + string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3" ["validity"]=> int(0) ["timestamp"]=> diff --git a/tests/gnupg_oo_sign_detach.phpt b/tests/gnupg_oo_sign_detach.phpt index feb9e30..7d5a131 100644 --- a/tests/gnupg_oo_sign_detach.phpt +++ b/tests/gnupg_oo_sign_detach.phpt @@ -27,7 +27,7 @@ array(1) { [0]=> array(5) { ["fingerprint"]=> - string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" + string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3" ["validity"]=> int(0) ["timestamp"]=> diff --git a/tests/gnupg_oo_sign_detach_nonarmor.phpt b/tests/gnupg_oo_sign_detach_nonarmor.phpt index 4642aaf..b67af74 100644 --- a/tests/gnupg_oo_sign_detach_nonarmor.phpt +++ b/tests/gnupg_oo_sign_detach_nonarmor.phpt @@ -28,7 +28,7 @@ array(1) { [0]=> array(5) { ["fingerprint"]=> - string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" + string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3" ["validity"]=> int(0) ["timestamp"]=> diff --git a/tests/gnupg_oo_sign_normal.phpt b/tests/gnupg_oo_sign_normal.phpt index 58d0117..bac4251 100644 --- a/tests/gnupg_oo_sign_normal.phpt +++ b/tests/gnupg_oo_sign_normal.phpt @@ -28,7 +28,7 @@ array(1) { [0]=> array(5) { ["fingerprint"]=> - string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" + string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3" ["validity"]=> int(0) ["timestamp"]=> diff --git a/tests/gnupg_oo_sign_normal_noarmor.phpt b/tests/gnupg_oo_sign_normal_noarmor.phpt index ee42f47..2d96fa9 100644 --- a/tests/gnupg_oo_sign_normal_noarmor.phpt +++ b/tests/gnupg_oo_sign_normal_noarmor.phpt @@ -27,7 +27,7 @@ array(1) { [0]=> array(5) { ["fingerprint"]=> - string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" + string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3" ["validity"]=> int(0) ["timestamp"]=> diff --git a/tests/gnupg_res_0001_import.phpt b/tests/gnupg_res_0001_import.phpt index 6c6e672..ea21e94 100644 --- a/tests/gnupg_res_0001_import.phpt +++ b/tests/gnupg_res_0001_import.phpt @@ -31,7 +31,7 @@ array(9) { ["skippedkeys"]=> int(0) ["fingerprint"]=> - string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" + string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3" } --CLEAN-- array(5) { ["fingerprint"]=> - string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" + string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3" ["validity"]=> int(0) ["timestamp"]=> diff --git a/tests/gnupg_res_export.phpt b/tests/gnupg_res_export.phpt index 1fb879a..085838e 100644 --- a/tests/gnupg_res_export.phpt +++ b/tests/gnupg_res_export.phpt @@ -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+iF4EExECAB4FAkNQAKwCGwMGCwkI -BwMCAxUCAwMWAgECHgECF4AACgkQLpbxQbPdKy58pwCcDz9qEBEVt1gcKCwNay0f -m4vLqCkAn1P0KV1giECUVXBuZ5YUndDB1QqtuQENBENQAK0QBACNXzJQG4NHUJqL -PImezbl+ii+93MjMo8LpSlv9Np5ruWIKtxuqmVEe4k+r1DDmS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LRqoJEl3yo3OW8/uE1a/ldivuMux5IEcA03l +5L/5g2QOe9cRxk+x9JCXBPqjJ9OIVMUUReGBVSfscGAhnD0bW/aNf5//eGkU9Gai +CCSdnIKCopRJSIZcv3OF+P+vh3gmGXAByyQKRvwpBdvosIsiEXi5AQ0EXXUlrAEI +AO43Q3D/VgdGGpHa4P0ppv6gY5jBnPHvpyd3Opu497H0z6Xe8rZfRxSpyOViPjF4 +NIe2OX6tEAK/hYkH0o91BwbMGAwiljKomL45G4vPb0ve86d/MGrtdeDRt8WhlDEB +VfKpxi1bFtq7KvHvnv51iATndM1wE2v79vssMdmJEPRipo+GHiPoThEoO2bdtwI1 +thHpUsdXPGpeMcM3F9FmdYpdsFsoyzZ6if7cbijhO4OArGNUm3oJTu66Vok9GjSa +V7HsLHJMNf/6Lc66FQSG8+kUKZ/R7s8NY+fS2oFONba3DT5qzA80rfiAFheeAFUz +HE3NLkkdPsnzNBOOtRot3bUAEQEAAYkBHwQYAQIACQUCXXUlrAIbDAAKCRBmnnde +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-- diff --git a/tests/gnupg_res_listsignatures.phpt b/tests/gnupg_res_listsignatures.phpt index 8344337..834db5f 100644 --- a/tests/gnupg_res_listsignatures.phpt +++ b/tests/gnupg_res_listsignatures.phpt @@ -11,17 +11,17 @@ $gpg = gnupg_init(); gnupg_seterrormode($gpg, GNUPG_ERROR_WARNING); $ret = gnupg_listsignatures($gpg, $fingerprint); -$k1 = "testkey (testkey) "; -$k2 = "2E96F141B3DD2B2E"; -gnupgt::check_array('testkey (testkey) ', $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 "; +$k2 = "669E775E0A6284B3"; +gnupgt::check_array('PHP GnuPG ', $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 diff --git a/tests/gnupg_res_sign_clear.phpt b/tests/gnupg_res_sign_clear.phpt index 19d02c8..71dd6c2 100644 --- a/tests/gnupg_res_sign_clear.phpt +++ b/tests/gnupg_res_sign_clear.phpt @@ -25,7 +25,7 @@ array(1) { [0]=> array(5) { ["fingerprint"]=> - string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" + string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3" ["validity"]=> int(0) ["timestamp"]=> diff --git a/tests/gnupg_res_sign_detach.phpt b/tests/gnupg_res_sign_detach.phpt index 8bf0a63..5572382 100644 --- a/tests/gnupg_res_sign_detach.phpt +++ b/tests/gnupg_res_sign_detach.phpt @@ -25,7 +25,7 @@ array(1) { [0]=> array(5) { ["fingerprint"]=> - string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" + string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3" ["validity"]=> int(0) ["timestamp"]=> diff --git a/tests/gnupg_res_sign_detach_nonarmor.phpt b/tests/gnupg_res_sign_detach_nonarmor.phpt index 19785e1..6332768 100644 --- a/tests/gnupg_res_sign_detach_nonarmor.phpt +++ b/tests/gnupg_res_sign_detach_nonarmor.phpt @@ -28,7 +28,7 @@ array(1) { [0]=> array(5) { ["fingerprint"]=> - string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" + string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3" ["validity"]=> int(0) ["timestamp"]=> diff --git a/tests/gnupg_res_sign_normal.phpt b/tests/gnupg_res_sign_normal.phpt index 825cc0d..53953a3 100644 --- a/tests/gnupg_res_sign_normal.phpt +++ b/tests/gnupg_res_sign_normal.phpt @@ -28,7 +28,7 @@ array(1) { [0]=> array(5) { ["fingerprint"]=> - string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" + string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3" ["validity"]=> int(0) ["timestamp"]=> diff --git a/tests/gnupg_res_sign_normal_noarmor.phpt b/tests/gnupg_res_sign_normal_noarmor.phpt index 8cee2a9..cc9d1b7 100644 --- a/tests/gnupg_res_sign_normal_noarmor.phpt +++ b/tests/gnupg_res_sign_normal_noarmor.phpt @@ -28,7 +28,7 @@ array(1) { [0]=> array(5) { ["fingerprint"]=> - string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E" + string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3" ["validity"]=> int(0) ["timestamp"]=> diff --git a/tests/gnupgt.inc b/tests/gnupgt.inc index acbe399..8aab3b6 100644 --- a/tests/gnupgt.inc +++ b/tests/gnupgt.inc @@ -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) ', $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 ', $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'); } } \ No newline at end of file