Skip to content

Fix ecdsa key size validation#864

Merged
lcobucci merged 5 commits into4.2.xfrom
fix-ecdsa-key-size-validation
Aug 17, 2022
Merged

Fix ecdsa key size validation#864
lcobucci merged 5 commits into4.2.xfrom
fix-ecdsa-key-size-validation

Conversation

@lcobucci
Copy link
Copy Markdown
Owner

Fixes #704

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
@lcobucci lcobucci added this to the 4.2.0 milestone Aug 17, 2022
@lcobucci lcobucci self-assigned this Aug 17, 2022
@lcobucci lcobucci force-pushed the fix-ecdsa-key-size-validation branch from ade69d9 to ff9d6b3 Compare August 17, 2022 21:45
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
Copy Markdown
Collaborator

😱

@Slamdunk
Copy link
Copy Markdown
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