laforge has uploaded this change for review. (
https://gerrit.osmocom.org/c/pysim/+/37416?usp=email )
Change subject: pySim.esim: Allow calling compile_asn1_subdir() with non-DER coddec
......................................................................
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
---
M pySim/esim/__init__.py
1 file changed, 14 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/16/37416/1
diff --git a/pySim/esim/__init__.py b/pySim/esim/__init__.py
index 1f7ea16..fbb90b9 100644
--- a/pySim/esim/__init__.py
+++ b/pySim/esim/__init__.py
@@ -3,7 +3,7 @@
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"""
import asn1tools
asn_txt = ''
@@ -14,7 +14,7 @@
asn_txt += "\n"
#else:
#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
--
To view, visit
https://gerrit.osmocom.org/c/pysim/+/37416?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I1de4b9506a92d60f582c328a180760332584f9e4
Gerrit-Change-Number: 37416
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange