diff uicc/select.c @ 139:6c6e8705dc70

fc-uicc-tool: select-usim and select-isim implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 04 Feb 2021 05:00:12 +0000
parents baf5bd698764
children 429a8f80426e
line wrap: on
line diff
--- a/uicc/select.c	Thu Feb 04 04:51:08 2021 +0000
+++ b/uicc/select.c	Thu Feb 04 05:00:12 2021 +0000
@@ -8,6 +8,9 @@
 #include <winscard.h>
 #include "globals.h"
 
+u_char std_aid_usim[7] = {0xA0, 0x00, 0x00, 0x00, 0x87, 0x10, 0x02};
+u_char std_aid_isim[7] = {0xA0, 0x00, 0x00, 0x00, 0x87, 0x10, 0x04};
+
 select_op(file_id)
 	unsigned file_id;
 {
@@ -217,6 +220,26 @@
 	return parse_and_display_select_response();
 }
 
+cmd_select_usim()
+{
+	int rc;
+
+	rc = select_aid_op(std_aid_usim, 7);
+	if (rc < 0)
+		return(rc);
+	return parse_and_display_select_response();
+}
+
+cmd_select_isim()
+{
+	int rc;
+
+	rc = select_aid_op(std_aid_isim, 7);
+	if (rc < 0)
+		return(rc);
+	return parse_and_display_select_response();
+}
+
 u_char *
 extract_select_resp_tag(sought_tag)
 	unsigned sought_tag;