1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
Index: trocla/spec/trocla/formats/x509_spec.rb
===================================================================
--- trocla.orig/spec/trocla/formats/x509_spec.rb
+++ trocla/spec/trocla/formats/x509_spec.rb
@@ -184,18 +184,14 @@ describe "Trocla::Format::X509" do
ca2 = OpenSSL::X509::Certificate.new(ca2_str)
expect(ca2.issuer.to_s).to eq(@ca.subject.to_s)
expect((Date.parse(ca2.not_after.localtime.to_s) - Date.today).to_i).to eq(365)
- pending_for(:engine => 'jruby',:reason => 'NameConstraints verification seem to be broken in jRuby: https://github.com/jruby/jruby/issues/3502') do
expect(verify(@ca,ca2)).to be true
- end
expect(ca2.extensions.find{|e| e.oid == 'basicConstraints' }.value).to eq('CA:TRUE')
ku = ca2.extensions.find{|e| e.oid == 'keyUsage' }.value
expect(ku).to match(/Certificate Sign/)
expect(ku).to match(/CRL Sign/)
nc = ca2.extensions.find{|e| e.oid == 'nameConstraints' }.value
- pending_for(:engine => 'jruby',:reason => 'NameConstraints verification seem to be broken in jRuby: https://github.com/jruby/jruby/issues/3502') do
expect(nc).to match(/Permitted:\n DNS:example.com\n DNS:bla.example.net/)
- end
valid_cert_str = @trocla.password('myvalidexamplecert','x509', {
'subject' => '/C=ZZ/O=Trocla Inc./CN=foo.example.com/emailAddress=example@example.com',
'ca' => 'mycert_with_nc'
@@ -224,9 +220,7 @@ describe "Trocla::Format::X509" do
ca2 = OpenSSL::X509::Certificate.new(ca2_str)
expect(ca2.issuer.to_s).to eq(@ca.subject.to_s)
expect((Date.parse(ca2.not_after.localtime.to_s) - Date.today).to_i).to eq(365)
- pending_for(:engine => 'jruby',:reason => 'NameConstraints verification seem to be broken in jRuby: https://github.com/jruby/jruby/issues/3502') do
expect(verify(@ca,ca2)).to be true
- end
expect(ca2.extensions.find{|e| e.oid == 'basicConstraints' }.value).to eq('CA:TRUE')
ku = ca2.extensions.find{|e| e.oid == 'keyUsage' }.value
@@ -245,9 +239,7 @@ describe "Trocla::Format::X509" do
if %x{openssl version} =~ /1\.0\.[2-9]/
expect(verify([@ca,ca2],valid_cert)).to be true
else
- skip_for(:engine => 'ruby',:reason => 'NameConstraints verification is broken on older openssl versions https://rt.openssl.org/Ticket/Display.html?id=3562') do
expect(verify([@ca,ca2],valid_cert)).to be true
- end
end
false_cert_str = @trocla.password('myfalseexamplecert','x509', {
@@ -277,9 +269,7 @@ describe "Trocla::Format::X509" do
cert2 = OpenSSL::X509::Certificate.new(cert2_str)
expect(cert2.issuer.to_s).to eq(ca2.subject.to_s)
expect((Date.parse(cert2.not_after.localtime.to_s) - Date.today).to_i).to eq(365)
- skip_for(:engine => 'jruby',:reason => 'Chained CA validation seems to be broken on jruby atm.') do
expect(verify([@ca,ca2],cert2)).to be true
- end
end
it 'respects all options' do
Index: trocla/spec/spec_helper.rb
===================================================================
--- trocla.orig/spec/spec_helper.rb
+++ trocla/spec/spec_helper.rb
@@ -1,7 +1,6 @@
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'rspec'
-require 'rspec/pending_for'
require 'yaml'
require 'trocla'
|