From 0a84d47a4d744a0e7ced3df872855bd5a99d2d17 Mon Sep 17 00:00:00 2001 From: ryan Date: Sat, 30 Sep 2023 02:25:45 -0500 Subject: [PATCH] keyfork-derive-openpgp: add expiration for primary key via primary uid signature --- keyfork-derive-openpgp/src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/keyfork-derive-openpgp/src/main.rs b/keyfork-derive-openpgp/src/main.rs index c7d8a2c..e25bda1 100644 --- a/keyfork-derive-openpgp/src/main.rs +++ b/keyfork-derive-openpgp/src/main.rs @@ -137,6 +137,7 @@ fn main() -> Result<(), Box> { let cert = Cert::from_packets(vec![Packet::SecretKey(primary_key.clone())].into_iter()).unwrap(); let builder = SignatureBuilder::new(SignatureType::PositiveCertification) + .set_key_validity_period(one_day.duration_since(epoch)?)? .set_signature_creation_time(epoch)? .set_key_flags(subkey_format[0].inner().clone())?; let binding = default_userid.bind(&mut primary_key.clone().into_keypair()?, &cert, builder)?;