Improve readme, update xml-crypto, fix ci, replace deprecated crypto methods and make add compatibility with NodeJS 22. #96
Conversation
|
Node.js 19 EOL'd over a year ago and doesn't even know the CVE that is causing problems. I'll remove it from the GitHub workflow and add Node.js 22 (upcoming LTS) instead. 18/20/22 are the currently supported versions. Edit: I have no idea why |
…s library work in recent Node.js versions.
652458b to
138a2a2
Compare
|
This is incredibly good work, still trying to find out with build fails on node 22 |
|
Time to get this merged. 💪 I was now able to reproduce the Edit: Edit 2: NodeJS 22 doesn't allow pkcs1 private decryption (earlier node versions would require |
967abe0 to
49fc29a
Compare
|
@nanov CI is green for all three NodeJS versions now. Let me know what you think. 🙏 Regarding encryption/decryption: I think this is an acceptable solution for now. It might cause issues when users who use something other than aes-256-cbc upgrade from NodeJS <22 to NodeJS 22+, but then again the library didn't work at all on NodeJS 22+ before. A breaking release can remove the legacy key derivation (and require users to provide a proper key and iv themselves). |
|
Merged, released as 5.0.0 - thank you so much! |
I'm currently using a fork of this library, so I guess it's time to contribute my changes back to upstream. 🙃
createCipherandcreateDecipherare deprecated in Node.js and cause warnings.This resolves the warnings without changing the logic.Changing this to the more securecreateCipherivandcreateDecipherivwould require storing IVs and break existing key files, so I kept it as is for now (it was changed to a wrong implementation in an earlier version of this PR)fetchinstead).