ACardEmulator: added GIDS Applet
http://www.mysmartlogon.com/generic-identity-device-specification-gids-smart-card/
This commit is contained in:
1
ACardEmulator/app/src/main/external/GidsApplet
vendored
Submodule
1
ACardEmulator/app/src/main/external/GidsApplet
vendored
Submodule
Submodule ACardEmulator/app/src/main/external/GidsApplet added at 5851dbc612
@@ -31,8 +31,6 @@ import com.licel.jcardsim.base.SimulatorRuntime;
|
||||
import com.licel.jcardsim.samples.HelloWorldApplet;
|
||||
import com.licel.jcardsim.utils.AIDUtil;
|
||||
|
||||
import net.pwendland.javacard.pki.isoapplet.IsoApplet;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
@@ -41,6 +39,8 @@ import java.net.Socket;
|
||||
|
||||
import openpgpcard.OpenPGPApplet;
|
||||
import pkgYkneoOath.YkneoOath;
|
||||
import net.pwendland.javacard.pki.isoapplet.IsoApplet;
|
||||
import com.mysmartlogon.gidsApplet.GidsApplet;
|
||||
|
||||
public class SimulatorService extends HostApduService {
|
||||
|
||||
@@ -114,6 +114,16 @@ public class SimulatorService extends HostApduService {
|
||||
extra_error += "\n" + "Could not install " + name + " (AID: " + aid + ")";
|
||||
}
|
||||
|
||||
name = getResources().getString(R.string.applet_gidsapplet);
|
||||
aid = getResources().getString(R.string.aid_gidsapplet);
|
||||
try {
|
||||
simulator.installApplet(AIDUtil.create(aid), GidsApplet.class);
|
||||
extra_install += "\n" + name + " (AID: " + aid + ")";
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
extra_error += "\n" + "Could not install " + name + " (AID: " + aid + ")";
|
||||
}
|
||||
|
||||
Intent i = new Intent(TAG);
|
||||
if (!extra_error.isEmpty())
|
||||
i.putExtra(EXTRA_ERROR, extra_error);
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
<string name="action_delete">Clear Log</string>
|
||||
<string name="action_help">Show Help</string>
|
||||
|
||||
<string name="aid_gidsapplet">A000000397425446590201</string>
|
||||
<string name="aid_gidsapplet_truncated1">A0000003974254465902</string>
|
||||
<string name="aid_gidsapplet_truncated2">A00000039742544659</string>
|
||||
<string name="applet_gidsapplet">My Smart Logon\'s GIDS Applet</string>
|
||||
<string name="aid_isoapplet">F276A288BCFBA69D34F31001</string>
|
||||
<string name="applet_isoapplet">Philip Wendland\'s ISO Applet</string>
|
||||
<string name="aid_helloworld">F000000001</string>
|
||||
@@ -30,6 +34,7 @@
|
||||
<b>OpenPGP Applet</b> <small>(AID D2760001240102000000000000010000)</small>\n
|
||||
<b>OATH Applet</b> <small>(AID A000000527210101)</small>\n
|
||||
<b>ISO Applet</b> <small>(AID F276A288BCFBA69D34F31001)</small>\n
|
||||
<b>GIDS Applet</b> <small>(AID A000000397425446590201)</small>\n
|
||||
\n
|
||||
Place your device on a contact-less reader. When the reader issues a SELECT command for one of the application identifiers above, the emulator creates the appropriate applet. The emulated applet will then handle all subsequent APDUs.</string>
|
||||
|
||||
|
||||
@@ -21,4 +21,10 @@
|
||||
<aid-filter android:name="@string/aid_isoapplet"/>
|
||||
</aid-group>
|
||||
|
||||
<aid-group android:description="@string/applet_gidsapplet" android:category="other">
|
||||
<aid-filter android:name="@string/aid_gidsapplet"/>
|
||||
<aid-filter android:name="@string/aid_gidsapplet_truncated1"/>
|
||||
<aid-filter android:name="@string/aid_gidsapplet_truncated2"/>
|
||||
</aid-group>
|
||||
|
||||
</host-apdu-service>
|
||||
|
||||
Reference in New Issue
Block a user