u2f-token icon indicating copy to clipboard operation
u2f-token copied to clipboard

Unable to intialize device with injected key

Open legioner0 opened this issue 4 years ago • 0 comments

I've tried to use u2f with injected key:

make TARGET=ST_DONGLE
./inject_key.py --key key.der
openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg

on step "Initialize device" I've got:

python3 certtool init
Trying to initialize device HIDDevice:
    /dev/hidraw4 | 16d0:e90 | unknown | U2F-token (STM32) | 1.00
    release_number: 256
    usage_page: 14898
    usage: 11825
    interface_number: 0
APDU Error: 6986

After some investigation I found that the problem with attestation certificate - empty-attestation-cert.c conflicts with injected key. Workaround: rm -f cert/certificates.c && make TARGET=... CUSTOM_ATTESTATION_CERT=1

legioner0 avatar Mar 30 '20 18:03 legioner0