1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-26 22:32:07 +01:00

Fix NPEs in KeyRingInfo.getExpirationDateForUse()

This commit is contained in:
Paul Schaub 2021-06-24 15:07:41 +02:00
parent 09ba0c954d
commit a6e5ca898f

View file

@ -660,12 +660,16 @@ public class KeyRingInfo {
} }
if (nonExpiringSubkeys.isEmpty()) { if (nonExpiringSubkeys.isEmpty()) {
if (latestSubkeyExpirationDate != null) {
if (primaryExpiration == null) {
return latestSubkeyExpirationDate;
}
if (latestSubkeyExpirationDate.before(primaryExpiration)) { if (latestSubkeyExpirationDate.before(primaryExpiration)) {
return latestSubkeyExpirationDate; return latestSubkeyExpirationDate;
} }
return primaryExpiration;
} }
return null; }
return primaryExpiration;
} }
/** /**