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);
}
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;
}
Aggregations