Examples of ThumbprintTrustManager


Examples of com.vmware.aurora.security.ThumbprintTrustManager

      // Install an SSL trust manager for outgoing SSL connections
      // This code assumes that we only do outgoing connections to the vCenter
      // server.
      logger.debug("Installing thumbprint SSL verification");
      try {
         tm = new ThumbprintTrustManager();
         tm.add(thumbprint);
         sc.init(null, new TrustManager[]{tm}, new java.security.SecureRandom());
         HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
         SSLContext.setDefault(sc);
      } catch (Exception e) {
View Full Code Here

Examples of com.vmware.aurora.security.ThumbprintTrustManager

         }

        nfcLease.progress(0);
        ProgressListener listener = new ProgressListener(nfcLease, importTotal);
        vmRef = nfcLease.getInfo().getEntity();
        ThumbprintTrustManager tm = HttpsConnectionUtil.getThumbprintTrustManager();
         // upload all files
         for(DeviceUrl deviceUrl : nfcLease.getInfo().getDeviceUrl()) {
            File f = fileMap.get(deviceUrl.getImportKey());
            String thumbprint = deviceUrl.getSslThumbprint();
            tm.add(thumbprint.toString(), Thread.currentThread());
            try {
               uploadFileLoop(deviceUrl.getUrl(), f, ds,
                              name + "/" + f.getName(), listener);
            } finally {
               tm.remove(thumbprint.toString(), Thread.currentThread());
            }
         }
         nfcLease.progress(100);
         nfcLease.complete();
      } catch (Exception e) {
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.