Skip to content

Commit

Permalink
Address documentation comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ollrogge committed Sep 8, 2021
1 parent d3cd0e9 commit 0c29dcf
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
3 changes: 3 additions & 0 deletions sys/fido2/ctap/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ endchoice
config FIDO2_CTAP_FLASH_START_PAGE
int "First flash page to store data in"
default -1
help
Configuring this incorrectly can lead to firmware corruption so make sure
the flash page is located after the firmware.

rsource "transport/Kconfig"

Expand Down
2 changes: 2 additions & 0 deletions sys/fido2/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
/**
* @defgroup fido2 FIDO2 - Fast Identity Online 2
* @ingroup sys
* @brief Description of the FIDO2 CTAP implementation in RIOT
* @author Nils Ollrogge <nils.ollrogge@fu-berlin.de>
*
* @warning This feature is experimental!
* This API is experimental and in an early state - expect changes.
Expand Down
4 changes: 4 additions & 0 deletions sys/include/fido2/ctap/ctap_mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ extern "C" {

/**
* @brief First flash page to store data in
*
* @note This can corrupt firmware if CTAP_FLASH_START_PAGE is set to a
* flash page containing firmware. Therefore make sure that CTAP_FLASH_START_PAGE
* is located after the firmware.
*/
#if defined(CONFIG_FIDO2_CTAP_FLASH_START_PAGE) && \
(CONFIG_FIDO2_CTAP_FLASH_START_PAGE >= 0)
Expand Down
14 changes: 8 additions & 6 deletions tests/sys_fido2_ctap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ Unit testing is based on the `fido2_tests` package.
There are two test targets (fido2-test, fido2-test-up). The former requires no user
interaction the latter does.

Note:
* The tests require python 3.6+.
* The tests require [swig](http://www.swig.org/) to be installed on your host computer.
* Running the tests for the first time will setup a virtual python environment (venv) and install python dependencies of the tests. To check the dependencies please refer to the `requirements.txt` of the [fido2-tests repository](https://github.com/solokeys/fido2-tests).
* The unit tests will require you to reboot the authenticator multiple times. Be patient before continuing as it takes a few seconds for the connection between OS and authenticator to be re-established.
* If you keep getting errors while trying to run the tests try changing to another git branch and back e.g. `git checkout branch1 && git checkout -` in order to remove build artifacts. Then re-flash the device with `make flash term` and try to run the tests again with `make fido2-test` or `make fido2-test-up`.

fido2-test

1. To make benchmarking faster disable user presence tests by enabling the CFLAG
Expand All @@ -43,9 +50,4 @@ fido2-test-up
1. Make sure that the CFLAG `CONFIG_FIDO2_CTAP_DISABLE_UP` is disabled as this test target
requires user interaction.
2. Flash the device with `make flash`.
3. Run the unit tests by running `make fido2-test-up` and follow the instructions about when to show user presence (by pressing button 1).

Note:
* The tests require python 3.6+.
* Running the tests for the first time will setup a virtual python environment (venv) and install python dependencies of the tests. To check the dependencies please refer to the `requirements.txt` of the [fido2-tests repository](https://github.com/solokeys/fido2-tests).
* The unit tests will require you to reboot the authenticator multiple times. Be patient before continuing as it takes a few seconds for the connection between OS and authenticator to be re-established.
3. Run the unit tests by running `make fido2-test-up` and follow the instructions. E.g. when `.ACTIVATE UP ONCE` is displayed, press the configured UP button (default button 1) once.

0 comments on commit 0c29dcf

Please sign in to comment.