$ gpg --list-keys
pub 4096R/ABCD1234 2013-09-26 [expired: 2013-12-31]
$ gpg --edit-key ABCD1234
gpg> list
pub 4096R/ABCD1234 created: 2013-09-26 expired: 2013-12-31 usage: SC
trust: unknown validity: expired
sub 4096R/EFGH5678 created: 2013-09-26 expired: never usage: E
gpg> key 0 # 只選擇 primary key,取消選擇 sub key
gpg> expire
Changing expiration time for the primary key.
Please specify how long the key should be valid.
0 = key does not expire
= key expires in n days
w = key expires in n weeks
m = key expires in n months
y = key expires in n years
Key is valid for? (0) 2014-12-31 # 可輸入到期日期
Key expires at Wed Dec 31 00:00:00 2014 CST
Is this correct? (y/N) y
gpg> save
$ gpg --keyserver keys.gnupg.net --send-keys ABCD1234
References :
How to change the expiration date of a GPG key | G-Loaded Journal
沒有留言:
張貼留言