KEYCLOAK-4427
This commit is contained in:
parent
e7c25f76a7
commit
1c38cec10f
1 changed files with 3 additions and 2 deletions
|
@ -21,7 +21,6 @@ import org.keycloak.common.constants.GenericConstants;
|
|||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.InputStream;
|
||||
import java.security.KeyPair;
|
||||
import java.security.KeyStore;
|
||||
|
@ -47,7 +46,9 @@ public class KeystoreUtil {
|
|||
InputStream trustStream = null;
|
||||
if (filename.startsWith(GenericConstants.PROTOCOL_CLASSPATH)) {
|
||||
String resourcePath = filename.replace(GenericConstants.PROTOCOL_CLASSPATH, "");
|
||||
trustStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(resourcePath);
|
||||
if (Thread.currentThread().getContextClassLoader() != null) {
|
||||
trustStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(resourcePath);
|
||||
}
|
||||
if (trustStream == null) {
|
||||
trustStream = KeystoreUtil.class.getResourceAsStream(resourcePath);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue