add installation without init
This commit is contained in:
parent
5ea1a2397b
commit
086cc77f67
|
@ -6,8 +6,8 @@ android {
|
|||
applicationId "im.status.keycard_installer.installer"
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 27
|
||||
versionCode 201
|
||||
versionName "2.0.1"
|
||||
versionCode 202
|
||||
versionName "2.0.2"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
|
|
|
@ -55,14 +55,16 @@ public class Installer {
|
|||
Logger.i("installing Keycard applet...");
|
||||
cmdSet.installKeycardApplet().checkOK();
|
||||
|
||||
this.personalizeApplet();
|
||||
if (testSecrets) {
|
||||
this.personalizeApplet();
|
||||
}
|
||||
|
||||
long duration = System.currentTimeMillis() - startTime;
|
||||
Logger.i(String.format("\n\ninstallation completed in %d seconds", duration / 1000));
|
||||
}
|
||||
|
||||
private void personalizeApplet() throws NoSuchAlgorithmException, InvalidKeySpecException, APDUException, IOException {
|
||||
Secrets secrets = testSecrets ? Secrets.testSecrets() : Secrets.generate();
|
||||
Secrets secrets = Secrets.testSecrets();
|
||||
|
||||
KeycardCommandSet cmdSet = new KeycardCommandSet(this.plainChannel);
|
||||
cmdSet.select().checkOK();
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
android:id="@+id/buttonInstall"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Install Secure"/>
|
||||
android:text="Install w/o INIT"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonInstallTest"
|
||||
|
|
Loading…
Reference in New Issue