From 265e6d670682e661cec89657c3330b0b388ca0a7 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 23 May 2019 09:40:01 +0900 Subject: [PATCH] g10: Copy expiredate from primary key when marked expired. * g10/getkey.c (merge_selfsigs): Update ->expiredate of subkey. -- GnuPG-bug-id: 3343 Signed-off-by: NIIBE Yutaka --- g10/getkey.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/g10/getkey.c b/g10/getkey.c index 1e7334307..bb8486bb4 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -3185,7 +3185,11 @@ merge_selfsigs (ctrl_t ctrl, kbnode_t keyblock) memcpy (&pk->revoked, &rinfo, sizeof (rinfo)); } if (main_pk->has_expired) - pk->has_expired = main_pk->has_expired; + { + pk->has_expired = main_pk->has_expired; + if (!pk->expiredate || pk->expiredate > main_pk->expiredate) + pk->expiredate = main_pk->expiredate; + } } } return;