aboutsummaryrefslogtreecommitdiffstats
path: root/g10/sign.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/sign.c')
-rw-r--r--g10/sign.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/g10/sign.c b/g10/sign.c
index abb6e9d44..b011043b2 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -47,6 +47,16 @@ do_sign( PKT_secret_key *sk, PKT_signature *sig,
byte *dp;
int rc;
+ if( sk->timestamp > sig->timestamp ) {
+ ulong d = sk->timestamp - sig->timestamp;
+ log_info( d==1 ? _("key has been created %lu second "
+ "in future (time warp or clock problem)\n")
+ : _("key has been created %lu seconds "
+ "in future (time warp or clock problem)\n"), d );
+ return G10ERR_TIME_CONFLICT;
+ }
+
+
print_pubkey_algo_note(sk->pubkey_algo);
if( !digest_algo )