savonrb / akami

Building Web Service Security
MIT License
36 stars 61 forks source link

Omit gost test case when gost engine isn't supported #31

Closed kenhys closed 9 months ago

kenhys commented 7 years ago

OpenSSL 1.1.0 or later doesn't contain GOST engine anymore. So, test should be omitted in such a case.

Without this change, test case fails as follows:

Failures:

1) Akami::WSSE::VerifySignature should validate correctly signed XML messages with RSA-SHA1 signature and GOST R 34.11-94 digests Failure/Error: expect(validator.verify!).to equal(true) OpenSSL::Engine::EngineError: no such engine

./lib/akami/wsse/verify_signature.rb:139:in `by_id'

 # ./lib/akami/wsse/verify_signature.rb:139:in `block in <class:VerifySignature>'
 # ./lib/akami/wsse/verify_signature.rb:151:in `digester'
 # ./lib/akami/wsse/verify_signature.rb:112:in `digest'
 # ./lib/akami/wsse/verify_signature.rb:93:in `generate_digest'
 # ./lib/akami/wsse/verify_signature.rb:72:in `block in verify'
 # ./lib/akami/wsse/verify_signature.rb:68:in `verify'
 # ./lib/akami/wsse/verify_signature.rb:48:in `verify!'
 # ./spec/akami/wsse/verify_signature_spec.rb:55:in `block (2 levels) in <top (required)>'
pcai commented 9 months ago

Thanks for suggesting this. I am hesitant to take this approach though because the bundled version of openssl in the CI container omits GOST, so effectively this test would never be run and CI would never be able to detect breakage.

I just released v.1.3.2 which deletes this test case and acknowledges that GOST is no longer formally supported. If someone wants GOST formally supported and can invest the time to make sure it can be covered by CI I am happy to merge a contribution.