# File rubilicious.rb, line 428 def init_ssl(opt) @ssl_init_http = opt['ssl_init_http'] @ssl_verify = opt['ssl_verify'] if cb = opt['ssl_init'] cb.call(self, opt) elsif @verify_ssl # set verify mode, create cert store @ssl_verify_mode = OpenSSL::SSL::VERIFY_PEER @ssl_store = OpenSSL::X509::Store.new # add path to certificate store # TODO: documentation, at least in method definition cert_path = opt['ssl_cert_path'] || ENV['RUBILICIOUS_SSL_CERT_DIR'] || ENV['SSL_CERT_DIR'] || OpenSSL::X509::DEFAULT_CERT_DIR @ssl_store.add_path(cert_path) else # disable SSL verification by default @ssl_verify_mode = OpenSSL::SSL::VERIFY_NONE end end