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:
devgianlu 2024-11-26 17:48:35 +01:00 committed by Andreas Kling
commit a2522172ad
Notes: github-actions[bot] 2024-11-27 10:01:42 +00:00
2 changed files with 3 additions and 1 deletions

View file

@ -101,7 +101,7 @@ static ErrorOr<Crypto::UnsignedBigInteger> parse_serial_number(Crypto::ASN1::Dec
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 {
// namedCurve OBJECT IDENTIFIER

View file

@ -194,6 +194,8 @@ struct AlgorithmIdentifier {
Optional<Vector<int>> ec_parameters;
};
ErrorOr<Vector<int>> parse_ec_parameters(ASN1::Decoder& decoder, Vector<StringView> current_scope = {});
struct BasicConstraints {
bool is_certificate_authority;
Crypto::UnsignedBigInteger path_length_constraint;