Closed darlandieterich closed 1 year ago
When connect show this error: OpenSSL Error[0]: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca
OpenSSL Error[0]: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca
My params:
data = { :host => "localhost", :port => 8883, :username => "someone", :password => "anyonecanenterhere", :ssl => true, :cert_file => '/app/cert/mosq_serv.crt', :key_file => '/app/cert/mosq_serv.key', :ca_file => '/app/cert/mosq_ca.crt' }
My mosquitto .config:
listener 8883 allow_anonymous false password_file /app/passwordfile.pwd cafile /app/cert/mosq_ca.crt certfile /app/cert/mosq_serv.crt keyfile /app/cert/mosq_serv.key protocol mqtt tls_version tlsv1.2 require_certificate true
My question is, it's valid to only .pem?
.pem
Just checked and the Cert file and key file are passed into OpenSSL::X509::Certificate and OpenSSL::PKey::RSA respectively:
OpenSSL::X509::Certificate
OpenSSL::PKey::RSA
Docs are here:
They say:
When connect show this error:
OpenSSL Error[0]: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca
My params:
My mosquitto .config:
My question is, it's valid to only
.pem
?