How does the MITM attack work when a client does not check the hostname vs the certificate? [duplicate]

One of the Paho MQTT client SSL options allows checking whether "a certificate matches the given host name.". If I enable this option then I cannot establish a TLS connection to MQTT using an IP address. In case it is relevant: t… Continue reading How does the MITM attack work when a client does not check the hostname vs the certificate? [duplicate]