Package cn.jpush.api

Examples of cn.jpush.api.SimpleHostnameVerifier


      TrustManager[] tmCerts = new javax.net.ssl.TrustManager[1];
      tmCerts[0] = new SimpleTrustManager();
      javax.net.ssl.SSLContext sc = javax.net.ssl.SSLContext.getInstance("SSL");
      sc.init(null, tmCerts, null);
      javax.net.ssl.HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
      HostnameVerifier hv = new SimpleHostnameVerifier();
      HttpsURLConnection.setDefaultHostnameVerifier(hv);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

TOP

Related Classes of cn.jpush.api.SimpleHostnameVerifier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.