Closed alappe closed 3 years ago
It looks like a few places were missed during the OTP 24 compatibility changes. Any contributions that fix up the last places would be appreciated. I have added OTP 24 to CI to make it easier to test the fixes.
Probably unrelated, but I cannot compile the project to run the tests, mix test fails with
I would recommend running the tests in docker. You can see examples in the CI.
Ok, I can try to look into it. Thanks for the feedback and the ci changes.
After some hours I had one line in to fix my error, but the test suite still has 37 fails. I conclude I have way to little knowledge on the topic to mess around in this code. :-(
We need to get https://github.com/potatosalad/erlang-libsodium/pull/9 in in order for mix test
to function on Erlang 24.
I no longer see crypto:block_decrypt/{3,4}
used outside of of jose_crypto_compat
. #113 addressed an edge case
with compilation on Erlang 23 and running on 24 (many open source projects support both versions and distribute binary builds).
I'd be happy to take a look at any remaining issues but without a running test suite it's a bit difficult to assess what may be missing.
As Eric said, running the suite in docker worked fine for me.
e.g. in src/jwa/jose_jwa.erl
, block_decrypt/3
is using Module:block_decrypt(BlockCipher, Key, CipherText)
as a fallback which is using crypto:block_decrypt/3
then. I tried to add more pattern matching there, but I'm way too clueless about the algorithm combinations to finish this.
I've made some progress with #118 (which is still a draft), dropping the number of failures from 37 to 4. I hope to have the remaining 4 solved soon enough.
The remaining failures stem from jose_public_key:der_decode(AlicePrivateDER).
behaving differently based on the erlang version, for the same value of AlicePrivateDER
(<<48,46,2,1,0,48,5,6,3,43,101,112,4,34,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>
).
The failures in fact match the added support for ed25519 & ed448 in Erlang 24. It appears to me that erlang-jose provided it's own implementation of these algorithms, so my suspicion currently is that built in decoding now short circuits a fallback.
Thank you! 🎉
With elixir
v1.12
on OTPv24.0.1
I have the following issue:I deleted
deps/
and_build
, fetched everything new, tried erlang-josev1.11.1
andmaster
. Is there something wrong with my setup?https://github.com/alappe/jose_otp24 shows the issue:
Probably unrelated, but I cannot compile the project to run the tests,
mix test
fails with