how to accept self-signed certificates for JNDI/LDAP connections?

前端 未结 6 1589
死守一世寂寞
死守一世寂寞 2020-12-13 15:33

I need to connect to an LDAP directory over SSL.

In non-production environments, we use self-signed certificates which, of course, fails to validate with:

         


        
6条回答
  •  悲&欢浪女
    2020-12-13 16:21

    No code required. Just add the certificate to the test client truststores.

    Don't write extra code for this. It is insecure, and you run a major risk of the code leaking into production. You really don't want that.

提交回复
热议问题