ruby on rails - Change HTTPI SSL default cert file location with environment variable -
according this page can see httpi looking ssl certificate based on openssl::x509::default_cert_file
constant:
2.1.5 :008 > openssl::x509::default_cert_file => "/usr/lib/ssl/cert.pem"
my certificates elsewhere page says can change path ruby looks @ using environment variable ssl_cert_file
. did in .bashrc:
export ssl_cert_file=/etc/ssl/certs/ca-certificates.crt
rails finds environment variable:
2.1.5 :007 > env['ssl_cert_file'] => "/etc/ssl/certs/ca-certificates.crt"
but has no effect on openssl constant:
2.1.5 :008 > openssl::x509::default_cert_file => "/usr/lib/ssl/cert.pem"
is page wrong effect of setting ssl_cert_file
? or constant never change , affects other setting? ultimately, certificate not being found, need know how / how inspect / how set it.
first prize similar approach default set environment variable because not want hardcode path certificate.
i don't know ruby part, experience openssl code don't think setting environment ssl_cert_file change content of default_cert_file. still change openssl looks certificates: if ssl_cert_file given take value , otherwise take value in default_cert_file. how openssl works internally.
Comments
Post a Comment