-
Notifications
You must be signed in to change notification settings - Fork 170
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
ENGINE_load_private_key can't load key.pem file #441
Comments
Yiu should not load the key via Engine method. Openssl 3 still supports engines and loading via smth like https://riptutorial.com/openssl/example/16739/load-private-key |
Thanks, now I clearly see that it's Node.JS issue! It uses PEM_read_bio_PrivateKey both in src/crypto/crypto_keys.cc/ParsePrivateKey for Sign.sign() routine and in src/crypto/crypto_context.cc/SecureContext::SetKey for tls.createSecureContext calls. But it works only in first place. |
Debian, OpenSSL 3.0.8, master gost-engine.
I'm trying to embed gost TLS support into Node.JS so I recompiled it with shared OpenSSL support. Node.JS loads private key in its tls module only this way:
EVPKeyPointer key(ENGINE_load_private_key(engine.get(), *key_name, nullptr, nullptr));
But when I use it for 'gost' and '/path/to/key.pem' I get an error:
As far as I understand It's because gost-engine doesn't implement load function. Can you fix it?
The text was updated successfully, but these errors were encountered: