--- a/src/lib/BasicASN1Reader.h Sat Jul 03 20:17:17 2021 +0200
+++ b/src/lib/BasicASN1Reader.h Sun Jul 04 11:37:27 2021 +0200
@@ -37,46 +37,6 @@
bool started = false;
- enum UniversalType : uint64_t {
- EndOfContent = 0x00,
- Boolean = 0x01,
- Integer = 0x02,
- BitString = 0x03,
- OctetString = 0x04,
- Null = 0x05,
- ObjectIdentifier = 0x06,
- ObjectDescriptor = 0x07,
- External = 0x08,
- Real = 0x09,
- Enumerated = 0xA,
- Embedded = 0xB,
- UTF8String = 0xC,
- RelativeObjectIdentifier = 0xD,
- Time = 0xE,
- Reserved = 0xF,
- Sequence = 0x10,
- Set = 0x11,
- NumericString = 0x12,
- PrintableString = 0x13,
- T61String = 0x14,
- VideotexString = 0x15,
- IA5String = 0x16,
- UTCTime = 0x17,
- GeneralizedTime = 0x18,
- GraphicString = 0x19,
- VisibleString = 0x1A,
- GeneralString = 0x1B,
- UniversalString = 0x1C,
- CharacterString = 0x1D,
- BMPString = 0x1E,
- Date = 0x1F,
- TimeOfDay = 0x20,
- DateTime = 0x21,
- Duration = 0x22,
- ObjectIdentifierIRI = 0x23,
- RelativeObjectIdentifierIRI = 0x24,
- };
-
class BasicHeader : public ASN1ContentHandler::Header {
public:
bool definiteLength;
@@ -171,13 +131,13 @@
handlers.writeCollectionEnd();
} else if (typeHeader.tag == UniversalType::Sequence) {
level.push_back({typeHeader.definiteLength, typeHeader.length, getBytesRead()}); // TODO: transaction
- handlers.writeCollectionStart(ASN1ContentHandler::CollectionType::Sequence);
+ handlers.writeCollectionStart(typeHeader);
} else if (typeHeader.tag == UniversalType::Set) {
level.push_back({typeHeader.definiteLength, typeHeader.length, getBytesRead()}); // TODO: transaction
- handlers.writeCollectionStart(ASN1ContentHandler::CollectionType::Set);
+ handlers.writeCollectionStart(typeHeader);
} else if (typeHeader.pc == PC::Constructed) {
level.push_back({typeHeader.definiteLength, typeHeader.length, getBytesRead()}); // TODO: transaction
- handlers.writeCollectionStart(ASN1ContentHandler::CollectionType::Constructed);
+ handlers.writeCollectionStart(typeHeader);
} else if (typeHeader.tag == UniversalType::Null && typeHeader.length == 0) {
handlers.writeNull();
} else if (typeHeader.tag == UniversalType::Boolean && typeHeader.definiteLength && typeHeader.length == 1) {