aboutsummaryrefslogtreecommitdiffstats
path: root/src/sim/card_fs_isim.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/card_fs_isim.c')
-rw-r--r--src/sim/card_fs_isim.c49
1 files changed, 26 insertions, 23 deletions
diff --git a/src/sim/card_fs_isim.c b/src/sim/card_fs_isim.c
index e6ba0d09..f11c0294 100644
--- a/src/sim/card_fs_isim.c
+++ b/src/sim/card_fs_isim.c
@@ -1,7 +1,7 @@
/*! \file card_fs_isim.c
* 3GPP ISIM specific structures / routines. */
/*
- * (C) 2014 by Harald Welte <laforge@gnumonks.org>
+ * (C) 2014-2020 by Harald Welte <laforge@gnumonks.org>
*
* All Rights Reserved
*
@@ -34,22 +34,19 @@
#include "sim_int.h"
#include "gsm_int.h"
-/* TS 31.103 Version 11.2.0 Release 11 / Chapoter 7.1.3 */
+/* TS 31.103 Version 15.5.0 Release 15 / Chapter 7.1.3 */
const struct osim_card_sw ts31_103_sw[] = {
{
0x9862, 0xffff, SW_TYPE_STR, SW_CLS_ERROR,
.u.str = "Security management - Authentication error, incorrect MAC",
+ }, {
+ 0x9864, 0xffff, SW_TYPE_STR, SW_CLS_ERROR,
+ .u.str = "Security management - Authentication error, security context not supported",
},
OSIM_CARD_SW_LAST
};
-static const struct osim_card_sw *isim_card_sws[] = {
- ts31_103_sw,
- ts102221_uicc_sw,
- NULL
-};
-
-/* TS 31.103 Version 11.2.0 Release 11 / Chapoter 4.2 */
+/* TS 31.103 Version 15.5.0 Release 15 / Chapter 4.2 */
static const struct osim_file_desc isim_ef_in_adf_isim[] = {
EF_TRANSP_N(0x6F02, 0x02, "EF.IMPI", 0, 1, 256,
"IMS private user identity"),
@@ -81,28 +78,34 @@ static const struct osim_file_desc isim_ef_in_adf_isim[] = {
"Short message service parameters"),
EF_LIN_FIX_N(0x6FE7, SFI_NONE, "EF.UICCIARI", F_OPTIONAL, 1, 256,
"UICC IARI"),
+ EF_TRANSP_N(0x6FF7, SFI_NONE, "EF_FromPreferred", F_OPTIONAL, 1, 1,
+ "From Preferred"),
+ EF_TRANSP_N(0x6FF8, SFI_NONE, "EF_IMSConfigData", F_OPTIONAL, 3, 128,
+ "IMS Configuration Data"),
+ EF_TRANSP_N(0x6FFC, SFI_NONE, "EF_XCAPConfigData", F_OPTIONAL, 1, 128,
+ "XCAP Configuration Data"),
+ EF_LIN_FIX_N(0x6FFA, SFI_NONE, "EF_WebRTCURI", F_OPTIONAL, 3, 128,
+ "WebRTC URI"),
};
/* Annex E - TS 101 220 */
static const uint8_t adf_isim_aid[] = { 0xA0, 0x00, 0x00, 0x00, 0x87, 0x10, 0x04 };
-struct osim_card_profile *osim_cprof_isim(void *ctx)
+struct osim_card_app_profile *osim_aprof_isim(void *ctx)
{
- struct osim_card_profile *cprof;
- struct osim_file_desc *mf;
-
- cprof = talloc_zero(ctx, struct osim_card_profile);
- cprof->name = "3GPP ISIM";
- cprof->sws = isim_card_sws;
-
- mf = alloc_df(cprof, 0x3f00, "MF");
+ struct osim_card_app_profile *aprof;
+ struct osim_file_desc *iadf;
- cprof->mf = mf;
+ aprof = talloc_zero(ctx, struct osim_card_app_profile);
+ aprof->name = "3GPP ISIM";
+ aprof->sw = ts31_103_sw;
+ aprof->aid_len = sizeof(adf_isim_aid);
+ memcpy(aprof->aid, adf_isim_aid, aprof->aid_len);
/* ADF.USIM with its EF siblings */
- add_adf_with_ef(mf, adf_isim_aid, sizeof(adf_isim_aid),
- "ADF.ISIM", isim_ef_in_adf_isim,
- ARRAY_SIZE(isim_ef_in_adf_isim));
+ iadf = alloc_adf_with_ef(aprof, adf_isim_aid, sizeof(adf_isim_aid), "ADF.ISIM",
+ isim_ef_in_adf_isim, ARRAY_SIZE(isim_ef_in_adf_isim));
+ aprof->adf = iadf;
- return cprof;
+ return aprof;
}