We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I created a PEM file on server ubuntu 18 with openssl 1.1.1 using this code
$privkey = openssl_pkey_new([ 'digest_alg' => 'sha256', 'private_key_bits' => 1024, 'private_key_type' => OPENSSL_KEYTYPE_RSA, ]); try { openssl_pkey_export_to_file($privkey, 'WEB-INF/config/' . $filename); } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; }
on the same server it runs well, encoding and decoding as expected.
Then if I try the to decode using the same PEM file on different server (wich use openssl 1.1.1f) it doesn't run saying that signature is invalid.
Doing the same using a string instead of PEM file works. I cannot understand... could it be that PEM file I created depend on specficia server?
The text was updated successfully, but these errors were encountered:
it could be the openssl version too?
Sorry, something went wrong.
I guess it was my fault! I tried to create jwt obj in SHA256 mode but pem file was created as RSA type
doing $jwt = new JWT($key, 'RS384'); instead of $jwt = new JWT($key, 'SHA256'); solve the problem
$jwt = new JWT($key, 'RS384');
$jwt = new JWT($key, 'SHA256');
cool, thanks for the update.
No branches or pull requests
I created a PEM file on server ubuntu 18 with openssl 1.1.1 using this code
on the same server it runs well, encoding and decoding as expected.
Then if I try the to decode using the same PEM file on different server (wich use openssl 1.1.1f) it doesn't run saying that signature is invalid.
Doing the same using a string instead of PEM file works. I cannot understand... could it be that PEM file I created depend on specficia server?
The text was updated successfully, but these errors were encountered: