From 95af544936f9b6d7b8d03f3f49effaf5c314513d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 28 Feb 2013 15:09:06 +0100 Subject: Correct encoding (decoding) of lengths less than the root range Given the type: S ::= IA5String (SIZE (5, ...)) attempting to encode (to PER/UPER) a string shorter than 5 characters would fail. Similarly, attempting to decode such string in the BER format would fail. In the case of BER, we can do no range checks if the size constraint is extensible. --- lib/asn1/test/asn1_SUITE_data/Constraints.py | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/asn1/test/asn1_SUITE_data/Constraints.py') diff --git a/lib/asn1/test/asn1_SUITE_data/Constraints.py b/lib/asn1/test/asn1_SUITE_data/Constraints.py index 87243121f7..a069364084 100644 --- a/lib/asn1/test/asn1_SUITE_data/Constraints.py +++ b/lib/asn1/test/asn1_SUITE_data/Constraints.py @@ -86,5 +86,6 @@ Document ::= OCTET STRING (ENCODED BY pdf) pdf OBJECT IDENTIFIER ::= {1,2,3,4,5} +ShorterExt ::= IA5String (SIZE (5, ...)) END -- cgit v1.2.3