diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-11-10 10:40:47 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-11-10 10:40:47 +0100 |
commit | 5b62930f33f136764dad22af46f9645e7df52a90 (patch) | |
tree | 236e7ed20ef3bb1dd56535ae8e54989f6fdb9dfe | |
parent | 33a4a861241086119535e6436be44180b3a6caa1 (diff) | |
download | sonarqube-5b62930f33f136764dad22af46f9645e7df52a90.tar.gz sonarqube-5b62930f33f136764dad22af46f9645e7df52a90.zip |
Fix Quality flaw in sonar-ws/OkHttpClientBuilder
-rw-r--r-- | sonar-ws/src/main/java/org/sonarqube/ws/client/OkHttpClientBuilder.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/OkHttpClientBuilder.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/OkHttpClientBuilder.java index 961d9e0da62..fafdd706941 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/OkHttpClientBuilder.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/OkHttpClientBuilder.java @@ -24,6 +24,11 @@ import java.io.IOException; import java.net.Proxy; import java.security.GeneralSecurityException; import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.NoSuchProviderException; +import java.security.UnrecoverableKeyException; +import java.security.cert.CertificateException; import java.util.Arrays; import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; @@ -198,7 +203,8 @@ public class OkHttpClientBuilder { /** * Inspired from sun.security.ssl.SSLContextImpl#getDefaultKeyManager() */ - private static synchronized KeyManager[] getDefaultKeyManager() throws Exception { + private static synchronized KeyManager[] getDefaultKeyManager() throws KeyStoreException, NoSuchProviderException, + IOException, CertificateException, NoSuchAlgorithmException, UnrecoverableKeyException { final String defaultKeyStore = System.getProperty("javax.net.ssl.keyStore", ""); String defaultKeyStoreType = System.getProperty("javax.net.ssl.keyStoreType", KeyStore.getDefaultType()); String defaultKeyStoreProvider = System.getProperty("javax.net.ssl.keyStoreProvider", ""); |