Examples of HSKeyManager


Examples of br.com.caelum.stella.nfe.HSKeyManager

      String defaultAlgorithm = TrustManagerFactory.getDefaultAlgorithm();
      TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(defaultAlgorithm);
      trustManagerFactory.init(trustStore);

      TrustManager[] trustManagers = trustManagerFactory.getTrustManagers();
      KeyManager[] keyManagers = { new HSKeyManager(certificate, privateKey) };

      SSLContext sslContext = SSLContext.getInstance("TLS");
      sslContext.init(keyManagers, trustManagers, null);
      HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.