Skip to content
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

Fix ecdsa key size validation #864

Merged
merged 5 commits into from Aug 17, 2022
Merged

Conversation

lcobucci
Copy link
Owner

Fixes #704

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
Lines in OpenSSL error messages are split and we need to call
`openssl_error_string()` multiple times to get all the occurred errors.

More info: https://www.php.net/manual/en/function.openssl-error-string.php

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
The expected behaviour for key length verification between RSA and ECDSA
algorithms are actually different. This shifts the responsibility to the
base respective base implementations, simplifying the code a bit.

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
@lcobucci lcobucci force-pushed the fix-ecdsa-key-size-validation branch from ff9d6b3 to 367b7f4 Compare August 17, 2022 21:53
@lcobucci lcobucci merged commit 9131d04 into 4.2.x Aug 17, 2022
@lcobucci lcobucci deleted the fix-ecdsa-key-size-validation branch August 17, 2022 21:54
@Ocramius
Copy link
Sponsor Collaborator

😱

@Slamdunk
Copy link
Collaborator

🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid signing with SHA256 alg using secp521r1 curve
3 participants