weechat-matrix-protocol-script icon indicating copy to clipboard operation
weechat-matrix-protocol-script copied to clipboard

SSL Certificate Problem: Self Signed Certificate

Open tzuntzai opened this issue 9 years ago • 4 comments

error: curl error 60 (SSL certificate problem: self signed certificate) (URL: "https://domain.com:8448/_matrix/client/#/login")

tzuntzai avatar Apr 13 '17 17:04 tzuntzai

Downloaded cert and added the following to http fucntion in 'matrix.lua'

post.pinnedpublickey = '~/.weechat/certs/domain.com.tls.crt' post.ssl_verifypeer = 0

Then received the error below:

error: curl error 90 (SSL: public key does not match pinned public key!) (URL: "https://domain.com:8448/_matrix/client/#/login")

tzuntzai avatar Apr 13 '17 17:04 tzuntzai

Change post.ssl_verifypeer to false, not zero.

K0HAX avatar Jun 19 '17 19:06 K0HAX

I am trying to get self-signed certificates to work with weechat too but it seems to crash. Where exactly should I put those two lines of code ?

ghost avatar Oct 27 '17 11:10 ghost

Changing post.ssl_verifypeer from 0 to false makes matrix.lua to crash for me.

However you have to provide post.pinnedpublickey with the public key, not the certificate according the curl documentation : https://curl.haxx.se/libcurl/c/CURLOPT_PINNEDPUBLICKEY.html

To extract the public key from the server's certificate : openssl x509 -in certificate.pem -pubkey -noout > publickey.pem

It works for me.

billux avatar Nov 19 '18 21:11 billux