[Bug] Wrong if-then-else logic when issuing "secure enable" #199
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello,
I have a fresh install of pico-fido2 (master branch), set a fido pin 123456 and I try to issue "python3 pico-fido-tool.py -p 123456 secure enable". this command results in CTAP2_ERR_INVALID_SUBCOMMAND. I think the logic in cbor_config.c is wrong. If no emulation is configured then the "else" in line 245 relates to the "if" in 216. But I assume it is intended to relate to the "if" in line 153. As the command CTAP_CONFIG_AUT_ENABLE works the "if" in line 216 is false so the code jumps to line "else" in 245. The logic works as intended, though, if ENABLE_EMULATION is defined.
I hope I made no mistake in looking through the code and reporting this bug.