Code example for X509TrustManager

Methods: checkClientTrusted

0
   * Delegate to the default trust manager. 
   */ 
  public void checkClientTrusted(X509Certificate[] chain, String authType)
      throws CertificateException { 
    try { 
      sunJSSEX509TrustManager.checkClientTrusted(chain, authType);
    } catch (CertificateException excep) {
      // do any special handling here, or rethrow exception. 
    } 
  } 
 
  /* 
   * Delegate to the default trust manager. 
   */ 
  public void checkServerTrusted(X509Certificate[] chain, String authType)
      throws CertificateException { 
    try { 
      sunJSSEX509TrustManager.checkServerTrusted(chain, authType);
    } catch (CertificateException excep) {
      /* 
       * Possibly pop up a dialog box asking whether to trust the cert chain.