hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Asankha C. Perera (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCORE-371) Support for SSL re-negotiation with NIO
Date Thu, 30 Jan 2014 07:18:08 GMT

    [ 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


Mime
View raw message