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()}; }