parse encapsulated structures (octet string or bit string containing valid ASN.1): add omitted finalCheck() v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sun, 18 Jul 2021 22:43:16 +0200
branchv_0
changeset 37 0845ca3636b6
parent 36 caed9146f72f
child 38 44ee477875ec
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.
src/lib/BasicASN1Reader.h
--- 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;