1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:17:35 +00:00

LibCrypto: Add missing ASN1 tag kinds

This commit is contained in:
stelar7 2023-04-03 18:50:57 +02:00 committed by Ali Mohammad Pur
parent 6163f607c0
commit 8273fc230c
3 changed files with 90 additions and 17 deletions

View file

@ -294,6 +294,8 @@ ErrorOr<void> pretty_print(Decoder& decoder, Stream& stream, int indent)
case Kind::UTCTime:
case Kind::GeneralizedTime:
case Kind::IA5String:
case Kind::VisibleString:
case Kind::BMPString:
case Kind::PrintableString: {
auto value = TRY(decoder.read<StringView>());
builder.append(' ');
@ -310,6 +312,9 @@ ErrorOr<void> pretty_print(Decoder& decoder, Stream& stream, int indent)
case Kind::Sequence:
case Kind::Set:
return Error::from_string_literal("ASN1::Decoder: Unexpected Primitive");
default: {
dbgln("PrettyPrint error: Unhandled kind {}", static_cast<u8>(tag.kind));
}
}
}