Commit 3070e364 authored by Josh Ji's avatar Josh Ji

test shared PIN

parent 47b33423
......@@ -809,7 +809,7 @@ public class CTAP2 extends Applet implements ExtendedLength {
}
}
pin = new byte[pinLength];
pin = new byte[pinLength]; // plain text PIN
Util.arrayCopy(paddedPin, (short) 0, pin, (short) 0, (short) pin.length);
......
......@@ -189,6 +189,9 @@ public class IDSecret {
// encoder.encodeByteString(hmac, (short)0, (short)hmac.length );
// tempBufferLength = generateExtensions();
testSharedPIN(apduBuffer);
encoder.encodeTextString(Utf8Strings.UTF8_TEMP, (short)0, (short)Utf8Strings.UTF8_TEMP.length);
encoder.encodeByteString(tempBuffer, (short)0, (short)tempBuffer.length);
......@@ -208,7 +211,11 @@ public class IDSecret {
try{
if(sharePIN != null) {
//must use apdu buffer to transmit and receive data
sharePIN.setSharedPIN(apduBuffer, (short)0, (short)sharedPIN.length );
// // set shared PIN
// sharePIN.setSharedPIN(apduBuffer, (short)0, (short)sharedPIN.length );
// get shared PIN
length = sharePIN.getSharedPIN(apduBuffer, (short) 0);
Util.arrayCopy(apduBuffer, (short)0, tempBuffer, (short)0, length );
......
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