Package javax.net.ssl.SSLEngineResult

Examples of javax.net.ssl.SSLEngineResult.Status


        boolean wrapLater = false;
        ByteBuf decodeOut = allocate(ctx, initialOutAppBufCapacity);
        try {
            for (;;) {
                final SSLEngineResult result = unwrap(engine, packet, decodeOut);
                final Status status = result.getStatus();
                final HandshakeStatus handshakeStatus = result.getHandshakeStatus();
                final int produced = result.bytesProduced();
                final int consumed = result.bytesConsumed();

                if (status == Status.CLOSED) {
View Full Code Here


     */
    public WrapperResult sendData (ByteBuffer src) throws IOException {
        WrapperResult r=null;
        while (src.remaining() > 0) {
            r = wrapper.wrapAndSend(src);
            Status status = r.result.getStatus();
            if (status == Status.CLOSED) {
                doClosure ();
                return r;
            }
            HandshakeStatus hs_status = r.result.getHandshakeStatus();
View Full Code Here

        WrapperResult r = null;
        assert dst.position() == 0;
        while (dst.position() == 0) {
            r = wrapper.recvAndUnwrap (dst);
            dst = (r.buf != dst) ? r.buf: dst;
            Status status = r.result.getStatus();
            if (status == Status.CLOSED) {
                doClosure ();
                return r;
            }
View Full Code Here

        WrapperResult wrapAndSendX(ByteBuffer src, boolean ignoreClose) throws IOException {
            if (closed && !ignoreClose) {
                throw new IOException ("Engine is closed");
            }
            Status status;
            WrapperResult r = new WrapperResult();
            synchronized (wrapLock) {
                wrap_dst.clear();
                do {
                    r.result = engine.wrap (src, wrap_dst);
View Full Code Here

         * in dst, together with the Result. dst may have been re-allocated
         * so caller should check the returned value in Result
         * If handshaking is in progress then, possibly no data is returned
         */
        WrapperResult recvAndUnwrap(ByteBuffer dst) throws IOException {
            Status status = Status.OK;
            WrapperResult r = new WrapperResult();
            r.buf = dst;
            if (closed) {
                throw new IOException ("Engine is closed");
            }
View Full Code Here

                    case NEED_UNWRAP: {
                        if (log.isDebugEnabled())
                            log.debug("Need to unwrap incoming data: " + ses);

                        Status status = unwrapHandshake();

                        if (status == BUFFER_UNDERFLOW && handshakeStatus != FINISHED ||
                            sslEngine.isInboundDone())
                            // Either there is no enough data in buffer or session was closed.
                            loop = false;
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

                        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

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.