populate OpenPGP and OATH applet

This commit is contained in:
Frank Morgner
2015-03-10 22:24:15 +01:00
parent dae12a816a
commit 52bbf7b3cd
3 changed files with 24 additions and 16 deletions

View File

@@ -61,16 +61,6 @@ public class SimulatorService extends HostApduService {
extra_error += "\n" + "Could not install " + name + " (AID: " + aid + ")";
}
name = getResources().getString(R.string.applet_isoapplet);
aid = getResources().getString(R.string.aid_isoapplet);
try {
simulator.installApplet(AIDUtil.create(aid), IsoApplet.class);
extra_install += "\n" + name + " (AID: " + aid + ")";
} catch (Exception e) {
e.printStackTrace();
extra_error += "\n" + "Could not install " + name + " (AID: " + aid + ")";
}
name = getResources().getString(R.string.applet_openpgp);
aid = getResources().getString(R.string.aid_openpgp);
try {
@@ -99,6 +89,16 @@ public class SimulatorService extends HostApduService {
extra_error += "\n" + "Could not install " + name + " (AID: " + aid + ")";
}
name = getResources().getString(R.string.applet_isoapplet);
aid = getResources().getString(R.string.aid_isoapplet);
try {
simulator.installApplet(AIDUtil.create(aid), IsoApplet.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);

View File

@@ -13,13 +13,13 @@
<string name="action_copy">Copy Log</string>
<string name="action_delete">Clear Log</string>
<string name="aid_isoapplet">f276a288bcfba69d34f31001</string>
<string name="aid_isoapplet">F276A288BCFBA69D34F31001</string>
<string name="applet_isoapplet">Philip Wendland\'s ISO Applet</string>
<string name="aid_helloworld">F000000001</string>
<string name="applet_helloworld">jCardSim Team\'s Hello World Applet</string>
<string name="aid_openpgp">D2760001240102000000000000010000</string>
<string name="applet_openpgp">Yubico\'s OpenPGP Applet</string>
<string name="aid_oath">a000000527210101</string>
<string name="aid_oath">A000000527210101</string>
<string name="applet_oath">Yubico\'s OATH Applet</string>
</resources>

View File

@@ -4,11 +4,19 @@
android:description="@string/app_name"
android:requireDeviceUnlock="false">
<aid-group android:description="@string/applet_isoapplet" android:category="other">
<aid-filter android:name="@string/aid_isoapplet"/>
</aid-group>
<aid-group android:description="@string/applet_helloworld" android:category="other">
<aid-filter android:name="@string/aid_helloworld"/>
</aid-group>
<aid-group android:description="@string/applet_openpgp" android:category="other">
<aid-filter android:name="@string/aid_openpgp"/>
</aid-group>
<aid-group android:description="@string/applet_oath" android:category="other">
<aid-filter android:name="@string/aid_oath"/>
</aid-group>
<aid-group android:description="@string/applet_isoapplet" android:category="other">
<aid-filter android:name="@string/aid_isoapplet"/>
</aid-group>
</host-apdu-service>