-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OTP 21: public_key.pem_entry_decode #3
Comments
Hi @hauptbenutzer! First of all, thank you for looking into this and opening an issue. Your fix looks good to me, but I wonder that if there is a way to keep compatibility with OTP <=20. I don't mind bumping up OTP version for my own project but it might be a bit bothersome if someone else was depending on this library and it no longer works because of incompatibility with older OTP version. Looking forward for your thoughts! |
The pattern match should have worked for OTP <= 20, but I took the chance to make it more explicit by actually checking the OTP version. Due to the use of the module attribute, the |
Resolved by #4. |
First off, thanks for putting this together!
The signing worked flawlessly until we upgraded to Elixir 1.6.6 and OTP 21. It seems the issue you linked to has been resolved in OTP 21 and
public_key.pem_entry_decode
now returns a sane response for gcloud private keys. Unfortunately, that means the special handling no longer works as expected and we get an argument error, sinceelem(3)
now returns an integer, instead of the private key binary.I attempted to do a pattern match in order to keep backwards compatibility like this, which seems to work fine, at least for my keys.
What are your thoughts on this? I would clean this up a bit and open a PR.
The text was updated successfully, but these errors were encountered: