-
-
Notifications
You must be signed in to change notification settings - Fork 113
Unable load encrypted/password provided RSA private key #258
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
Comments
Hi, This should be fixed with |
Hi, thanks you for the awesome library, I have same problem when upgrade package to v2.2.x and downgrade to ~v2.1.7, it play well. Look like this condition make this bug: KeyConverter#L178 |
Hi @vuongxuongminh, Can you send me the first part of the encrypted certificate you use?
|
Hi @Spomky look like my encrypted certificate not start with that block, my bash script using to generate keys: gen-jwt() {
jwt_passphrase=$(php -r "echo sha1(random_bytes(32));");
echo "$jwt_passphrase" | openssl genpkey -out ./private.pem -pass stdin -aes256 -algorithm rsa -pkeyopt rsa_keygen_bits:4096;
echo "$jwt_passphrase" | openssl pkey -in ./private.pem -passin stdin -out ./public.pem -pubout;
echo "$jwt_passphrase"
} and the encrypted private start with:
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Unable to load RSA private key when passphrase provided for private key.
To Reproduce
Steps to reproduce the behavior:
$pk_Generate = openssl_pkey_new(array(
'private_key_bits' => 2048,
'private_key_type' => OPENSSL_KEYTYPE_RSA
));
Screenshots

The text was updated successfully, but these errors were encountered: