Karthikeyan Velmurugan
Karthikeyan Velmurugan

Reputation: 631

Getting ssl handshake error while communicating with paypal server in my java application

I am using paypal sandbox account for my java application and hosting using centos 6.7. While I am running the application I am getting error for communicating with paypal account.

I am getting the error as followed,

javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
	at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1961)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1077)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1339)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1323)
	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:515)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1299)
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)

Upvotes: 2

Views: 892

Answers (1)

PP_Florian
PP_Florian

Reputation: 96

There was some security updates. You need to use TLS 1.2 for the sandbox (updates will need to be applied at a later date for Paypal in Live mode too).

https://www.paypal-knowledge.com/infocenter/index?page=content&widgetview=true&id=FAQ1766&viewlocale=en_US

Here's the roadmap and the different dates :

Jan 14, 2016 After this date, Sandbox API endpoints only support new standard (HTTP/1.1, TLS 1.2 and SHA-256 certificates). This includes www.sandbox.paypal.com only accepting HTTPS for IPN Postbacks.

Jan 31, 2016 Production starts issuing API Credential Certificates with new standard (2048-bit, SHA-256).

Feb 29, 2016 Test Sandbox endpoints will be removed.

Mar 17, 2016 New SFTP IP addresses add to DNS for reports.paypal.com.

Apr 14, 2016 Old SFTP IP addresses removed from DNS for reports.paypal.com.

May 12, 2016 Old SFTP IP addresses stop working.

Jun 17, 2016 After this date, Production API endpoints will start moving to the new standard (HTTP/1.1, TLS 1.2 and SHA-256 certificates)

Sep 30, 2016 IPN postbacks to www.paypal.com only allow HTTPS

Jan 1, 2018 All Certificate API Credentials must have been upgraded to the new standard.

Upvotes: 1

Related Questions