-
Notifications
You must be signed in to change notification settings - Fork 561
Self-signed certificates accepted by default #442
Comments
See semestry@f276356 for a fix based on a somewhat older ews-java-api version. |
It seems impossible to ignore certificate. I tried a solution provided on StackOverflow by replacing the trust manager. However, it seems the EWS module either does not the default SSL factory or it overrides this. Is there a method on ExchangeServer class which can be called to ignore certificate checks? |
Hi @johnbester, this is my simplified implementation to accept/ignore certificates. If you do some more logic in the
|
Thanks - this should do the trick! |
@OS-JaR & @johnbester The code worked after slight modification(adding a trust manager), however its working for sending email but could not able to make it work for subscribeToPullNotifications. It seems the method uses original ExchangeServer instead of custom one created. Could you please suggest the solution? |
Is there any reason why the insecure If this class can't be removed there should be at least a big waring in JavaDoc explaining that this TrustManager is insecure plus I would mark the class as deprecated. |
This project is dead, buggy and unmaintained. I would simply advise against using it. |
By default an
EwsSSLProtocolSocketFactory
is configured, which uses anEwsX509TrustManager
, which accepts all self-signed certificates by default. This is a major security risk.Our ews-java-api repo is a bit out-of-date, so I don't have a PR, but the following should be done:
EwsSSLProtocolSocketFactory
EwsX509TrustManager
HttpClientConnectionManager
s by defaultSSLConnectionSocketFactory
, if they do this pass a custom registry to theHttpClientConnectionManager
. This way they can specify a custom trust level themselves.The text was updated successfully, but these errors were encountered: