You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Asankha C. Perera (JIRA)" <ji...@apache.org> on 2014/01/30 08:18:08 UTC

[jira] [Commented] (HTTPCORE-371) Support for SSL re-negotiation with NIO

    [ https://issues.apache.org/jira/browse/HTTPCORE-371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13886348#comment-13886348 ] 

Asankha C. Perera commented on HTTPCORE-371:
--------------------------------------------

The resolution could be the following modification in the class SSLIOSession. Any review feedback is expected before commit.

    public synchronized boolean isAppInputReady() throws IOException {
        final int bytesRead = receiveEncryptedData();
        if (bytesRead == -1) {
            this.endOfStream = true;
        }
        doHandshake();
        final HandshakeStatus status = this.sslEngine.getHandshakeStatus();
        if (status == HandshakeStatus.NOT_HANDSHAKING || status == HandshakeStatus.FINISHED) {
            decryptData();
        }

        // if a re-negotiation is requested, perform a handshake
        if (this.sslEngine.getHandshakeStatus() == HandshakeStatus.NEED_TASK) {
            doHandshake();
        }

        // Some decrypted data is available or at the end of stream
        return (this.appEventMask & SelectionKey.OP_READ) > 0
            && (this.inPlain.hasData()
                    || (this.appBufferStatus != null && this.appBufferStatus.hasBufferedInput())
                    || (this.endOfStream && this.status == ACTIVE));
    }

> Support for SSL re-negotiation with NIO
> ---------------------------------------
>
>                 Key: HTTPCORE-371
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-371
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore NIO
>    Affects Versions: 4.2.5
>            Reporter: Asankha C. Perera
>            Assignee: Asankha C. Perera
>            Priority: Minor
>
> Once an SSL session is established, a report peer can request for a renegotiation. Currently, a renegotiation request is ignored. This issue is about adding support for SSL renegotiation to HttpComponents/Core-NIO



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org