When calling API with java, javax.net.ssl.SSLHandshakeException occurs

I would be grateful if anyone answered

https://stackoverflow.com/q/61788988/13538484

URL url = new URL("https://xxxxRequest"); HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); conn.setDoOutput(true); conn.setDoInput(true); conn.setRequestMethod("POST"); conn.setRequestProperty("Content-Type", "application/json; charset=utf-8 "); //some headers and params OutputStreamWriter os = new OutputStreamWriter(conn.getOutputStream()); os.write(json.toString()); os.flush(); conn.connect(); recode = conn.getResponseCode();

Error message javax.net.ssl.SSLHandshakeException: Failed to negotiate the use of secure renegotiation at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:306) at sun.security.ssl.ClientHandshaker.serverHello(ClientHandshaker.java:513) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:207) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037) at sun.security.ssl.Handshaker.process_record(Handshaker.java:965) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379) at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)

Recommended Posts

When calling API with java, javax.net.ssl.SSLHandshakeException occurs
Error when playing with java
API integration from Java with Jersey Client
Memo when HTTP communication with Java (OkHttp)
[Java] Precautions when comparing character strings with character strings
Interact with LINE Message API using Lambda (Java)
Specify ClassPath when using jupyter + Java with WSL
Java Stream API
How to use Java API with lambda expression
[Java] Get images with Google Custom Search API
Docker Container Operations with Docker-Client API for Java
[Java] Consideration when handling negative binary numbers with Integer.parseInt ()
When deleting a record with MySQL workbench, javax.persistence.EntityNotFoundException occurs
Behavior when calling Java variadic methods from Scala / Kotlin / Java
Notice multi thread problem when working with Java Servlet
Compatible with Android 10 (API 29)
Pack API response (java)
Change seats with java
Install Java with Ansible
[Java] Stream API / map
Docker-Client Java API Troubleshooting
Comfortable download with JAVA
Download Java with Ansible
Let's scrape with Java! !!
Build Java with Wercker
Endian conversion with JAVA
When using ExpandableListView with fragment, exception occurs when inheritance is ListFragment
Handle exceptions coolly with Java 8 lambda expressions and Stream API
Create a SlackBot with AWS lambda & API Gateway in Java
Avoid Permission Denied that occurs when developing Laravel with Docker
Initial setting method when making Alexa Skill with JAVA (Cloud9)
ClassCastException occurs when migrating from Java7 to Java8 ~ Generics and overload ~
About the behavior when doing a file map with java
Convert 2D array to csv format with Java 8 Stream API