1 19 24 25 package org.netbeans.modules.j2ee.sun.bridge; 26 27 import com.sun.enterprise.admin.jmx.remote.https.SunOneBasicX509TrustManager; 28 29 import java.security.cert.X509Certificate ; 30 31 32 39 class X509TrustManager extends SunOneBasicX509TrustManager { 40 41 49 53 54 59 public X509TrustManager() { 60 _alreadyInvoked = false; 62 } 63 64 65 72 protected boolean isItOKToAddCertToTrustStore(X509Certificate cert) { 73 if (_alreadyInvoked) { 77 return false; 78 } 79 _alreadyInvoked = true; 80 81 if (!promptForConfirmation()) { 83 return false; 88 } 89 90 return showConfirmDialog(null, cert.toString()); 92 93 94 } 96 public static boolean showConfirmDialog(java.awt.Component c, String m) 97 { 98 try { 99 return AcceptCertificate.acceptCertificatePanel(m); 104 } catch (Exception ex) { 105 ex.printStackTrace(); 106 } 107 return true; 108 } 109 110 118 protected boolean promptForConfirmation() { 119 return true; 120 } 121 122 123 private boolean _alreadyInvoked; 124 } 125 | Popular Tags |