Search in sources :

Example 1 with SecurityStatusResult

use of org.mozilla.jss.nss.SecurityStatusResult in project jss by dogtagpki.

the class TestRawSSL method TestSSLSecurityStatus.

public static void TestSSLSecurityStatus() throws Exception {
    PRFDProxy fd = PR.NewTCPSocket();
    assert (fd != null);
    SSLFDProxy ssl_fd = SSL.ImportFD(null, fd);
    assert (ssl_fd != null);
    SecurityStatusResult r = SSL.SecurityStatus(ssl_fd);
    assert (r != null);
    assert (r.on == 0);
    // Validate toString works
    System.out.println(r.toString());
    assert (PR.Close(ssl_fd) == PR.SUCCESS);
}
Also used : PRFDProxy(org.mozilla.jss.nss.PRFDProxy) SSLFDProxy(org.mozilla.jss.nss.SSLFDProxy) SecurityStatusResult(org.mozilla.jss.nss.SecurityStatusResult)

Example 2 with SecurityStatusResult

use of org.mozilla.jss.nss.SecurityStatusResult in project jss by dogtagpki.

the class TestBufferPRFD method IsHandshakeFinished.

public static boolean IsHandshakeFinished(SSLFDProxy c_nspr, SSLFDProxy s_nspr) {
    SecurityStatusResult c_result = SSL.SecurityStatus(c_nspr);
    SecurityStatusResult s_result = SSL.SecurityStatus(s_nspr);
    assert (c_result != null && s_result != null);
    return c_result.on == 1 && s_result.on == 1;
}
Also used : SecurityStatusResult(org.mozilla.jss.nss.SecurityStatusResult)

Aggregations

SecurityStatusResult (org.mozilla.jss.nss.SecurityStatusResult)2 PRFDProxy (org.mozilla.jss.nss.PRFDProxy)1 SSLFDProxy (org.mozilla.jss.nss.SSLFDProxy)1