Overview | Package | Class | Tree | Deprecated | Index | Help
| JSS 3.1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mozilla.jss.ssl
Class TestCertApprovalCallback

    java.lang.Object
      |
      +--org.mozilla.jss.ssl.TestCertApprovalCallback

All Implemented Interfaces:
  SSLCertificateApprovalCallback

public class TestCertApprovalCallback
extends java.lang.Object
implements SSLCertificateApprovalCallback

This is a test implementation of the certificate approval callback which gets invoked when the server presents a certificate which is not trusted by the client

Inner classes inherited from class org.mozilla.jss.ssl.SSLCertificateApprovalCallback
`SSLCertificateApprovalCallback.ValidityItem, SSLCertificateApprovalCallback.ValidityStatus`

Constructor Summary
`TestCertApprovalCallback()`

Method Summary
`boolean` | `approve(X509Certificate servercert, SSLCertificateApprovalCallback.ValidityStatus status)` This method is called when the server sends it's certificate to the client.

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait`

Constructor Detail

### TestCertApprovalCallback

    public TestCertApprovalCallback()

Method Detail

### approve

    public boolean approve(X509Certificate servercert,
                           SSLCertificateApprovalCallback.ValidityStatus status)

  Description copied from interface: `SSLCertificateApprovalCallback`
  This method is called when the server sends it's certificate to the client. The 'status' argument passed to this method is constructed by NSS. It's a list of things 'wrong' with the certificate (which you can see by calling the status.getReasons() method. So, if there are problems regarding validity or trust of any of the certificates in the chain, you can present this info to the user. If there are no items in the Enumeration returned by getReasons(), you can assume that the certificate is trustworthy, and return true, or you can continue to make further tests of your own to determine trustworthiness.
  Specified by:
    `approve` in interface `SSLCertificateApprovalCallback`
  Following copied from interface: `org.mozilla.jss.ssl.SSLCertificateApprovalCallback`
  Parameters:
    `cert` - the peer's server certificate
    `status` - the ValidityStatus object containing a list of all the problems with the cert
  Returns:
    true allow the connection to continue
    false terminate the connection (Expect an IOException on the outstanding read()/write() on the socket)

Overview | Package | Class | Tree | Deprecated | Index | Help
| JSS 3.1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD