我想执行以下操作:
certificate = OpenSSL::X509::Certificate.new(File.read("cert.cer"))
key = ??
ca_certificate = ??
RestClient::Resource.new(
'https://example.com',
:ssl_client_cert => certificate,
:ssl_client_key => key,
:ssl_ca_file => ca_certificate,
:verify_ssl => OpenSSL::SSL::VERIFY_PEER
).get
我有.cer格式的证书。我能够读取证书但无法读取密钥和ca_certificate。让我知道如何阅读密钥以及ca_certificate