Skip to content

Commit 77080fb

Browse files
stelar7gmta
authored andcommitted
LibTLS: Rename parse_version to parse_certificate_version
This is not a generic version, but specifically for certificates.
1 parent 0c95564 commit 77080fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Userland/Libraries/LibTLS/Certificate.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static ErrorOr<SupportedGroup> oid_to_curve(Vector<int> curve)
8585
return Error::from_string_view("Unknown curve oid"sv);
8686
}
8787

88-
static ErrorOr<Crypto::UnsignedBigInteger> parse_version(Crypto::ASN1::Decoder& decoder, Vector<StringView> current_scope)
88+
static ErrorOr<Crypto::UnsignedBigInteger> parse_certificate_version(Crypto::ASN1::Decoder& decoder, Vector<StringView> current_scope)
8989
{
9090
// Version ::= INTEGER {v1(0), v2(1), v3(2)}
9191
if (auto tag = decoder.peek(); !tag.is_error() && tag.value().type == Crypto::ASN1::Type::Constructed) {
@@ -695,7 +695,7 @@ static ErrorOr<Certificate> parse_tbs_certificate(Crypto::ASN1::Decoder& decoder
695695

696696
Certificate certificate;
697697
certificate.tbs_asn1 = asn1_data;
698-
certificate.version = TRY(parse_version(decoder, current_scope)).to_u64();
698+
certificate.version = TRY(parse_certificate_version(decoder, current_scope)).to_u64();
699699
certificate.serial_number = TRY(parse_serial_number(decoder, current_scope));
700700
certificate.algorithm = TRY(parse_algorithm_identifier(decoder, current_scope));
701701
certificate.issuer = TRY(parse_name(decoder, current_scope));

0 commit comments

Comments
 (0)