mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-30 04:03:27 +03:00
pySim.esim: Allow calling compile_asn1_subdir() with non-DER coddec
this isn't needed for the on-wire format, but can be useful for debug output in GSER or JER. Change-Id: I1de4b9506a92d60f582c328a180760332584f9e4
This commit is contained in:
@@ -3,7 +3,7 @@ from typing import Optional
|
|||||||
from importlib import resources
|
from importlib import resources
|
||||||
|
|
||||||
|
|
||||||
def compile_asn1_subdir(subdir_name:str):
|
def compile_asn1_subdir(subdir_name:str, codec='der'):
|
||||||
"""Helper function that compiles ASN.1 syntax from all files within given subdir"""
|
"""Helper function that compiles ASN.1 syntax from all files within given subdir"""
|
||||||
import asn1tools
|
import asn1tools
|
||||||
asn_txt = ''
|
asn_txt = ''
|
||||||
@@ -14,7 +14,7 @@ def compile_asn1_subdir(subdir_name:str):
|
|||||||
asn_txt += "\n"
|
asn_txt += "\n"
|
||||||
#else:
|
#else:
|
||||||
#print(resources.read_text(__name__, 'asn1/rsp.asn'))
|
#print(resources.read_text(__name__, 'asn1/rsp.asn'))
|
||||||
return asn1tools.compile_string(asn_txt, codec='der')
|
return asn1tools.compile_string(asn_txt, codec=codec)
|
||||||
|
|
||||||
|
|
||||||
# SGP.22 section 4.1 Activation Code
|
# SGP.22 section 4.1 Activation Code
|
||||||
|
|||||||
Reference in New Issue
Block a user