parse encapsulated structures (octet string or bit string containing valid ASN.1): add omitted finalCheck()
Among other things, it avoids interpreting zezo-length octet strings as encapsulated structures.
--- a/src/lib/BasicASN1Reader.h Sun Jul 18 20:08:29 2021 +0200
+++ b/src/lib/BasicASN1Reader.h Sun Jul 18 22:43:16 2021 +0200
@@ -278,6 +278,7 @@
try {
encapsulatedReader.write((const uint8_t*) input.c_str(), input.size());
encapsulatedReader.close();
+ validatingHandler->finalCheck();
return true;
} catch (...) {
return false;