diff options
Diffstat (limited to 'board/cr50/dcrypto/u2f_impl.h')
-rw-r--r-- | board/cr50/dcrypto/u2f_impl.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/board/cr50/dcrypto/u2f_impl.h b/board/cr50/dcrypto/u2f_impl.h index 9003db4a03..8e6b4a0575 100644 --- a/board/cr50/dcrypto/u2f_impl.h +++ b/board/cr50/dcrypto/u2f_impl.h @@ -186,11 +186,23 @@ enum ec_error_list u2f_attest(const struct u2f_state *state, /** * Get the current u2f state from the board. * + * Create a state if one does not exist, commit the created state into NVMEM. + * * @return pointer to static state if successful, NULL otherwise */ struct u2f_state *u2f_get_state(void); /** + * Get the current u2f state from the board. + * + * Create a state if one does not exist, do not force committing of the + * created state into NVMEM. + * + * @return pointer to static state if successful, NULL otherwise + */ +struct u2f_state *u2f_get_state_no_commit(void); + +/** * Try to load U2F keys or create if failed. * * @param state - buffer for state to load/create @@ -198,7 +210,8 @@ struct u2f_state *u2f_get_state(void); * * @return true if state is properly initialized and will persist in flash. */ -bool u2f_load_or_create_state(struct u2f_state *state, bool force_create); +bool u2f_load_or_create_state(struct u2f_state *state, bool force_create, + bool commit); /*** * Generates and persists to nvram a new key that will be used to |