com.teamdev.jxbrowser.ssl
Interface CertificateManager


public interface CertificateManager

The manager of bad certificates

See Also:
BadCertificateHandler, Certificate

Field Summary
static long NOT_TRUST
           
static long TRUST
           
 
Method Summary
 long showTrustCertDialog(WebBrowser browser, Certificate cert)
          Show trust bad certificate dialog.
 void trustCertificate(java.lang.String host, int port, Certificate cert, long trustType, boolean useAsTemp)
          Add exception to trust current bad certificate.
 

Field Detail

NOT_TRUST

static final long NOT_TRUST
See Also:
Constant Field Values

TRUST

static final long TRUST
See Also:
Constant Field Values
Method Detail

showTrustCertDialog

long showTrustCertDialog(WebBrowser browser,
                         Certificate cert)
Show trust bad certificate dialog.

Parameters:
browser - the Web browser instance, you can get it from BadCertificateHandler.badCertificateSended(WebBrowser, java.net.URI, Certificate)
cert - the certificate, you can get it from BadCertificateHandler.badCertificateSended(WebBrowser, java.net.URI, Certificate)
Returns:
trust type

trustCertificate

void trustCertificate(java.lang.String host,
                      int port,
                      Certificate cert,
                      long trustType,
                      boolean useAsTemp)
Add exception to trust current bad certificate.

Parameters:
host - certificate host (you can get it from URL )
port - port of connection (you can get it from URL )
cert - the certificate, you can get it from BadCertificateHandler.badCertificateSended(WebBrowser, java.net.URI, Certificate)
trustType - the type of trust. You can get it from result of {&link showTrustCertDialog} or set TYPE_WEB_TRUST or TYPE_TRUST_FOR_ALL
useAsTemp - use this certificate for current session only.