|
|
|
@ -16,6 +16,7 @@
|
|
|
|
|
|
|
|
|
|
package org.springframework.boot.autoconfigure.couchbase;
|
|
|
|
|
|
|
|
|
|
import java.io.InputStream;
|
|
|
|
|
import java.net.URL;
|
|
|
|
|
import java.security.KeyStore;
|
|
|
|
|
|
|
|
|
@ -107,7 +108,9 @@ public class CouchbaseAutoConfiguration {
|
|
|
|
|
private KeyStore loadKeyStore(String resource, String keyStorePassword) throws Exception {
|
|
|
|
|
KeyStore store = KeyStore.getInstance(KeyStore.getDefaultType());
|
|
|
|
|
URL url = ResourceUtils.getURL(resource);
|
|
|
|
|
store.load(url.openStream(), (keyStorePassword != null) ? keyStorePassword.toCharArray() : null);
|
|
|
|
|
try (InputStream inputStream = url.openStream()) {
|
|
|
|
|
store.load(inputStream, (keyStorePassword != null) ? keyStorePassword.toCharArray() : null);
|
|
|
|
|
}
|
|
|
|
|
return store;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|