Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-1073

NioSocketSession#isSecured does not comply with interface contract

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.16
    • 2.0.17
    • Core, SSL
    • None

    Description

      The interface definition of org.apache.mina.core.session.IoSession#isSecured reads:

      return true if the session has started and initialized a SslEngine, false if the session is not yet secured (the handshake is not completed) or if SSL is not set for this session, or if SSL is not even an option.

      The implementation of org.apache.mina.transport.socket.nio.NioSocketSession#isSecured however, already returns true when the handshake is not completed.

      The provided patch fixes this, by adding an additional check to SslFilter that mimics the signature if isSecured. There's a bit of duplicated code, that might be improved upon.

      Attachments

        1. secured.patch
          2 kB
          Guus der Kinderen

        Activity

          People

            Unassigned Unassigned
            guus.der.kinderen Guus der Kinderen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: