sudeshsudesh / seek-for-android

Automatically exported from code.google.com/p/seek-for-android
0 stars 0 forks source link

openLogicalChannel failing while testing AKA authentication algorithm via APDU commands #92

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What's the problem?
Trying open channel with UICC applet to send AKA authentication algorithm , but 
failing to open channel. 
Error getting 
06-04 16:54:52.112: E/BRAJ(6419): java.lang.SecurityException: Access Control 
Enforcer: access denied: Cannot select PKCS#15 directory via EF Dir
06-04 16:54:52.112: E/BRAJ(6419):   at 
org.simalliance.openmobileapi.SEService.checkForException(SEService.java:234)
06-04 16:54:52.112: E/BRAJ(6419):   at 
org.simalliance.openmobileapi.Session.openLogicalChannel(Session.java:285)

What steps will reproduce the problem?
1.Applied patch smartcard-api-3_1_0 on Android 4.3.1 CyanogenMod 11.
2. Sample Test Program
Reader[] readers = seService.getReaders();
              if (readers.length < 1)
                 return;

              uuicReader = null;

              for (Reader reader : readers) {
                  if (reader.getName().equalsIgnoreCase("SIM - UICC")) {
                      uuicReader = reader;
                      break;
                  }
              }

              Log.i(LOG_TAG, "Create Session from the first reader...");
              Session session = uuicReader.openSession();

              Log.i(LOG_TAG, "Create logical channel within the session...");
             /* Channel channel = session.openLogicalChannel(new byte[] {
                                  (byte) 0xD2, 0x76, 0x00, 0x01, 0x18, 0x00, 0x02,
                                  (byte) 0xFF, 0x49, 0x50, 0x25, (byte) 0x89,
                                  (byte) 0xC0, 0x01, (byte) 0x9B, 0x01 });*/

              Channel channel = session.openLogicalChannel( new byte[] {
                      (byte) 0xF9, 
                      (byte) 0xF4, 
                      (byte) 0x0F,
                      (byte) 0x65,
                      (byte) 0x18, 
                      (byte) 0xC9,
                      (byte) 0x54, 
                      (byte) 0x1E, 
                      (byte) 0xCD, 
                      (byte) 0xAD
                  });

What is the expected output? What do you see instead?
It should send APDU command to SIM and get back response
What version of the product are you using? On what operating system?
Cyanogemnmod 11 with smartcard-api-3_1_0 patch
Please provide any additional information below.
1) Is it possible to run SIM/AKA authentication algorithm on Galaxy S3 devices?
2) We are using Gemalto SIMs for our testing

Original issue reported on code.google.com by brajab...@gmail.com on 4 Jun 2015 at 12:15