Package javax.net.ssl.SSLEngineResult

Examples of javax.net.ssl.SSLEngineResult.Status


                        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

   private void receive() throws IOException {
      int count = swap.remaining();
     
      while(count > 0) {
         SSLEngineResult result = engine.unwrap(swap, input);
         Status status = result.getStatus();
        
         switch(status) {
         case BUFFER_OVERFLOW:
         case BUFFER_UNDERFLOW:
            return;
View Full Code Here

    *
    * @param buffer this is the array of bytes to send to the client
    */
   private void send(ByteBuffer buffer) throws IOException {  
      SSLEngineResult result = engine.wrap(buffer, output);
      Status status = result.getStatus();
    
      switch(status){
      case BUFFER_OVERFLOW:
      case BUFFER_UNDERFLOW:
      case CLOSED:
View Full Code Here

        {
            return -1;
        }

        SSLEngineResult result;
        Status status;
        do
        {
            if (!prepare(inputCache, minCacheSize))
            {
                // Overflow!
View Full Code Here

        int t = src.remaining();
        int n = 0;

        // Write as much as we can.
        SSLEngineResult result;
        Status status;
        do
        {
            if (!prepare(outputBuffer, minBufferSize))
            {
                // Overflow!
View Full Code Here

            fill(inputBuffer[0]);
        }

        // Unwrap the buffer.
        SSLEngineResult result;
        Status status;
        do
        {
            // Prepare the input cache, although no app
            // data should be produced during handshake.
            prepare(inputCache, minCacheSize);
View Full Code Here

        // Prepare the buffer.
        if (prepare(outputBuffer, minBufferSize))
        {
            // Wrap the buffer.
            SSLEngineResult result;
            Status status;
            try
            {
                result = engine.wrap(emptyBuffer, outputBuffer[0]);
            }
            finally
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.