laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36609?usp=email )
(
3 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: SGP32Definitions_Templates: add new set of templates to support rollback ......................................................................
SGP32Definitions_Templates: add new set of templates to support rollback
This patch adds a number of templates that are needed to test profile rollback.
Related: SYS#6563 Change-Id: I6db76afb102bf011655b7dbca9cff07b8116eb8d --- M library/euicc/SGP32Definitions_EncDec.cc M library/euicc/SGP32Definitions_Templates.ttcn M library/euicc/SGP32Definitions_Types.ttcn 3 files changed, 91 insertions(+), 2 deletions(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved
diff --git a/library/euicc/SGP32Definitions_EncDec.cc b/library/euicc/SGP32Definitions_EncDec.cc index 4dfcc6b..a457943 100644 --- a/library/euicc/SGP32Definitions_EncDec.cc +++ b/library/euicc/SGP32Definitions_EncDec.cc @@ -109,5 +109,39 @@ return msg; }
+OCTETSTRING enc__ProfileRollbackRequest(const ProfileRollbackRequest &msg) { + TTCN_Buffer buf; + + buf.clear(); + msg.encode(ProfileRollbackRequest_descr_, buf, TTCN_EncDec::CT_BER, BER_ENCODE_DER); + return OCTETSTRING(buf.get_len(), buf.get_data()); +} + +ProfileRollbackRequest dec__ProfileRollbackRequest(const OCTETSTRING &stream) { + TTCN_Buffer buf; + ProfileRollbackRequest msg; + buf.put_os(stream); + + msg.decode(ProfileRollbackRequest_descr_, buf, TTCN_EncDec::CT_BER, BER_ACCEPT_ALL); + return msg; +} + +OCTETSTRING enc__ProfileRollbackResponse(const ProfileRollbackResponse &msg) { + TTCN_Buffer buf; + + buf.clear(); + msg.encode(ProfileRollbackResponse_descr_, buf, TTCN_EncDec::CT_BER, BER_ENCODE_DER); + return OCTETSTRING(buf.get_len(), buf.get_data()); +} + +ProfileRollbackResponse dec__ProfileRollbackResponse(const OCTETSTRING &stream) { + TTCN_Buffer buf; + ProfileRollbackResponse msg; + buf.put_os(stream); + + msg.decode(ProfileRollbackResponse_descr_, buf, TTCN_EncDec::CT_BER, BER_ACCEPT_ALL); + return msg; +} +
} diff --git a/library/euicc/SGP32Definitions_Templates.ttcn b/library/euicc/SGP32Definitions_Templates.ttcn index 29e7579..c178a9c 100644 --- a/library/euicc/SGP32Definitions_Templates.ttcn +++ b/library/euicc/SGP32Definitions_Templates.ttcn @@ -437,4 +437,43 @@ } }
+/* GSMA SGP.32, section 5.9.16 */ +template (present) ProfileRollbackRequest +tr_profileRollbackRequest := { + refreshFlag := ? +} +template (value) ProfileRollbackRequest +ts_profileRollbackRequest := { + refreshFlag := false +} +template (present) ProfileRollbackResponse +tr_profileRollbackResponse := { + cmdResult := ?, + eUICCPackageResult := ? +} +template (value) ProfileRollbackResponse +ts_profileRollbackResponse := { + cmdResult := 0, + eUICCPackageResult := { + euiccPackageResultSigned := { + euiccPackageResultDataSigned := { + eimId := "myEim", + counterValue := 333, + transactionId := omit, + seqNumber := 1234, + euiccResult := { + { + enableResult := 0 + }, + { + rollbackResult := 0 + } + } + }, + euiccSignEPR := 'AABBCCDDEEFF'O + } + } +} + + } diff --git a/library/euicc/SGP32Definitions_Types.ttcn b/library/euicc/SGP32Definitions_Types.ttcn index 44a1a07..4b68e67 100644 --- a/library/euicc/SGP32Definitions_Types.ttcn +++ b/library/euicc/SGP32Definitions_Types.ttcn @@ -18,7 +18,10 @@ external function dec_GetEimConfigurationDataResponse(in octetstring stream) return GetEimConfigurationDataResponse; external function enc_GetEimConfigurationDataResponse(in GetEimConfigurationDataResponse msg) return octetstring;
-external function dec_AddInitialEimResponse(in octetstring stream) return AddInitialEimResponse; -external function enc_AddInitialEimResponse(in AddInitialEimResponse msg) return octetstring; +external function dec_ProfileRollbackRequest(in octetstring stream) return ProfileRollbackRequest; +external function enc_ProfileRollbackRequest(in ProfileRollbackRequest msg) return octetstring; + +external function dec_ProfileRollbackResponse(in octetstring stream) return ProfileRollbackResponse; +external function enc_ProfileRollbackResponse(in ProfileRollbackResponse msg) return octetstring;
}