Connection from Java to sharepoint with OAuth

Viewed 157

I am trying to conenct ftom java to sharepoint, but I am facing problem with SSL.

I am following this article https://sharepoint.stackexchange.com/questions/239128/connect-to-sharepoint-online-rest-api-using-java

I have tried few more options to conenct I found on web, but all of theese came to the same error:

I/O error on POST request for "https://login.microsoftonline.com/extSTS.srf": java.security.InvalidAlgorithmParameterException: TlsMasterSecretGenerator must be initialized using a TlsMasterSecretParameterSpec

Can you help me please?

Java: 1.8.0_261 Spring Boot: 2.3

Thank you very much

1 Answers

Ok, I have resolved this issue. Problem was in used security provider "org.openjsse.net.ssl.OpenJSSE" (I don't know if this is default)

So I removed this security provider programmatically from providers list

Security.removeProvider("OpenJSSE");

Then next valid security provider was used for https.

Related