mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 01:00:05 +00:00
LibCrypto: Make SECPxxxr1Signature
carry the scalar size
Our `UnsignedBigInteger` implementation cannot handle numbers whose size is not a multiple of 4. For this reason we need to carry the real size around for P-521 support.
This commit is contained in:
parent
fd2014f5c2
commit
f2e530ec14
Notes:
github-actions[bot]
2025-01-27 11:26:14 +00:00
Author: https://github.com/devgianlu
Commit: f2e530ec14
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3374
Reviewed-by: https://github.com/alimpfard ✅
4 changed files with 39 additions and 10 deletions
|
@ -354,7 +354,7 @@ bool Context::verify_certificate_pair(Certificate const& subject, Certificate co
|
|||
|
||||
auto public_point = issuer.public_key.ec.to_secpxxxr1_point();
|
||||
|
||||
auto maybe_signature = Crypto::Curves::SECPxxxr1Signature::from_asn(subject.signature_value, {});
|
||||
auto maybe_signature = Crypto::Curves::SECPxxxr1Signature::from_asn(*issuer.public_key.algorithm.ec_parameters, subject.signature_value, {});
|
||||
if (maybe_signature.is_error()) {
|
||||
dbgln("verify_certificate_pair: Signature is not ASN.1 DER encoded");
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue