jruby-openssl icon indicating copy to clipboard operation
jruby-openssl copied to clipboard

Missing sign_raw on RSA (at least)

Open headius opened this issue 8 months ago • 1 comments

Running the tests for HexaPDF nearly everything passes, except the signature tests, which pretty much all fail like this:

  7) Error:
HexaPDF::DigitalSignature::Signing::SignedDataCreator::signer info#test_0004_contains a reference to the used digest algorithm:
NoMethodError: undefined method 'sign_raw' for an instance of OpenSSL::PKey::RSA
    lib/hexapdf/digital_signature/signing/signed_data_creator.rb:178:in 'digest_and_sign_data'
    lib/hexapdf/digital_signature/signing/signed_data_creator.rb:113:in 'create'
    test/hexapdf/digital_signature/signing/test_signed_data_creator.rb:88:in 'block in <main>'
    org/jruby/RubyBasicObject.java:2701:in 'instance_eval'
    org/jruby/RubyBasicObject.java:2729:in 'instance_eval'

There's a few other failures for signing tests but until this is fixed there's a good change it's causing some knock-on effects.

We don't appear to have any sign_raw methods in the entire library, so either it's something big we missed or it's not possible to implement on top of JSSE/BC.

headius avatar May 03 '25 00:05 headius

cc @gettalong

headius avatar May 03 '25 00:05 headius