--- a/src/lib/BasicASN1Reader.h Sat Jun 12 21:29:18 2021 +0200
+++ b/src/lib/BasicASN1Reader.h Sat Jun 12 22:37:44 2021 +0200
@@ -40,11 +40,23 @@
State state = State::A;
+ bool started = false;
+
protected:
void update() override {
-
+
+ if (!started) {
+ handlers.writeStreamStart();
+ started = true;
+ }
+
+ handlers.writeCollectionStart(ASN1ContentHandler::CollectionType::Sequence);
handlers.writeNull();
+ handlers.writeBoolean(true);
+ handlers.writeInteger(123);
+ handlers.writeString(ASN1ContentHandler::StringType::UTF8String, "relational pipes");
+ handlers.writeCollectionEnd();
if (state == State::A) {
@@ -53,9 +65,12 @@
} else if (state == State::C) {
}
-
+ }
+public:
+ void close() override {
+ if (started) handlers.writeStreamEnd();
}
};