Add cloudflare origin certificate to java keystore

I am trying to access my website from Java using HttpsUrlConnection but I am getting Received fatal alert: certificate_required

This does not happen when I test my code from my personal computer running windows. But the error does occur when I run the code from my linux computer, the same computer the website is hosted on. I have my SSL/TLS encryption mode on FULL

I now think that this is caused because my java truststore does not contain cloudflare’s certificates. I added my website origin certificate but that has not solved the issue yet.

Should I add some cloudflare certificate to my truststore? If so, where do I find this certificate?

May I ask does the Java app client support SNI or is it enabled to support it, regarding the Cloudflare and SSL certificate?

Also which version of openssl are you running on your Linux server? Try installing/updating openssl.
Nevertheless, on which TLS version are we running? Which one is at your origin host/server? And which one is it selected at Cloudflare dashboard “Minimum TLS version”?

Also try installing and/or updating the package at your host/origin Linux server:
ca-certificates and also ca-certificates-java, maybe you are missing this one?

Possible way.

Here you can find Cloudflare Origin CA root certificate if this is the one needed?:

Or, Cloudflare CA root certificate?
A helpful way how to install it:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.