From dc5ff74a9e8e4a27f61300006963e743842bced9 Mon Sep 17 00:00:00 2001 From: Jenly Date: Fri, 11 Dec 2020 16:14:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/king/app/updater/util/SSLSocketFactoryUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app-updater/src/main/java/com/king/app/updater/util/SSLSocketFactoryUtils.java b/app-updater/src/main/java/com/king/app/updater/util/SSLSocketFactoryUtils.java index d337736..5513223 100644 --- a/app-updater/src/main/java/com/king/app/updater/util/SSLSocketFactoryUtils.java +++ b/app-updater/src/main/java/com/king/app/updater/util/SSLSocketFactoryUtils.java @@ -107,7 +107,7 @@ public final class SSLSocketFactoryUtils { return null; } //获得服务器端证书 - TrustManager[] turstManager = getTurstManager(certificates); + TrustManager[] turstManager = getTrustManager(certificates); //初始化ssl证书库 try { @@ -129,7 +129,7 @@ public final class SSLSocketFactoryUtils { * @param certificates * @return */ - public static TrustManager[] getTurstManager(InputStream... certificates) { + public static TrustManager[] getTrustManager(InputStream... certificates) { try { CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); @@ -161,13 +161,13 @@ public final class SSLSocketFactoryUtils { } - return getTurstAllManager(); + return getTrustAllManager(); } /** * 获得信任所有服务器端证书库 * */ - public static TrustManager[] getTurstAllManager() { + public static TrustManager[] getTrustAllManager() { return new X509TrustManager[] {createTrustAllManager()}; }