Commit 20eb478d authored by Josh Ji's avatar Josh Ji

remove a bug in CTAP2.java,

add some scripts and tasks in build.gradle
    1. getCount : get the number of generated credentials
    2. reset : remove all the generated credentials
parent ba3ad98f
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
...@@ -6,7 +6,7 @@ add gradle plugin into fido u2f applet from [vk_u2f](https://github.com/VivoKey/ ...@@ -6,7 +6,7 @@ add gradle plugin into fido u2f applet from [vk_u2f](https://github.com/VivoKey/
1. open intelliJ by administrator 1. open intelliJ by administrator
1. open the project 1. open the project
1. run "build/buildJavaCard" Gradle Task 1. run "build/buildJavaCard" Gradle Task
1. run "global platfrom/installJavaCard" Gradle Task 1. run "global platform/installJavaCard" Gradle Task
1. put certificate 1. put certificate
1. open terminal in intelliJ 1. open terminal in intelliJ
2. change to cmd if the default terminal is PowerShell 2. change to cmd if the default terminal is PowerShell
......
...@@ -53,6 +53,14 @@ javacard{ ...@@ -53,6 +53,14 @@ javacard{
name "getPublicKey" name "getPublicKey"
apdu "801000000144" apdu "801000000144"
} }
script{
name "getCount"
apdu "801000000145"
}
script{
name "reset"
apdu "801000000107"
}
script{ script{
name "getCertificate" name "getCertificate"
apdu "80100000014A" apdu "80100000014A"
...@@ -65,9 +73,17 @@ javacard{ ...@@ -65,9 +73,17 @@ javacard{
name "getPublicKey" name "getPublicKey"
scripts "select applet", "getPublicKey" scripts "select applet", "getPublicKey"
} }
task{
name "getCount"
scripts "select applet", "getCount"
}
task{ task{
name "getCertificate" name "getCertificate"
scripts "select applet", "getCertificate" scripts "select applet", "getCertificate"
} }
task{
name 'reset'
scripts 'select applet', 'reset'
}
} }
} }
...@@ -427,7 +427,7 @@ public class CTAP2 extends Applet implements ExtendedLength { ...@@ -427,7 +427,7 @@ public class CTAP2 extends Applet implements ExtendedLength {
// Copy the hash in // Copy the hash in
authenticatorGetAssertion.getHash(scratch, (short) 37); authenticatorGetAssertion.getHash(scratch, (short) 37);
// Create the output // Create the output
String a = "adfadsfa";
// Status flags first // Status flags first
dataBuffer[0] = 0x00; dataBuffer[0] = 0x00;
// Create the encoder // Create the encoder
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment