Java Code Examples for org.apache.tomcat.jni.SSL#SSL_ERROR_NONE

The following examples show how to use org.apache.tomcat.jni.SSL#SSL_ERROR_NONE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OpenSSLEngine.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
private void checkLastError() throws SSLException {
    long error = SSL.getLastErrorNumber();
    if (error != SSL.SSL_ERROR_NONE) {
        String err = SSL.getErrorString(error);
        if (logger.isDebugEnabled()) {
            logger.debug(sm.getString("engine.openSSLError", Long.toString(error), err));
        }
        // Many errors can occur during handshake and need to be reported
        if (!handshakeFinished) {
            sendHandshakeError = true;
        } else {
            throw new SSLException(err);
        }
    }
}
 
Example 2
Source File: OpenSsl.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
static boolean isError(long errorCode) {
    return errorCode != SSL.SSL_ERROR_NONE;
}