Package javax.net.ssl.SSLEngineResult

Examples of javax.net.ssl.SSLEngineResult.Status


                            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


   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

                runDelegatedTasks(result);
                updateCipherAndProtocolName(result);

                logEngineClientModeAndResult(result, "input");

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

                if(sslResultStatus == SSLEngineResult.Status.OK)
                {
                    totalBytesDecoded += result.bytesConsumed();
View Full Code Here

                SSLEngineResult result = _sslEngine.wrap(_clearOutputHolder.prepareToRead(), sslWrapDst);
                logEngineClientModeAndResult(result, "output");

                _clearOutputHolder.prepareToWrite();

                Status sslResultStatus = result.getStatus();
                if(sslResultStatus == SSLEngineResult.Status.BUFFER_OVERFLOW)
                {
                    throw new IllegalStateException("Insufficient space to perform wrap into encoded output buffer that has " + sslWrapDst.remaining() + " remaining bytes. wrappingIntoEncodedOutputHolder=" + wrappingIntoEncodedOutputHolder);
                }
                else if(sslResultStatus != SSLEngineResult.Status.OK)
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

     */
    @Override
    public SSLEngineResult unwrap(ByteBuffer src, ByteBuffer dst)
            throws SSLException
    {
        Status resultStatus;
        final int consumed;
        final int produced;

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

    }

    private void tearDownSSLConnection() throws Exception
    {
        SSLEngineResult result = engine.wrap(ByteBuffer.allocate(0), netData);
        Status status = result.getStatus();
        int read   = result.bytesProduced();
        while (status != Status.CLOSED)
        {
            if (status == Status.BUFFER_OVERFLOW)
            {
View Full Code Here

        {
            throw new SenderException("SSL Sender is closed");
        }

        HandshakeStatus handshakeStatus;
        Status status;

        while(appData.hasRemaining() && !_sslStatus.getSslErrorFlag())
        {
            int read = 0;
            try
View Full Code Here

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

        HandshakeStatus handshakeStatus;
        Status status;

        while (netData.hasRemaining())
        {
            try
            {
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.