sjudson / paseto.js

PASETO: Platform-Agnostic Security Tokens
MIT License
269 stars 16 forks source link

Remove C++ OpenSSL Bindings #31

Open sjudson opened 3 years ago

sjudson commented 3 years ago

At the moment, the extcrypto.cc script [0] is used to provide two cryptographic functionalities: (i) generating RSA key material; and (ii) loading RSA key material stored in the .pem format.

As of Node 11, this functionality is available in the builtin crypto module, the former introduced in v10.12.0 [1] and the latter in v11.16.0[2]. As of May 1, 2021, Node v10 will no longer be supported [3]. As such, at that time the extcrypto module should be removed (as well as the dependency on nan) and the builtin functionalities used instead.

[0] https://github.com/sjudson/paseto.js/blob/master/extcrypto/extcrypto.cc [1] https://nodejs.org/api/crypto.html#crypto_crypto_generatekeypair_type_options_callback [2] https://nodejs.org/api/crypto.html#crypto_crypto_createprivatekey_key [3] https://nodejs.org/en/about/releases/

sjudson commented 3 years ago

(created this issue mostly as a note to self, but if anyone has any comments/wants to open a PR they are more than welcome)