mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
tests: Check expiration times of created keys.
* tests/gpgscm/ffi.c (do_get_time): New function. (ffi_init): Expose new function. * tests/gpgscm/ffi.scm (get-time): Document new function. * tests/gpgscm/time.scm: New file. * tests/openpgp/quick-key-manipulation.scm: Use the new facilities to check the expiration times of created keys. * tests/openpgp/tofu.scm: Use the new module. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
e2792813a5
commit
127e1e532d
5 changed files with 72 additions and 9 deletions
|
@ -501,6 +501,14 @@ do_get_isotime (scheme *sc, pointer args)
|
|||
FFI_RETURN_STRING (sc, timebuf);
|
||||
}
|
||||
|
||||
static pointer
|
||||
do_get_time (scheme *sc, pointer args)
|
||||
{
|
||||
FFI_PROLOG ();
|
||||
FFI_ARGS_DONE_OR_RETURN (sc, args);
|
||||
FFI_RETURN_INT (sc, gnupg_get_time ());
|
||||
}
|
||||
|
||||
static pointer
|
||||
do_getpid (scheme *sc, pointer args)
|
||||
{
|
||||
|
@ -1347,6 +1355,7 @@ ffi_init (scheme *sc, const char *argv0, const char *scriptname,
|
|||
ffi_define_function (sc, mkdir);
|
||||
ffi_define_function (sc, rmdir);
|
||||
ffi_define_function (sc, get_isotime);
|
||||
ffi_define_function (sc, get_time);
|
||||
ffi_define_function (sc, getpid);
|
||||
|
||||
/* Random numbers. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue