X-Git-Url: http://www.git.cypherpunks.ru/?p=pyderasn.git;a=blobdiff_plain;f=pyderasn.py;h=e8e200c69196820912b314f0fa7e84844eeb47d0;hp=c2d8f4409ee9f8d7b50a75956ed5d03a72b08db5;hb=597f028b5d602b4af53830ac682078aa5fb59e38;hpb=525b88f45577a5a63621e6621770752df8101c54 diff --git a/pyderasn.py b/pyderasn.py index c2d8f44..e8e200c 100755 --- a/pyderasn.py +++ b/pyderasn.py @@ -4885,8 +4885,8 @@ class Sequence(Obj): ctx=ctx, _ctx_immutable=False, ) - except TagMismatch: - if spec.optional: + except TagMismatch as err: + if (len(err.decode_path) == len(decode_path) + 1) and spec.optional: continue raise