2018-05-17 19:15:14 +00:00
|
|
|
--TEST--
|
2006-05-18 19:32:32 +00:00
|
|
|
list signatures
|
2006-11-03 12:39:53 +00:00
|
|
|
--SKIPIF--
|
|
|
|
<?php if(!class_exists("gnupg")) die("skip"); ?>
|
2006-05-18 19:32:32 +00:00
|
|
|
--FILE--
|
|
|
|
<?php
|
2018-05-17 19:15:14 +00:00
|
|
|
require_once "gnupgt.inc";
|
|
|
|
gnupgt::import_key();
|
|
|
|
|
2006-05-18 19:32:32 +00:00
|
|
|
$gpg = new gnupg();
|
2018-05-17 19:15:14 +00:00
|
|
|
$gpg->seterrormode(gnupg::ERROR_WARNING);
|
|
|
|
$ret = $gpg->listsignatures($fingerprint);
|
2018-06-22 18:28:41 +00:00
|
|
|
|
2019-09-29 16:14:01 +00:00
|
|
|
$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');
|
2018-06-22 18:28:41 +00:00
|
|
|
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');
|
2019-09-29 16:14:01 +00:00
|
|
|
gnupgt::check_array(1567958444, $ret, $k1, $k2, 'timestamp');
|
2018-06-22 18:28:41 +00:00
|
|
|
|
2006-05-18 19:32:32 +00:00
|
|
|
?>
|
2018-06-22 18:28:41 +00:00
|
|
|
Done
|
2006-05-18 19:32:32 +00:00
|
|
|
--EXPECT--
|
2018-06-22 18:28:41 +00:00
|
|
|
Done
|
2018-05-17 19:15:14 +00:00
|
|
|
--CLEAN--
|
|
|
|
<?php
|
|
|
|
require_once "gnupgt.inc";
|
|
|
|
gnupgt::delete_key();
|
|
|
|
?>
|