forked from LedgerHQ/ledger-u2f-javacard
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for "dont-enforce-user-presence-and-sign" (0x08)
This change adds support for the control byte value 0x08, which is the value for "dont-enforce-user-presence-and-sign". In this mode, user presence is not enforced but a signature is still created.
- Loading branch information
1 parent
c2f223d
commit 24b6f13
Showing
4 changed files
with
67 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,36 @@ | ||
package com.ledger.u2f; | ||
|
||
public interface Presence { | ||
/** A user is present. | ||
* | ||
* This means that someone interacted with the | ||
* authenticator while performing this operation. | ||
*/ | ||
byte FLAG_USER_PRESENT = (byte)0x01; | ||
|
||
void verify_user_presence(); | ||
/** The user was verified. From webauthn. | ||
* | ||
* This means that the user has verified themselves | ||
* to the authenticator using, for example, their | ||
* fingerprint or a PIN. | ||
*/ | ||
byte FLAG_USER_VERIFIED = (byte)0x04; | ||
|
||
/** | ||
* Waits for user presence, throwing an exception if that | ||
* is impossible or if there is a timeout. | ||
* | ||
* @return the value of the user presence byte | ||
* in the FIDO U2F signature response. | ||
*/ | ||
byte enforce_user_presence(); | ||
|
||
/** | ||
* Checks user presence. Should not throw an exception. | ||
* Returns immediately. | ||
* | ||
* @return the value of the user presence byte | ||
* in the FIDO U2F signature response. | ||
*/ | ||
byte check_user_presence(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters