trojan icon indicating copy to clipboard operation
trojan copied to clipboard

Why can't use SSL certificate created by cloudflare ?

Open yufeiluo opened this issue 2 years ago • 2 comments

Login int my account in cloudflare,go to :

ssl/tls --> origin server --> create certificate --> create
   |---->origin certificate --> copy and save as cert.pem  file
-->
   |---->private certificate --> copy and save as key.pem  file.

Push into my vps:

scp  cert.pem  root@vps_ip:/etc/ssl/server-cert.pem
scp  private.pem  root@vps_ip:/etc/ssl/server-key.pem

Set in my local machine: cp cert.pem trojan/ca-cert.pem

Start the trojan service,so many errors occurs:

SSL handshake failed with xxx.xxx.xxx.xxx:443: certificate verify failed

If i set false for verify and verify_hostname in config.json:


   "ssl": {
   "verify": true,
   "verify_hostname": true,

Restart trojan again,it works fine!

How can set the value of verify and verify_hostname as true and make SSL handshake suceessful with self-signed certificate for trojan service?

yufeiluo avatar Apr 05 '22 08:04 yufeiluo

I've also created a self-signed certificate but still doesn't work. It says SSL handshake failed!

0xj0hn avatar Sep 29 '22 07:09 0xj0hn

Set Cloudflare SSL/TLS encryption mode to FULL Keep Authenticated Origin Pulls to be Off

fz68 avatar Apr 10 '24 12:04 fz68