diff options
author | Justus Winter <justus@g10code.com> | 2017-02-15 14:50:44 +0100 |
---|---|---|
committer | Justus Winter <justus@g10code.com> | 2017-02-15 14:53:07 +0100 |
commit | 127e1e532da4083ccd3c307555b6177fab16f408 (patch) | |
tree | 2255164a0803595333b032626725a6717eac14c7 /tests/openpgp/tofu.scm | |
parent | scd: Fix RESET command handling. (diff) | |
download | gnupg2-127e1e532da4083ccd3c307555b6177fab16f408.tar.xz gnupg2-127e1e532da4083ccd3c307555b6177fab16f408.zip |
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>
Diffstat (limited to '')
-rwxr-xr-x | tests/openpgp/tofu.scm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/openpgp/tofu.scm b/tests/openpgp/tofu.scm index ca5786b4e..2e32765e8 100755 --- a/tests/openpgp/tofu.scm +++ b/tests/openpgp/tofu.scm @@ -18,6 +18,7 @@ ;; along with this program; if not, see <http://www.gnu.org/licenses/>. (load (with-path "defs.scm")) +(load (with-path "time.scm")) (setup-environment) (define GPGTIME 1480943782) @@ -25,8 +26,6 @@ ;; Generate a --faked-system-time parameter for a particular offset. (define (faketime delta) (string-append "--faked-system-time=" (number->string (+ GPGTIME delta)))) -;; A convenience function for the above. -(define (days->seconds days) (* days 24 60 60)) ;; Redefine GPG without --always-trust and a fixed time. (define GPG `(,(tool 'gpg) --no-permission-warning ,(faketime 0))) |