1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-23 11:27:57 +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 (latestSubkeyExpirationDate.before(primaryExpiration)) {
return latestSubkeyExpirationDate;
if (latestSubkeyExpirationDate != null) {
if (primaryExpiration == null) {
return latestSubkeyExpirationDate;
}
if (latestSubkeyExpirationDate.before(primaryExpiration)) {
return latestSubkeyExpirationDate;
}
}
return primaryExpiration;
}
return null;
return primaryExpiration;
}
/**