Is it possible to set GPG key expiration time shorter than one day (say, an hour)? The Next CEO of Stack OverflowCalling GnuPG in Java via a Runtime Process to encrypt and decrypt files - Decrypt always hangsphp GnuPG decrypt times outIs it possible to pass both a message and a public key from stdin to gpg/gpg2?Perl script to encrypt file with GPG not workingHow to get expiration date from a gpg keyHow to get the gpg-agent to ask for the password when used in maven-gpg-pluginWhy gpg --encrypt fails with sub key packet with key flags 0x0C that never expires?Is it possible to not specify user id in gpg command and only specify public key?Recover gcrypt git repository from expired GPG keysPython-GNUPG encrypted file cannot be decrypted with private key
Can Sri Krishna be called 'a person'?
Why did the Drakh emissary look so blurred in S04:E11 "Lines of Communication"?
Is there a rule of thumb for determining the amount one should accept for of a settlement offer?
How dangerous is XSS
How should I connect my cat5 cable to connectors having an orange-green line?
Is the offspring between a demon and a celestial possible? If so what is it called and is it in a book somewhere?
Are British MPs missing the point, with these 'Indicative Votes'?
Which acid/base does a strong base/acid react when added to a buffer solution?
Mathematica command that allows it to read my intentions
Incomplete cube
Is it a bad idea to plug the other end of ESD strap to wall ground?
Is it possible to make a 9x9 table fit within the default margins?
"Eavesdropping" vs "Listen in on"
How exploitable/balanced is this homebrew spell: Spell Permanency?
Is a linearly independent set whose span is dense a Schauder basis?
Early programmable calculators with RS-232
Avoiding the "not like other girls" trope?
How do I keep Mac Emacs from trapping M-`?
Why doesn't Shulchan Aruch include the laws of destroying fruit trees?
Read/write a pipe-delimited file line by line with some simple text manipulation
Masking layers by a vector polygon layer in QGIS
How can I prove that a state of equilibrium is unstable?
How to show a landlord what we have in savings?
Would a grinding machine be a simple and workable propulsion system for an interplanetary spacecraft?
Is it possible to set GPG key expiration time shorter than one day (say, an hour)?
The Next CEO of Stack OverflowCalling GnuPG in Java via a Runtime Process to encrypt and decrypt files - Decrypt always hangsphp GnuPG decrypt times outIs it possible to pass both a message and a public key from stdin to gpg/gpg2?Perl script to encrypt file with GPG not workingHow to get expiration date from a gpg keyHow to get the gpg-agent to ask for the password when used in maven-gpg-pluginWhy gpg --encrypt fails with sub key packet with key flags 0x0C that never expires?Is it possible to not specify user id in gpg command and only specify public key?Recover gcrypt git repository from expired GPG keysPython-GNUPG encrypted file cannot be decrypted with private key
In my project, we want to test how our product behaves when the GPG key expires. So we want the key to expire in a really short time in order to repeat the test frequently.
Actually, the prompt message when generating the key clearly indicates that the minimal unit of expiration is "day":
Please specify how long the key should be valid.
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
But I still want to ask the question out just in case there is something that meets my need: Is it possible to set GPG key expiration time shorter than one day (say, an hour, or even minutes)?
If there is no such a way, I'll need to figure out how to repeat our test without having to wait for a whole day.
gnupg
add a comment |
In my project, we want to test how our product behaves when the GPG key expires. So we want the key to expire in a really short time in order to repeat the test frequently.
Actually, the prompt message when generating the key clearly indicates that the minimal unit of expiration is "day":
Please specify how long the key should be valid.
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
But I still want to ask the question out just in case there is something that meets my need: Is it possible to set GPG key expiration time shorter than one day (say, an hour, or even minutes)?
If there is no such a way, I'll need to figure out how to repeat our test without having to wait for a whole day.
gnupg
add a comment |
In my project, we want to test how our product behaves when the GPG key expires. So we want the key to expire in a really short time in order to repeat the test frequently.
Actually, the prompt message when generating the key clearly indicates that the minimal unit of expiration is "day":
Please specify how long the key should be valid.
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
But I still want to ask the question out just in case there is something that meets my need: Is it possible to set GPG key expiration time shorter than one day (say, an hour, or even minutes)?
If there is no such a way, I'll need to figure out how to repeat our test without having to wait for a whole day.
gnupg
In my project, we want to test how our product behaves when the GPG key expires. So we want the key to expire in a really short time in order to repeat the test frequently.
Actually, the prompt message when generating the key clearly indicates that the minimal unit of expiration is "day":
Please specify how long the key should be valid.
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
But I still want to ask the question out just in case there is something that meets my need: Is it possible to set GPG key expiration time shorter than one day (say, an hour, or even minutes)?
If there is no such a way, I'll need to figure out how to repeat our test without having to wait for a whole day.
gnupg
gnupg
asked Mar 7 at 19:03
yaobinyaobin
1,05821835
1,05821835
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
As far as I can tell, it is only documented in the source code, but you can just enter the datetime at the Key is valid for? (0) prompt using the form yyyymmddThhmmss.
For example, to set the expiry to 8 March 2099 at 9:34 AM (UTC), you would enter 20990308T093400. The time zone of your input is always interpreted as UTC, although you will see the confirmation in your local time zone, e.g. Key expires at Fri Mar 8 10:34:00 2099 +01.
As of version 2.1.20, you can also append a Z to the datetime to explicitly denote UTC, e.g. 20190308T093400 Z, but no other time zones are supported for entry.
Thanks for the reply! I tried it on Ubuntu 18.04 with gpg 2.2.4. When I entered "20190308T093400", it output a message "Key expires at Fri 08 Mar 2019 04:34:00 AM EST" followed by "invalid value". Then it kept prompting me with "Key is valid for? (0)". I also tried append "Z" to the date but got the same "invalid value" message. I guess theyyyymmddThhmmssis only for internal use? Or maybe I was not using it the right way?
– yaobin
Mar 8 at 18:26
1
Try using a datetime that isn't in the past! "20190308T093400" was in the future when I was writing this post, but it's past now. I'll update the answer to use some future datetime
– eddies
Mar 9 at 4:29
Aha! I did overlook that! I just tried with gpg 2.2.4 on my Mac, and it works like a miracle! Yes, a time in the future is needed!
– yaobin
Mar 9 at 4:46
add a comment |
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55051062%2fis-it-possible-to-set-gpg-key-expiration-time-shorter-than-one-day-say-an-hour%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
As far as I can tell, it is only documented in the source code, but you can just enter the datetime at the Key is valid for? (0) prompt using the form yyyymmddThhmmss.
For example, to set the expiry to 8 March 2099 at 9:34 AM (UTC), you would enter 20990308T093400. The time zone of your input is always interpreted as UTC, although you will see the confirmation in your local time zone, e.g. Key expires at Fri Mar 8 10:34:00 2099 +01.
As of version 2.1.20, you can also append a Z to the datetime to explicitly denote UTC, e.g. 20190308T093400 Z, but no other time zones are supported for entry.
Thanks for the reply! I tried it on Ubuntu 18.04 with gpg 2.2.4. When I entered "20190308T093400", it output a message "Key expires at Fri 08 Mar 2019 04:34:00 AM EST" followed by "invalid value". Then it kept prompting me with "Key is valid for? (0)". I also tried append "Z" to the date but got the same "invalid value" message. I guess theyyyymmddThhmmssis only for internal use? Or maybe I was not using it the right way?
– yaobin
Mar 8 at 18:26
1
Try using a datetime that isn't in the past! "20190308T093400" was in the future when I was writing this post, but it's past now. I'll update the answer to use some future datetime
– eddies
Mar 9 at 4:29
Aha! I did overlook that! I just tried with gpg 2.2.4 on my Mac, and it works like a miracle! Yes, a time in the future is needed!
– yaobin
Mar 9 at 4:46
add a comment |
As far as I can tell, it is only documented in the source code, but you can just enter the datetime at the Key is valid for? (0) prompt using the form yyyymmddThhmmss.
For example, to set the expiry to 8 March 2099 at 9:34 AM (UTC), you would enter 20990308T093400. The time zone of your input is always interpreted as UTC, although you will see the confirmation in your local time zone, e.g. Key expires at Fri Mar 8 10:34:00 2099 +01.
As of version 2.1.20, you can also append a Z to the datetime to explicitly denote UTC, e.g. 20190308T093400 Z, but no other time zones are supported for entry.
Thanks for the reply! I tried it on Ubuntu 18.04 with gpg 2.2.4. When I entered "20190308T093400", it output a message "Key expires at Fri 08 Mar 2019 04:34:00 AM EST" followed by "invalid value". Then it kept prompting me with "Key is valid for? (0)". I also tried append "Z" to the date but got the same "invalid value" message. I guess theyyyymmddThhmmssis only for internal use? Or maybe I was not using it the right way?
– yaobin
Mar 8 at 18:26
1
Try using a datetime that isn't in the past! "20190308T093400" was in the future when I was writing this post, but it's past now. I'll update the answer to use some future datetime
– eddies
Mar 9 at 4:29
Aha! I did overlook that! I just tried with gpg 2.2.4 on my Mac, and it works like a miracle! Yes, a time in the future is needed!
– yaobin
Mar 9 at 4:46
add a comment |
As far as I can tell, it is only documented in the source code, but you can just enter the datetime at the Key is valid for? (0) prompt using the form yyyymmddThhmmss.
For example, to set the expiry to 8 March 2099 at 9:34 AM (UTC), you would enter 20990308T093400. The time zone of your input is always interpreted as UTC, although you will see the confirmation in your local time zone, e.g. Key expires at Fri Mar 8 10:34:00 2099 +01.
As of version 2.1.20, you can also append a Z to the datetime to explicitly denote UTC, e.g. 20190308T093400 Z, but no other time zones are supported for entry.
As far as I can tell, it is only documented in the source code, but you can just enter the datetime at the Key is valid for? (0) prompt using the form yyyymmddThhmmss.
For example, to set the expiry to 8 March 2099 at 9:34 AM (UTC), you would enter 20990308T093400. The time zone of your input is always interpreted as UTC, although you will see the confirmation in your local time zone, e.g. Key expires at Fri Mar 8 10:34:00 2099 +01.
As of version 2.1.20, you can also append a Z to the datetime to explicitly denote UTC, e.g. 20190308T093400 Z, but no other time zones are supported for entry.
edited Mar 9 at 4:30
answered Mar 8 at 10:32
eddieseddies
2,3951726
2,3951726
Thanks for the reply! I tried it on Ubuntu 18.04 with gpg 2.2.4. When I entered "20190308T093400", it output a message "Key expires at Fri 08 Mar 2019 04:34:00 AM EST" followed by "invalid value". Then it kept prompting me with "Key is valid for? (0)". I also tried append "Z" to the date but got the same "invalid value" message. I guess theyyyymmddThhmmssis only for internal use? Or maybe I was not using it the right way?
– yaobin
Mar 8 at 18:26
1
Try using a datetime that isn't in the past! "20190308T093400" was in the future when I was writing this post, but it's past now. I'll update the answer to use some future datetime
– eddies
Mar 9 at 4:29
Aha! I did overlook that! I just tried with gpg 2.2.4 on my Mac, and it works like a miracle! Yes, a time in the future is needed!
– yaobin
Mar 9 at 4:46
add a comment |
Thanks for the reply! I tried it on Ubuntu 18.04 with gpg 2.2.4. When I entered "20190308T093400", it output a message "Key expires at Fri 08 Mar 2019 04:34:00 AM EST" followed by "invalid value". Then it kept prompting me with "Key is valid for? (0)". I also tried append "Z" to the date but got the same "invalid value" message. I guess theyyyymmddThhmmssis only for internal use? Or maybe I was not using it the right way?
– yaobin
Mar 8 at 18:26
1
Try using a datetime that isn't in the past! "20190308T093400" was in the future when I was writing this post, but it's past now. I'll update the answer to use some future datetime
– eddies
Mar 9 at 4:29
Aha! I did overlook that! I just tried with gpg 2.2.4 on my Mac, and it works like a miracle! Yes, a time in the future is needed!
– yaobin
Mar 9 at 4:46
Thanks for the reply! I tried it on Ubuntu 18.04 with gpg 2.2.4. When I entered "20190308T093400", it output a message "Key expires at Fri 08 Mar 2019 04:34:00 AM EST" followed by "invalid value". Then it kept prompting me with "Key is valid for? (0)". I also tried append "Z" to the date but got the same "invalid value" message. I guess the
yyyymmddThhmmss is only for internal use? Or maybe I was not using it the right way?– yaobin
Mar 8 at 18:26
Thanks for the reply! I tried it on Ubuntu 18.04 with gpg 2.2.4. When I entered "20190308T093400", it output a message "Key expires at Fri 08 Mar 2019 04:34:00 AM EST" followed by "invalid value". Then it kept prompting me with "Key is valid for? (0)". I also tried append "Z" to the date but got the same "invalid value" message. I guess the
yyyymmddThhmmss is only for internal use? Or maybe I was not using it the right way?– yaobin
Mar 8 at 18:26
1
1
Try using a datetime that isn't in the past! "20190308T093400" was in the future when I was writing this post, but it's past now. I'll update the answer to use some future datetime
– eddies
Mar 9 at 4:29
Try using a datetime that isn't in the past! "20190308T093400" was in the future when I was writing this post, but it's past now. I'll update the answer to use some future datetime
– eddies
Mar 9 at 4:29
Aha! I did overlook that! I just tried with gpg 2.2.4 on my Mac, and it works like a miracle! Yes, a time in the future is needed!
– yaobin
Mar 9 at 4:46
Aha! I did overlook that! I just tried with gpg 2.2.4 on my Mac, and it works like a miracle! Yes, a time in the future is needed!
– yaobin
Mar 9 at 4:46
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55051062%2fis-it-possible-to-set-gpg-key-expiration-time-shorter-than-one-day-say-an-hour%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
