X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=pyderasn.py;h=ffc788ca6cca7a8529cfa1a3ca93abc57d414675;hb=15fcedaab8d00001395b44d6d500312b2b0a06e3;hp=ac74adca037466893af82825115ca0c7bd13269e;hpb=f8f92c66af855c581d4b6e8b824da63f6987cc33;p=pyderasn.git diff --git a/pyderasn.py b/pyderasn.py index ac74adc..ffc788c 100755 --- a/pyderasn.py +++ b/pyderasn.py @@ -5037,6 +5037,11 @@ def main(): # pragma: no cover "--defines-by-path", help="Python path to decoder's defines_by_path", ) + parser.add_argument( + "--nobered", + action='store_true', + help="Disallow BER encoding", + ) parser.add_argument( "DERFile", type=argparse.FileType("rb"), @@ -5053,7 +5058,7 @@ def main(): # pragma: no cover pprinter = partial(pprint, big_blobs=True) else: schema, pprinter = generic_decoder() - ctx = {"bered": True} + ctx = {"bered": not args.nobered} if args.defines_by_path is not None: ctx["defines_by_path"] = obj_by_path(args.defines_by_path) obj, tail = schema().decode(der, ctx=ctx)