X-Git-Url: http://www.git.cypherpunks.ru/?p=pyderasn.git;a=blobdiff_plain;f=pyderasn.py;h=4e9def7bff226e6a53c6b4b4abba12ad3787480b;hp=482b3456cc2eca5e6b5ea3936ee9927a89744d4f;hb=40b9fcc9381c4456152deb9a448b4e5fd014b7e7;hpb=28b62f6a6edff52262d6488ebf09ce8b5a45961c diff --git a/pyderasn.py b/pyderasn.py index 482b345..4e9def7 100755 --- a/pyderasn.py +++ b/pyderasn.py @@ -3228,6 +3228,8 @@ class ObjectIdentifier(Obj): arc = 0 while True: octet = indexbytes(v, i) + if i == 0 and octet == 0x80 and not ctx.get("bered", False): + raise DecodeError("non normalized arc encoding") arc = (arc << 7) | (octet & 0x7F) if octet & 0x80 == 0: arcs.append(arc)