def db_configuration(opts)
      return {} unless opts
      raise "ca_path for #{opts.inspect} cannot be determined from Rails root; please set it explicitly" unless ca_path

      config = {}

      [
        :sslca,

        # Needed when using X.509
        :sslcert,
        :sslkey,
      ].each do |k|
        if value = opts[k]
          filepath = File.join(ca_path, value)
          raise "File #{filepath.inspect} does not exist!" unless File.exists?(filepath)
          config[k] = filepath
        end
      end
    
      return config
    end
def db_configuration(opts)
      return {} unless opts
      raise "ca_path for #{opts.inspect} cannot be determined from Rails root; please set it explicitly" unless ca_path

      config = {}

      [
        :sslca,

        # Needed when using X.509
        :sslcert,
        :sslkey,
      ].each do |k|
        if value = opts[k]
          filepath = File.join(ca_path, value)
          raise "File #{filepath.inspect} does not exist!" unless File.exists?(filepath)
          config[k] = filepath
        end
      end
    
      return config
    end
Returns a partial ActiveRecord configuration hash for the given SSL CA certificate.
 Checks to make sure the given filename actually exists, and raises an error if it
 does not.