8312126: NullPointerException in CertStore.getCRLs after 8297955

Reviewed-by: weijun
This commit is contained in:
Sean Mullan 2023-09-15 13:12:15 +00:00
parent bd268137ed
commit 3c743cfea0

View File

@ -779,9 +779,13 @@ final class LDAPCertStoreImpl {
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
continue; continue;
} }
} else { } else if (nameObject instanceof String) {
issuerName = (String)nameObject; issuerName = (String)nameObject;
} else {
throw new CertStoreException(
"unrecognized issuerName: must be String or byte[]");
} }
// If all we want is CA certs, try to get the (probably shorter) ARL // If all we want is CA certs, try to get the (probably shorter) ARL
Collection<X509CRL> entryCRLs = Collections.emptySet(); Collection<X509CRL> entryCRLs = Collections.emptySet();
if (certChecking == null || certChecking.getBasicConstraints() != -1) { if (certChecking == null || certChecking.getBasicConstraints() != -1) {