-
Bug
-
Resolution: Done
-
Major
-
7.1.0.DR9
Coverity static-analysis scan found possible method call on null object in {{org.wildfly.security.credential.source.CredentialStoreCredentialSource.getCredential(java.lang.Class, java.lang.String, java.security.spec.AlgorithmParameterSpec)}}
https://scan7.coverity.com/reports.htm#v16159/p11778/fileInstanceId=6803729&defectInstanceId=1776827&mergedDefectId=1388281&eventId=1776827-8
The problematic piece of code is:
credential = credentialStore.retrieve(alias, credentialType);
return credential.castAs(credentialType, algorithmName, parameterSpec);
The retrieve() method may return null in some cases as can be seen in KeyStoreCredentialStore class:
//... final TopEntry topEntry = cache.get(credentialAlias); if (topEntry == null) { return null; } //...
- is cloned by
-
ELY-832 Coverity static analysis: Dereference null return value in CredentialStoreCredentialSource (Elytron)
- Resolved