Sha256: ed2b1ca7ea11029327410e9695a387b4d1ad8d1054af239f1887fccef84073bd
Contents?: true
Size: 1.14 KB
Versions: 3
Compression:
Stored size: 1.14 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'rsolr/client_cert' describe RSolr::ClientCert do before :all do @fixture_dir = File.expand_path('../../fixtures',__FILE__) @cert_file = File.join(@fixture_dir,'certificate.crt') @key_pass = 'SuPeRseKrItPaSsWoRd!!11!' end it "should provide an SSL certificate connection with an RSA keyfile" do solr = RSolr::ClientCert.connect :url => 'https://example.edu/solr', :ssl_cert_file => @cert_file, :ssl_key_file => File.join(@fixture_dir, 'rsa_key.key'), :ssl_key_pass => @key_pass solr.connection.ssl_client_cert.should be_a OpenSSL::X509::Certificate solr.connection.ssl_client_key.should be_a OpenSSL::PKey::RSA end it "should provide an SSL certificate connection with an RSA keyfile" do solr = RSolr::ClientCert.connect :url => 'https://example.edu/solr', :ssl_cert_file => @cert_file, :ssl_key_file => File.join(@fixture_dir, 'dsa_key.key'), :ssl_key_pass => @key_pass solr.connection.ssl_client_cert.should be_a OpenSSL::X509::Certificate solr.connection.ssl_client_key.should be_a OpenSSL::PKey::DSA end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rsolr-client-cert-0.5.2 | spec/unit/client_cert_spec.rb |
rsolr-client-cert-0.5.1 | spec/unit/client_cert_spec.rb |
rsolr-client-cert-0.5.0 | spec/unit/client_cert_spec.rb |