aboutsummaryrefslogtreecommitdiffstats
path: root/include/sec.h
diff options
context:
space:
mode:
authorJoerie de Gram <j.de.gram@gmail.com>2011-08-16 22:06:50 +0200
committerJoerie de Gram <j.de.gram@gmail.com>2011-08-16 22:08:09 +0200
commita3c46bd32430db57b97a1498d3da9a2c01df22ad (patch)
treecb1d54476b941e007221288c2aa2f5e0c2e858f3 /include/sec.h
parentaf834232e68f8c2501b3b1224336018313a46e9f (diff)
downloadhardware_replicant_libsamsung-ipc-a3c46bd32430db57b97a1498d3da9a2c01df22ad.tar.gz
hardware_replicant_libsamsung-ipc-a3c46bd32430db57b97a1498d3da9a2c01df22ad.tar.bz2
hardware_replicant_libsamsung-ipc-a3c46bd32430db57b97a1498d3da9a2c01df22ad.zip
sec: improve PIN handling
Diffstat (limited to 'include/sec.h')
-rw-r--r--include/sec.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/include/sec.h b/include/sec.h
index 3ec961a..bd8629b 100644
--- a/include/sec.h
+++ b/include/sec.h
@@ -50,15 +50,31 @@
#define MSM_SEC_PIN_SIM_LOCK_SC_PUK_REQ 0x02
#define MSM_SEC_PIN_SIM_LOCK_SC_CARD_BLOCKED 0x05
+#define MSM_SEC_PIN_TYPE_PIN1 0x03
+#define MSM_SEC_PIN_TYPE_PIN2 0x09
+
#define MSM_SEC_SIM_CARD_TYPE_UNKNOWN 0x00
#define MSM_SEC_SIM_CARD_TYPE_SIM 0x01
#define MSM_SEC_SIM_CARD_TYPE_USIM 0x02
-struct msm_sec_pin_status {
+struct msm_sec_pin_status_noti {
unsigned char type;
unsigned char key;
} __attribute__((__packed__));
+struct msm_sec_pin_status_set {
+ unsigned char type;
+ unsigned char length1;
+ unsigned char length2;
+ unsigned char pin1[8];
+ unsigned char pin2[8];
+} __attribute__((__packed__));
+
+struct msm_sec_phone_lock {
+ unsigned char type;
+ unsigned char status;
+} __attribute__((__packed__));
+
struct msm_sec_rsim_access_request {
unsigned char command;
unsigned short fileid;
@@ -70,6 +86,13 @@ struct msm_sec_rsim_access_response {
unsigned char len;
} __attribute__((__packed__));
+struct msm_sec_lock_info {
+ unsigned char num;
+ unsigned char type;
+ unsigned char key;
+ unsigned char attempts;
+} __attribute__((__packed__));
+
void msm_sec_rsim_access(unsigned char command, unsigned short file_id,
unsigned char p1, unsigned char p2, unsigned char p3,
unsigned char *rdata, unsigned int length, int request_id);