Browse Source

LibTLS: Rename parse_version to parse_certificate_version

This is not a generic version, but specifically for certificates.
stelar7 2 years ago
parent
commit
77080fbade
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Userland/Libraries/LibTLS/Certificate.cpp

+ 2 - 2
Userland/Libraries/LibTLS/Certificate.cpp

@@ -85,7 +85,7 @@ static ErrorOr<SupportedGroup> oid_to_curve(Vector<int> curve)
     return Error::from_string_view("Unknown curve oid"sv);
 }
 
-static ErrorOr<Crypto::UnsignedBigInteger> parse_version(Crypto::ASN1::Decoder& decoder, Vector<StringView> current_scope)
+static ErrorOr<Crypto::UnsignedBigInteger> parse_certificate_version(Crypto::ASN1::Decoder& decoder, Vector<StringView> current_scope)
 {
     // Version ::= INTEGER {v1(0), v2(1), v3(2)}
     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
 
     Certificate certificate;
     certificate.tbs_asn1 = asn1_data;
-    certificate.version = TRY(parse_version(decoder, current_scope)).to_u64();
+    certificate.version = TRY(parse_certificate_version(decoder, current_scope)).to_u64();
     certificate.serial_number = TRY(parse_serial_number(decoder, current_scope));
     certificate.algorithm = TRY(parse_algorithm_identifier(decoder, current_scope));
     certificate.issuer = TRY(parse_name(decoder, current_scope));