Calling Discourse API throws SSLHandshakeException

Hello all,

Our Discourse Forum is configured with SSL Protocol: TLSv1.2 and Strong Cipher Suites: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384

While calling Discourse API using Apache httpclient from Liferay 6.2 Framework which is running on JDK7, this throws exception:

javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

I think this is because*JDK7 doesn’t implement any GCM cipher suite. How to resolve this issue? Or is there any other way to call Discourse API from Java platform.

Thanks,
Saurabh Khandelwal

3 Likes

I guess upgrading to JDK8 is not an option?

2 Likes

No, we cannot upgrade to JDK8.
I was thinking that we will make rquest using javascript ajax call but request is blocked by CORS policy.
How to enable CORS for discourse?

I believe you need to configure the cors_origins site setting.

2 Likes

And what about this statement:
The DISCOURSE_ENABLE_CORS env variable must be set to true to enable CORS.
How to set it?

1 Like

You can add it in app.yml if you are self-hosting. On our hosting it’s usually enabled by default.

2 Likes