Closed tst2005 closed 1 year ago
Java doesn't provide an easy way to disable SSL hostname verification with a command line switch. It would require changes to the code.
https://stackoverflow.com/questions/6031258/java-ssl-how-to-disable-hostname-verification
Technical answer: would need to use AllowAllHostnameVerifier in HttpClientAdapter:
RegistryBuilder<ConnectionSocketFactory> schemeRegistry = RegistryBuilder.create();
schemeRegistry.register("http", new PlainConnectionSocketFactory());
schemeRegistry.register("https", new SSLConnectionSocketFactory(sslSocketFactory,
SUPPORTED_PROTOCOLS, null, new AllowAllHostnameVerifier()));
However we are talking about an interaction with Microsoft IdP authentication, the place where you provide username, password and MFA, so I don't think it would be a good idea to make a man in the middle attack easy natively in DavMail.
Hello,
I got a (temporary) issue with davmail. Microsoft have made a mistake in the https certificate for login.microsofonline.com Now Microsoft fixed their servers. Until he fixed his certificate, I dug to find a wait to bypass the hostname check to continue and avoid to be blocked.
I couldn't find any way. Is this behavior hard-coded ? It should be good to be able to disable the ssl verify (over davmail config or with environment variable).
Regards,