Package javax.net.ssl.SSLEngineResult

Examples of javax.net.ssl.SSLEngineResult.HandshakeStatus


            while ((runnable = _sslEngine.getDelegatedTask()) != null)
            {
                runnable.run();
            }

            HandshakeStatus hsStatus = _sslEngine.getHandshakeStatus();
            if (hsStatus == HandshakeStatus.NEED_TASK)
            {
                throw new RuntimeException("handshake shouldn't need additional tasks");
            }
        }
View Full Code Here


        int bytesRead = receiveEncryptedData();
        if (bytesRead == -1) {
            this.endOfStream = true;
        }
        doHandshake();
        HandshakeStatus status = this.sslEngine.getHandshakeStatus();
        if (status == HandshakeStatus.NOT_HANDSHAKING || status == HandshakeStatus.FINISHED) {
            decryptData();
        }
        // Some decrypted data is available or at the end of stream
        return (this.appEventMask & SelectionKey.OP_READ) > 0
View Full Code Here

      sslIncomingBuffer.flip();
      SSLEngineResult result = sslEngine.unwrap(sslIncomingBuffer, buffer);
      sslIncomingBuffer.compact();
      if(handshakeComplete)
        return buffer.position();
      HandshakeStatus status=sslEngine.getHandshakeStatus();
      while((status != HandshakeStatus.NOT_HANDSHAKING) && (!this.isCloseable()))
      {
        switch(status)
        {
        case NEED_TASK:
View Full Code Here

    */
   protected void doHandshake() throws IOException
   {
      ByteBuffer dummy = ByteBuffer.allocate(0);
      SSLEngineResult engineResult;
      HandshakeStatus hsStatus = m_engine.getHandshakeStatus();
      boolean bBlocking = m_socketChannel.isBlocking();

      m_socketChannel.configureBlocking(false);

      for (;;)
View Full Code Here

    */
   protected void checkHandshake() throws IOException
   {
      doTasks();

      HandshakeStatus hsStatus = m_engine.getHandshakeStatus();

      if (hsStatus == HandshakeStatus.NOT_HANDSHAKING)
      {
         return;   // Not starting a re-handshake
      }
View Full Code Here

      }
    }
  }
 
  private boolean processHandshake() throws IOException {
    final HandshakeStatus hs = engine.getHandshakeStatus();
    logger.fine("processHandshake() hs = "+ hs);
    switch(hs) {
    case NEED_TASK:
      synchronousRunDelegatedTasks();
      return processHandshake();
View Full Code Here

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

        HandshakeStatus handshakeStatus;
        Status status;

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

        int bytesRead = receiveEncryptedData();
        if (bytesRead == -1) {
            this.endOfStream = true;
        }
        doHandshake();
        HandshakeStatus status = this.sslEngine.getHandshakeStatus();
        if (status == HandshakeStatus.NOT_HANDSHAKING || status == HandshakeStatus.FINISHED) {
            decryptData();
        }
        // Some decrypted data is available or at the end of stream
        return (this.appEventMask & SelectionKey.OP_READ) > 0
View Full Code Here

            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();
            }
        } while (this.sslEngine.getHandshakeStatus() == HandshakeStatus.NEED_TASK);
        // Some decrypted data is available or at the end of stream
View Full Code Here

TOP

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

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.