Skip to content

Conversation

@HoneyryderChuck
Copy link
Contributor

add ruby-openssl objectid tests + fixing the discrepancies.

it's supposed to raise on der encoding (not initialization), and it's supposed to be an ASN1Error (not TypeError) exception
same behaviour as upstream now, it compares the translated oid strings
the existing batch wasn't synched; commented the test around registering of nids
@kares
Copy link
Member

kares commented Oct 21, 2025

there seems to be a regression with the existing tests, reported by the CI:

 Failure: test_subject_alt_name_sign_to_pem(TestX509Extension)
/home/runner/work/jruby-openssl/jruby-openssl/src/test/ruby/x509/test_x509ext.rb:199:in `test_subject_alt_name_sign_to_pem'
     196:     csr = OpenSSL::X509::Request.new pem = csr.to_pem
     197:     assert_equal 2, csr.attributes.length
     198:     ext_set = csr.attributes.first.value ; seq = ext_set.first.value
  => 199:     assert_equal 'subjectAltName', seq.first.value.first.value
     200:     dns = seq.first.value.last.value
     201:     assert dns =~ /test.example.com.*?test2.example.com.*?example.com.*?www.example.com/
     202:   end
org/jruby/RubyKernel.java:1189:in `catch'
org/jruby/RubyKernel.java:1184:in `catch'
org/jruby/RubyArray.java:1820:in `each'
org/jruby/RubyArray.java:1820:in `each'
org/jruby/RubyKernel.java:1189:in `catch'
org/jruby/RubyKernel.java:1184:in `catch'
<"subjectAltName">(US-ASCII) expected but was
<"2.5.29.17">(UTF-8)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants