check_asn1.py 318 Bytes
Newer Older
canterburym's avatar
canterburym committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from asn1tools import parse_files, ParseError
import sys
from glob import glob
from pathlib import Path


schemaFileGlob = glob("*.asn1")
for schemaFile in schemaFileGlob:
    try:
        parse_files(schemaFile)
    except ParseError as ex:
        sys.exit("ASN1 parser error: " + str(ex))

print ("ASN1 schema OK")