Package javax.net.ssl.SSLEngineResult

Examples of javax.net.ssl.SSLEngineResult.Status


    public void received(ByteBuffer buf)
    {
        ByteBuffer netData = addPreviouslyUnreadData(buf);

        HandshakeStatus handshakeStatus;
        Status status;

        while (netData.hasRemaining())
        {
            try
            {
View Full Code Here


    public SSLEngineResult wrap(ByteBuffer src, ByteBuffer dst)
            throws SSLException
    {
        int consumed = 0;
        int produced = 0;
        final Status resultStatus;

        if (src.remaining() >= CLEAR_CHUNK_SIZE)
        {
            src.mark();
View Full Code Here

        if(_nextException != null)
        {
            throw _nextException;
        }

        Status resultStatus;
        final int consumed;
        final int produced;

        if (src.remaining() >= SHORT_ENCODED_CHUNK_SIZE)
        {
View Full Code Here

                runDelegatedTasks(result);
                updateCipherAndProtocolName(result);

                logEngineClientModeAndResult(result, "input");

                Status sslResultStatus = result.getStatus();
                HandshakeStatus handshakeStatus = result.getHandshakeStatus();

                if(sslResultStatus == SSLEngineResult.Status.OK)
                {
                    // continue
View Full Code Here

                {
                    SSLEngineResult result = _sslEngine.wrap(clearOutputBuffer, _outputBuffer);

                    logEngineClientModeAndResult(result, "output");

                    Status sslResultStatus = result.getStatus();
                    if(sslResultStatus == SSLEngineResult.Status.BUFFER_OVERFLOW)
                    {
                        throw new IllegalStateException("Insufficient space to perform wrap into encoded output buffer. Buffer: " + _outputBuffer);
                    }
                    else if(sslResultStatus != SSLEngineResult.Status.OK)
View Full Code Here

                        if (DEBUG)
                            LOG.debug("{} unwrap {}", SslConnection.this, unwrapResult);

                        HandshakeStatus handshakeStatus = _sslEngine.getHandshakeStatus();
                        HandshakeStatus unwrapHandshakeStatus = unwrapResult.getHandshakeStatus();
                        Status unwrapResultStatus = unwrapResult.getStatus();

                        _underFlown = unwrapResultStatus == Status.BUFFER_UNDERFLOW;

                        if (_underFlown)
                        {
View Full Code Here

                            BufferUtil.clear(b);
                        else
                            allConsumed=false;
                    }

                    Status wrapResultStatus = wrapResult.getStatus();

                    // and deal with the results returned from the sslEngineWrap
                    switch (wrapResultStatus)
                    {
                        case CLOSED:
View Full Code Here

                        socketWriteBuffer.clear();

                        // Encrypt the data
                        SSLEngineResult r = sslEngine.wrap(src, socketWriteBuffer);
                        written += r.bytesConsumed();
                        Status s = r.getStatus();

                        if (s == Status.OK || s == Status.BUFFER_OVERFLOW) {
                            // Need to write out the bytes and may need to read from
                            // the source again to empty it
                        } else {
View Full Code Here

                    if (socketReadBuffer.hasRemaining()) {
                        // Decrypt the data in the buffer
                        SSLEngineResult r =
                                sslEngine.unwrap(socketReadBuffer, dest);
                        read += r.bytesProduced();
                        Status s = r.getStatus();

                        if (s == Status.OK) {
                            // Bytes available for reading and there may be
                            // sufficient data in the socketReadBuffer to
                            // support further reads without reading from the
View Full Code Here

                        if (DEBUG)
                            LOG.debug("{} unwrap {}", SslConnection.this, unwrapResult);

                        HandshakeStatus handshakeStatus = _sslEngine.getHandshakeStatus();
                        HandshakeStatus unwrapHandshakeStatus = unwrapResult.getHandshakeStatus();
                        Status unwrapResultStatus = unwrapResult.getStatus();

                        _underFlown = unwrapResultStatus == Status.BUFFER_UNDERFLOW;

                        if (_underFlown)
                        {
View Full Code Here

TOP

Related Classes of javax.net.ssl.SSLEngineResult.Status

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.