Closed Narnach closed 6 years ago
Thanks for the PR! See my comments in the code and let me know what you think. Once we get that sorted out I'll get it merged and released to hex.pm
.
I've updated the PR with a List of integers comparison to replace Version.match?
. Locally it works, and I see that this time CI liked the changes as well :-)
Thanks!
Published on hex.pm as release 0.7.1
. Thanks again!
Awesome, thanks for accepting the changes!
The initial ExCrypto implementation of generate_key by @barttenbrinke was tested against Erlang/OTP 20.1, which has slightly different internal library versions than Erlang/OTP 20.0, which introduced the generate_key feature it was built on. This PR aims to make the feature work on both versions.
I've lowered the version requirement for Erlang public_key from 1.5 to 1.4.1 (which matches OTP 20.0) and switched to Version.match?() to do proper version checking.
The internal data format for RSAPrivateKey was not consistently handled in OTP 20.0, generating version
0
, but when encoding it as PEM and parsing it back, the version it returned was:"two-prime"
. Based on some searching, 0 is the internal name of two-prime, and 20.1 smooths this out but 20.0 still gives the raw value.I've considered editing
.travis.yml
to add OTP release 20.0 as a test target as well, but I'm not sure what the policy is for editing that file. My versions when testing were these: