Skip to content

SSL connection HostnameVerifier result must be checked #506

@minii-dev

Description

@minii-dev
  • [+] Bug exists Release Version 1.2.0 ( Master Branch)
  • [?] Bug exists in Snapshot Version 1.2.1-SNAPSHOT (Develop Branch)
  • [?] Bug exists in MQTTv5 Version (mqttv5-new Branch)

HostnameVerifier set via MqttConnectOptions.setSSLHostnameVerifier(..)

  1. when connecting using ssl://... URL:
  • the verifier public boolean verify(String targetHost, SSLSession sslSession) is called
  • its return value (false) is NOT checked, and as a result, the verifier is useless. I think, on the false value an exception must be thrown indicating the SSL certificate does not contain expected host name
  1. when connecting using wss://... URL:
  • the verifier is NOT called. I am not sure, but I think it must be called and an exception must be thrown on failed check

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions