Honor --time as signature creation time when adopting keys.

This commit is contained in:
Justus Winter 2023-04-14 10:09:26 +02:00
parent 8f5e617b6b
commit 956dc42faf
No known key found for this signature in database
GPG Key ID: 686F55B4AB2B3386

View File

@ -587,6 +587,9 @@ fn adopt(config: Config, command: sq_cli::key::AdoptCommand) -> Result<()> {
sig),
};
let builder = builder
.set_signature_creation_time(config.time)?;
*keyo = Some(
(key.key().clone().role_into_subordinate(),
builder));
@ -656,6 +659,7 @@ fn adopt(config: Config, command: sq_cli::key::AdoptCommand) -> Result<()> {
.unwrap_or_else(|| {
SignatureBuilder::new(SignatureType::PrimaryKeyBinding)
})
.set_signature_creation_time(config.time)?
.sign_primary_key_binding(&mut subkey_signer, pk, &key)?;
builder = builder.set_embedded_signature(backsig)?;