keyfork-derive-openpgp: add expiration for primary key via primary uid signature
This commit is contained in:
parent
92f15489a4
commit
0a84d47a4d
|
@ -137,6 +137,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
let cert =
|
let cert =
|
||||||
Cert::from_packets(vec![Packet::SecretKey(primary_key.clone())].into_iter()).unwrap();
|
Cert::from_packets(vec![Packet::SecretKey(primary_key.clone())].into_iter()).unwrap();
|
||||||
let builder = SignatureBuilder::new(SignatureType::PositiveCertification)
|
let builder = SignatureBuilder::new(SignatureType::PositiveCertification)
|
||||||
|
.set_key_validity_period(one_day.duration_since(epoch)?)?
|
||||||
.set_signature_creation_time(epoch)?
|
.set_signature_creation_time(epoch)?
|
||||||
.set_key_flags(subkey_format[0].inner().clone())?;
|
.set_key_flags(subkey_format[0].inner().clone())?;
|
||||||
let binding = default_userid.bind(&mut primary_key.clone().into_keypair()?, &cert, builder)?;
|
let binding = default_userid.bind(&mut primary_key.clone().into_keypair()?, &cert, builder)?;
|
||||||
|
|
Loading…
Reference in New Issue