mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 21:59:07 +00:00
LibCrypto: Expose parse_ec_parameters
This will be required to parse the ASN.1 `ECPrivateKey` sequence in the next commits.
This commit is contained in:
parent
6e54baadea
commit
a2522172ad
Notes:
github-actions[bot]
2024-11-27 10:01:42 +00:00
Author: https://github.com/devgianlu
Commit: a2522172ad
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2598
Reviewed-by: https://github.com/stelar7
2 changed files with 3 additions and 1 deletions
|
@ -101,7 +101,7 @@ static ErrorOr<Crypto::UnsignedBigInteger> parse_serial_number(Crypto::ASN1::Dec
|
||||||
return serial;
|
return serial;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ErrorOr<Vector<int>> parse_ec_parameters(Crypto::ASN1::Decoder& decoder, Vector<StringView> current_scope)
|
ErrorOr<Vector<int>> parse_ec_parameters(Crypto::ASN1::Decoder& decoder, Vector<StringView> current_scope)
|
||||||
{
|
{
|
||||||
// ECParameters ::= CHOICE {
|
// ECParameters ::= CHOICE {
|
||||||
// namedCurve OBJECT IDENTIFIER
|
// namedCurve OBJECT IDENTIFIER
|
||||||
|
|
|
@ -194,6 +194,8 @@ struct AlgorithmIdentifier {
|
||||||
Optional<Vector<int>> ec_parameters;
|
Optional<Vector<int>> ec_parameters;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ErrorOr<Vector<int>> parse_ec_parameters(ASN1::Decoder& decoder, Vector<StringView> current_scope = {});
|
||||||
|
|
||||||
struct BasicConstraints {
|
struct BasicConstraints {
|
||||||
bool is_certificate_authority;
|
bool is_certificate_authority;
|
||||||
Crypto::UnsignedBigInteger path_length_constraint;
|
Crypto::UnsignedBigInteger path_length_constraint;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue