mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-26 22:32:07 +01:00
Add KeyRingInfo.getExpirationDate(fingerprint) to get subkey exp dates
This commit is contained in:
parent
21ba97c598
commit
bf8e29caa4
1 changed files with 5 additions and 1 deletions
|
@ -215,7 +215,11 @@ public class KeyRingInfo {
|
|||
* @return expiration date
|
||||
*/
|
||||
public Date getExpirationDate() {
|
||||
long validSeconds = getPublicKey().getValidSeconds();
|
||||
return getExpirationDate(new OpenPgpV4Fingerprint(getPublicKey()));
|
||||
}
|
||||
|
||||
public Date getExpirationDate(OpenPgpV4Fingerprint fingerprint) {
|
||||
long validSeconds = keys.getPublicKey(fingerprint.getKeyId()).getValidSeconds();
|
||||
if (validSeconds == 0) {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue