spec/signer_spec.rb in r509-ocsp-responder-0.3.2 vs spec/signer_spec.rb in r509-ocsp-responder-0.3.3

- old
+ new

@@ -44,12 +44,12 @@ ocsp_request.add_certid(certid) request_response = ocsp_handler.handle_request(ocsp_request) request_response[:response].status.should == OpenSSL::OCSP::RESPONSE_STATUS_SUCCESSFUL request_response[:response].verify(@ocsp_delegate_config.ca_cert.cert).should == true #TODO Better way to check whether we're adding the certs when signing the basic_response than response size... - request_response[:response].to_der.size.should >= 1500 - request_response[:response].to_der.size.should <= 1800 + request_response[:response].to_der.size.should be >= 1500 + request_response[:response].to_der.size.should be <= 1800 end it "responds successfully for a subroot (signing via subroot)" do ocsp_handler = R509::OCSP::Signer.new( :configs => R509::Config::CAConfigPool.new('testca' => @test_ca_subroot_config) ) csr = R509::CSR.new( :subject => [['CN','ocsptest.r509.local']], :bit_strength => 1024 ) ca = R509::CertificateAuthority::Signer.new(@test_ca_subroot_config) @@ -83,12 +83,12 @@ ocsp_request.add_certid(certid) request_response = ocsp_handler.handle_request(ocsp_request) request_response[:response].status.should == OpenSSL::OCSP::RESPONSE_STATUS_SUCCESSFUL request_response[:response].verify(@ocsp_chain_config.ca_cert.cert).should == true #TODO Better way to check whether we're adding the certs when signing the basic_response than response size... - request_response[:response].to_der.size.should >= 3600 - request_response[:response].to_der.size.should <= 3900 + request_response[:response].to_der.size.should be >= 3600 + request_response[:response].to_der.size.should be <= 3900 end it "responds successfully from the test_ca" do csr = R509::CSR.new( :subject => [['CN','ocsptest.r509.local']], :bit_strength => 1024 ) ca = R509::CertificateAuthority::Signer.new(@test_ca_config) cert = ca.sign(:csr => csr, :profile_name => 'server') @@ -99,10 +99,10 @@ request_response = ocsp_handler.handle_request(ocsp_request) request_response[:response].status.should == OpenSSL::OCSP::RESPONSE_STATUS_SUCCESSFUL request_response[:request].should_not be_nil end it "responds successfully from an elliptic curve CA" do - csr = R509::CSR.new( :subject => [['CN','ocspectest.r509.local']], :type => :ec ) + csr = R509::CSR.new( :subject => [['CN','ocspectest.r509.local']], :type => "EC" ) ca = R509::CertificateAuthority::Signer.new(@test_ca_ec_config) cert = ca.sign(:csr => csr, :profile_name => 'server') ocsp_request = OpenSSL::OCSP::Request.new certid = OpenSSL::OCSP::CertificateId.new(cert.cert,@test_ca_ec_config.ca_cert.cert) ocsp_request.add_certid(certid)