spreedly/r2d2

Support Ruby v2.3 and above

Closed this issue · 6 comments

We'll need to do something similar to what we did for Gala to get off our aead (incompatible) dependency.

There's no aead dependency here? 😄 it works fine for me on 2.3.

Ha! I’m getting everything all mixed up here... But there is some dependency that’s failing in 2.3 and above. Lemme check...

The only thing I noticed failing with OpenSSL gem 2.0.7 or later was this line:

decipher.auth_data = ""

with AEAD not supported by this cipher error. ruby/openssl@bb10767 introduced this.

I fixed that in #13 already btw :)

Yep - there it is:

$ ruby -v
ruby 2.3.7p456 (2018-03-28 revision 63024) [x86_64-darwin17]
$ be rake test
Run options: --seed 14662

# Running:

....E

Finished in 0.003351s, 1492.0919 runs/s, 2088.9287 assertions/s.

  1) Error:
R2D2::PaymentTokenTest#test_successful_decrypt:
OpenSSL::Cipher::CipherError: AEAD not supported by this cipher
    /Users/ryan/dev/r2d2/lib/r2d2/payment_token.rb:60:in `auth_data='
    /Users/ryan/dev/r2d2/lib/r2d2/payment_token.rb:60:in `decrypt_message'
    /Users/ryan/dev/r2d2/lib/r2d2/payment_token.rb:30:in `decrypt'
    /Users/ryan/dev/r2d2/test/payment_token_test.rb:22:in `test_successful_decrypt'

5 runs, 7 assertions, 0 failures, 1 errors, 0 skips
rake aborted!
Command failed with status (1)
/Users/ryan/.rbenv/versions/2.3.7/bin/bundle:22:in `load'
/Users/ryan/.rbenv/versions/2.3.7/bin/bundle:22:in `<main>'
Tasks: TOP => test
(See full trace by running task with --trace)

Ok, we'll close this when #13 is merged in 👍

#13 has been merged in. Going and ahead closing this one out.