1
0
Fork 0
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:
Justus Winter 2017-02-15 14:50:44 +01:00
parent e2792813a5
commit 127e1e532d
No known key found for this signature in database
GPG key ID: DD1A52F9DA8C9020
5 changed files with 72 additions and 9 deletions

View file

@ -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. */