mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 21:22:46 +00:00 
			
		
		
		
	LibTLS: Rename parse_version to parse_certificate_version
This is not a generic version, but specifically for certificates.
This commit is contained in:
		
							parent
							
								
									0c95564533
								
							
						
					
					
						commit
						77080fbade
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -85,7 +85,7 @@ static ErrorOr<SupportedGroup> oid_to_curve(Vector<int> curve) | ||||||
|     return Error::from_string_view("Unknown curve oid"sv); |     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)}
 |     // Version ::= INTEGER {v1(0), v2(1), v3(2)}
 | ||||||
|     if (auto tag = decoder.peek(); !tag.is_error() && tag.value().type == Crypto::ASN1::Type::Constructed) { |     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 certificate; | ||||||
|     certificate.tbs_asn1 = asn1_data; |     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.serial_number = TRY(parse_serial_number(decoder, current_scope)); | ||||||
|     certificate.algorithm = TRY(parse_algorithm_identifier(decoder, current_scope)); |     certificate.algorithm = TRY(parse_algorithm_identifier(decoder, current_scope)); | ||||||
|     certificate.issuer = TRY(parse_name(decoder, current_scope)); |     certificate.issuer = TRY(parse_name(decoder, current_scope)); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 stelar7
						stelar7