Ruby Webrick server not able to verify client certificate
0
I am running a sinatra based web application using Webrick. I was able to setup TLS using my self-signed server certificates and webrick starts in TLS mode, but I am not able to make a connection to server using client certificate (cert based authentication). Server logs says " ERROR OpenSSL::SSL::SSLError: SSL_accept returned=1 errno=0 state=error: certificate verify failed " But the same certificates (both server and client) are working with apache server. def self.run! server_options = { :Host => '0.0.0.0', :Port => 33443, :SSLEnable => true, :SSLVerifyClient => OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT | OpenSSL::SSL::VERIFY_PEER, :SSLVerifyDepth => 3, :SSLCertificate => OpenSSL::X509::Certificate.new(File.open('/U