diff --git a/NEWS b/NEWS index 82106473..851cd30a 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ - `sq key adopt` add options (`--can-`--can-sign`, `--cannot-sign`, `--can-authenticate`, `--cannot-authenticate`, `--can-encrypt`, `--cannot-encrypt`) to allow overriding the key flags. + - `sq key adopt` now accepts the options `--creation-time` to allow + the user to override the key's creation time. * Changes in 0.38.0 ** Notable changes - New subcommand `sq key subkey delete` to delete secret key diff --git a/src/cli/key.rs b/src/cli/key.rs index 8e5ca3f9..c8de2784 100644 --- a/src/cli/key.rs +++ b/src/cli/key.rs @@ -697,6 +697,18 @@ pub struct AdoptCommand { help = "Add the key or subkey KEY to the certificate", )] pub key: Vec, + #[clap( + long, + value_name = "CREATION_TIME", + help = "Make adopted subkeys have the specified creation time", + long_help = "\ +Make adopted subkeys have the specified creation time. + +Normally, the key's creation time is preserved. This option allows \ +setting the key's creation time to a specified value. Note: changing \ +the key's creation time also changes its fingerprint.", + )] + pub creation_time: Option