sslcontext

SSLSocketFactory in Java, LDAP network connection

心不动则不痛 提交于 2020-03-23 08:05:31
问题 My question is similar to: SSLSocketFactory in java I need to set a custom SSLSocketFactory...except I do NOT have an https connection (it's LDAPS), so can't use: HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); ...to set the SSLSocketFactory. I have an SSLContext object initialized but when I make the LDAP connection the default SSLContext is called automatically since my custom one is not set: dirContext = new InitialDirContext(env); // <-- reverts to default ssl

Java 7 with TLSv1.2 connect to LDAPS handshake failure

南楼画角 提交于 2019-12-02 16:24:53
问题 Currently I am using Java 7 and I am unable to connect to LDAPS. I tried with the code below, but I am still unable to connect: SSLContext ctx = SSLContext.getInstance("TLSv1.2"); ctx.init(null, null, null); SSLContext.setDefault(ctx); Below is the error I get from my program: 2018-04-10 15:21:23,446 INFO [stdout] (EJB default - 1) EJB default - 1, WRITE: TLSv1.2 Handshake, length = 221 2018-04-10 15:21:23,446 INFO [stdout] (EJB default - 1) EJB default - 1, READ: TLSv1.2 Alert, length = 2

Java 7 with TLSv1.2 connect to LDAPS handshake failure

早过忘川 提交于 2019-12-02 07:55:38
Currently I am using Java 7 and I am unable to connect to LDAPS. I tried with the code below, but I am still unable to connect: SSLContext ctx = SSLContext.getInstance("TLSv1.2"); ctx.init(null, null, null); SSLContext.setDefault(ctx); Below is the error I get from my program: 2018-04-10 15:21:23,446 INFO [stdout] (EJB default - 1) EJB default - 1, WRITE: TLSv1.2 Handshake, length = 221 2018-04-10 15:21:23,446 INFO [stdout] (EJB default - 1) EJB default - 1, READ: TLSv1.2 Alert, length = 2 2018-04-10 15:21:23,446 INFO [stdout] (EJB default - 1) EJB default - 1, RECV TLSv1 ALERT: fatal,