You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Guus der Kinderen (JIRA)" <ji...@apache.org> on 2017/10/06 20:28:00 UTC
[jira] [Created] (DIRMINA-1073) NioSocketSession#isSecured does not
comply with interface contract
Guus der Kinderen created DIRMINA-1073:
------------------------------------------
Summary: NioSocketSession#isSecured does not comply with interface contract
Key: DIRMINA-1073
URL: https://issues.apache.org/jira/browse/DIRMINA-1073
Project: MINA
Issue Type: Bug
Components: Core, SSL
Affects Versions: 2.0.16
Reporter: Guus der Kinderen
Attachments: secured.patch
The interface definition of {{org.apache.mina.core.session.IoSession#isSecured}} reads:
bq. 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.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)