mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-04-01 22:14:01 +03:00
test fixes
This commit is contained in:
parent
30bb6b0b22
commit
688d7e6b10
1 changed files with 2 additions and 1 deletions
|
@ -57,6 +57,7 @@ private void injectCertificates() {
|
|||
final Map<String, Certificate> jdkTrustStore = getDefaultKeyStore();
|
||||
// Создание нового KeyStore с дополнительными сертификатами.
|
||||
final KeyStore mergedTrustStore = KeyStore.getInstance(KeyStore.getDefaultType());
|
||||
mergedTrustStore.load(null, new char[0]);
|
||||
|
||||
// добавление дополнительных сертификатов в новый KeyStore
|
||||
Arrays.stream(trustSigners).forEach(cert -> setCertificateEntry(mergedTrustStore, "injected-certificate" + UUID.randomUUID(), cert));
|
||||
|
@ -73,7 +74,7 @@ private void injectCertificates() {
|
|||
// Установка контекста по умолчанию
|
||||
HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory());
|
||||
LogHelper.info("Successfully injected certificates to truststore");
|
||||
} catch (NoSuchAlgorithmException | KeyManagementException | KeyStoreException e) {
|
||||
} catch (NoSuchAlgorithmException | KeyManagementException | KeyStoreException | IOException | CertificateException e) {
|
||||
LogHelper.error("Error while modify existing keystore");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue