ACardEmulator: added GIDS Applet
http://www.mysmartlogon.com/generic-identity-device-specification-gids-smart-card/
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -14,3 +14,6 @@
|
|||||||
[submodule "ACardEmulator/app/src/main/external/MuscleApplet"]
|
[submodule "ACardEmulator/app/src/main/external/MuscleApplet"]
|
||||||
path = ACardEmulator/app/src/main/external/MuscleApplet
|
path = ACardEmulator/app/src/main/external/MuscleApplet
|
||||||
url = https://github.com/martinpaljak/MuscleApplet.git
|
url = https://github.com/martinpaljak/MuscleApplet.git
|
||||||
|
[submodule "ACardEmulator/app/src/main/external/GidsApplet"]
|
||||||
|
path = ACardEmulator/app/src/main/external/GidsApplet
|
||||||
|
url = https://github.com/vletoux/GidsApplet.git
|
||||||
|
|||||||
@@ -55,6 +55,7 @@
|
|||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/main/external/GidsApplet/src" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/external/IsoApplet/src" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/external/IsoApplet/src" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/external/android-scio/src/main" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/external/android-scio/src/main" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/external/ykneo-openpgp/applet/src" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/external/ykneo-openpgp/applet/src" isTestSource="false" />
|
||||||
@@ -70,14 +71,18 @@
|
|||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/debug" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.0.1/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.0.1/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/tmp" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
||||||
</content>
|
</content>
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
main.java.srcDirs += 'src/main/external/GidsApplet/src'
|
||||||
|
main.java.exclude('**/gidsAppletTests/*.java')
|
||||||
main.java.srcDirs += 'src/main/external/IsoApplet/src'
|
main.java.srcDirs += 'src/main/external/IsoApplet/src'
|
||||||
main.java.srcDirs += 'src/main/external/android-scio/src/main'
|
main.java.srcDirs += 'src/main/external/android-scio/src/main'
|
||||||
main.java.srcDirs += 'src/main/external/ykneo-openpgp/applet/src'
|
main.java.srcDirs += 'src/main/external/ykneo-openpgp/applet/src'
|
||||||
|
|||||||
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.samples.HelloWorldApplet;
|
||||||
import com.licel.jcardsim.utils.AIDUtil;
|
import com.licel.jcardsim.utils.AIDUtil;
|
||||||
|
|
||||||
import net.pwendland.javacard.pki.isoapplet.IsoApplet;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
@@ -41,6 +39,8 @@ import java.net.Socket;
|
|||||||
|
|
||||||
import openpgpcard.OpenPGPApplet;
|
import openpgpcard.OpenPGPApplet;
|
||||||
import pkgYkneoOath.YkneoOath;
|
import pkgYkneoOath.YkneoOath;
|
||||||
|
import net.pwendland.javacard.pki.isoapplet.IsoApplet;
|
||||||
|
import com.mysmartlogon.gidsApplet.GidsApplet;
|
||||||
|
|
||||||
public class SimulatorService extends HostApduService {
|
public class SimulatorService extends HostApduService {
|
||||||
|
|
||||||
@@ -114,6 +114,16 @@ public class SimulatorService extends HostApduService {
|
|||||||
extra_error += "\n" + "Could not install " + name + " (AID: " + aid + ")";
|
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);
|
Intent i = new Intent(TAG);
|
||||||
if (!extra_error.isEmpty())
|
if (!extra_error.isEmpty())
|
||||||
i.putExtra(EXTRA_ERROR, extra_error);
|
i.putExtra(EXTRA_ERROR, extra_error);
|
||||||
|
|||||||
@@ -14,6 +14,10 @@
|
|||||||
<string name="action_delete">Clear Log</string>
|
<string name="action_delete">Clear Log</string>
|
||||||
<string name="action_help">Show Help</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="aid_isoapplet">F276A288BCFBA69D34F31001</string>
|
||||||
<string name="applet_isoapplet">Philip Wendland\'s ISO Applet</string>
|
<string name="applet_isoapplet">Philip Wendland\'s ISO Applet</string>
|
||||||
<string name="aid_helloworld">F000000001</string>
|
<string name="aid_helloworld">F000000001</string>
|
||||||
@@ -30,6 +34,7 @@
|
|||||||
<b>OpenPGP Applet</b> <small>(AID D2760001240102000000000000010000)</small>\n
|
<b>OpenPGP Applet</b> <small>(AID D2760001240102000000000000010000)</small>\n
|
||||||
<b>OATH Applet</b> <small>(AID A000000527210101)</small>\n
|
<b>OATH Applet</b> <small>(AID A000000527210101)</small>\n
|
||||||
<b>ISO Applet</b> <small>(AID F276A288BCFBA69D34F31001)</small>\n
|
<b>ISO Applet</b> <small>(AID F276A288BCFBA69D34F31001)</small>\n
|
||||||
|
<b>GIDS Applet</b> <small>(AID A000000397425446590201)</small>\n
|
||||||
\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>
|
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-filter android:name="@string/aid_isoapplet"/>
|
||||||
</aid-group>
|
</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>
|
</host-apdu-service>
|
||||||
|
|||||||
Reference in New Issue
Block a user