PATH:
opt
/
alt
/
tests
/
alt-php81-pecl-gnupg_1.5.1-1.el8
/
tests
--TEST-- sign a text with mode SIG_MODE_NORMAL and without armored output --SKIPIF-- <?php if(!class_exists("gnupg")) die("skip"); ?> --FILE-- <?php require_once "gnupgt.inc"; gnupgt::import_key(); $gpg = new gnupg(); $gpg->seterrormode(gnupg::ERROR_WARNING); $gpg->setarmor(0); $gpg->setsignmode(gnupg::SIG_MODE_NORMAL); $gpg->addsignkey($fingerprint, $passphrase); $ret = $gpg->sign($plaintext); $gpg = new gnupg(); //$ret = $gpg->verify($plaintext, $ret); $plaintext = false; $ret = $gpg->verify($ret, false, $plaintext); var_dump($ret); var_dump($plaintext); ?> --EXPECTF-- array(1) { [0]=> array(5) { ["fingerprint"]=> string(40) "2DF0DD02DC9B70B7F64F572E669E775E0A6284B3" ["validity"]=> int(0) ["timestamp"]=> int(%d) ["status"]=> int(0) ["summary"]=> int(0) } } string(7) "foo bar" --CLEAN-- <?php require_once "gnupgt.inc"; gnupgt::delete_key(); ?>
[-] gnupg_res_init_file_name.phpt
[edit]
[-] gnupg_oo_import.phpt
[edit]
[-] gnupg_res_deletekey.phpt
[edit]
[-] gnupg_res_sign_normal.phpt
[edit]
[-] gnupg_oo_sign_normal.phpt
[edit]
[-] gnupg_res_sign_normal_noarmor.phpt
[edit]
[-] gnupg_res_init_home_dir.phpt
[edit]
[-] gnupg_res_export.phpt
[edit]
[-] gnupg_res_import.phpt
[edit]
[-] gnupg_oo_keyinfo.phpt
[edit]
[-] gnupg_oo_export.phpt
[edit]
[-] gnupgt.inc
[edit]
[-] gnupg_res_sign_detach_nonarmor.phpt
[edit]
[-] gnupg_res_geterrorinfo.phpt
[edit]
[-] gnupg_res_encryptsign.phpt
[edit]
[-] gnupg_res_sign_detach.phpt
[edit]
[-] gnupg_oo_sign_clear.phpt
[edit]
[-] gnupg_oo_geterror.phpt
[edit]
[-] gnupg_res_sign_clear.phpt
[edit]
[-] gnupg_res_getengineinfo.phpt
[edit]
[-] gnupg_oo_sign_detach_nonarmor.phpt
[edit]
[-] gnupg_oo_geterrorinfo.phpt
[edit]
[-] gnupg_oo_listsignatures.phpt
[edit]
[+]
..
[-] gnupg_oo_sign_normal_noarmor.phpt
[edit]
[-] gnupg_oo_encryptsign.phpt
[edit]
[-] gnupg_oo_deletekey.phpt
[edit]
[-] gnupg_res_geterror.phpt
[edit]
[-] gnupg_res_listsignatures.phpt
[edit]
[-] gnupg_oo_init_file_name.phpt
[edit]
[-] gnupg_oo_sign_detach.phpt
[edit]
[-] gnupg_oo_encrypt.phpt
[edit]
[-] gnupg_oo_getengineinfo.phpt
[edit]
[-] gnupg_oo_init_home_dir.phpt
[edit]
[-] gnupg_res_keyinfo.phpt
[edit]
[-] vars.inc
[edit]
[-] gnupg_res_encrypt.phpt
[edit]