--- a/src/lib/ASN1ContentHandler.h Mon Jun 21 21:36:01 2021 +0200
+++ b/src/lib/ASN1ContentHandler.h Tue Jun 22 21:41:59 2021 +0200
@@ -113,7 +113,7 @@
handler->writeNull();
}
- void writeInteger(int64_t value) override {
+ void writeInteger(int64_t value) override { // TODO: Integer class containing raw data + methods for converting them to particular numeric data types
handler->writeInteger(value);
}
--- a/src/lib/BasicASN1Reader.h Mon Jun 21 21:36:01 2021 +0200
+++ b/src/lib/BasicASN1Reader.h Tue Jun 22 21:41:59 2021 +0200
@@ -145,6 +145,17 @@
bool value;
read((uint8_t*) & value, 1);
handlers.writeBoolean(value);
+ } else if (typeHeader.tag == 12 && typeHeader.tagClass == TagClass::Universal) {
+ std::string s;
+ s.resize(typeHeader.length);
+ read((uint8_t*) s.data(), typeHeader.length);
+ handlers.writeString(ASN1ContentHandler::StringType::UTF8String, s);
+ } else if (typeHeader.tag == 19 && typeHeader.tagClass == TagClass::Universal) {
+ // TODO: check encoding
+ std::string s;
+ s.resize(typeHeader.length);
+ read((uint8_t*) s.data(), typeHeader.length);
+ handlers.writeString(ASN1ContentHandler::StringType::PrintableString, s);
} else {
// TODO: do not skip, parse
std::vector<uint8_t> temp(typeHeader.length, 0);