Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 504efb8b authored by Masatoshi Akasaka's avatar Masatoshi Akasaka Committed by Yoshiaki Naka
Browse files

Remove APDU or AID exchanged in communication with applet in SE

The device must avoid to log any sensitive information such as APDU or
AID exchanged in communication with applet located in the secure
element. Refer to TS26_NFC_REQ_163 described in TS.26 - NFC Handset
Requirements.

Bug: 66980442
Test: Confirmed that GSMA TS.27 TC 15.9.3.2.1 does not fail.

Change-Id: I938833b7f94f597adcfb44d94c8791a929541b0d
parent 49573da2
Loading
Loading
Loading
Loading
+31 −14
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ import android.hardware.radio.V1_0.UusInfo;
import android.hardware.radio.deprecated.V1_0.IOemHook;
import android.net.ConnectivityManager;
import android.os.AsyncResult;
import android.os.Build;
import android.os.Handler;
import android.os.HwBinder;
import android.os.Message;
@@ -1379,12 +1380,16 @@ public final class RIL extends BaseCommands implements CommandsInterface {
                    mRILDefaultWorkSource);

            if (RILJ_LOGD) {
                if (Build.IS_DEBUGGABLE) {
                    riljLog(rr.serialString() + "> iccIO: "
                            + requestToString(rr.mRequest) + " command = 0x"
                            + Integer.toHexString(command) + " fileId = 0x"
                            + Integer.toHexString(fileId) + " path = " + path + " p1 = "
                            + p1 + " p2 = " + p2 + " p3 = " + " data = " + data
                            + " aid = " + aid);
                } else {
                    riljLog(rr.serialString() + "> iccIO: " + requestToString(rr.mRequest));
                }
            }

            IccIo iccIo = new IccIo();
@@ -3176,9 +3181,13 @@ public final class RIL extends BaseCommands implements CommandsInterface {
                    mRILDefaultWorkSource);

            if (RILJ_LOGD) {
                if (Build.IS_DEBUGGABLE) {
                    riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)
                            + " cla = " + cla + " instruction = " + instruction
                            + " p1 = " + p1 + " p2 = " + " p3 = " + p3 + " data = " + data);
                } else {
                    riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
                }
            }

            SimApdu msg = createSimApdu(0, cla, instruction, p1, p2, p3, data);
@@ -3198,8 +3207,12 @@ public final class RIL extends BaseCommands implements CommandsInterface {
                    mRILDefaultWorkSource);

            if (RILJ_LOGD) {
                if (Build.IS_DEBUGGABLE) {
                    riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " aid = " + aid
                            + " p2 = " + p2);
                } else {
                    riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
                }
            }

            try {
@@ -3245,9 +3258,13 @@ public final class RIL extends BaseCommands implements CommandsInterface {
                    mRILDefaultWorkSource);

            if (RILJ_LOGD) {
                if (Build.IS_DEBUGGABLE) {
                    riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " channel = "
                            + channel + " cla = " + cla + " instruction = " + instruction
                            + " p1 = " + p1 + " p2 = " + " p3 = " + p3 + " data = " + data);
                } else {
                    riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
                }
            }

            SimApdu msg = createSimApdu(channel, cla, instruction, p1, p2, p3, data);