some cleanup/fixes

pull/33/head
Conor 2016-06-15 22:14:42 -04:00
rodzic 8182c28ca3
commit 6d6c0d2d1d
3 zmienionych plików z 20 dodań i 13 usunięć

Wyświetl plik

@ -15,6 +15,9 @@ pub=$2
cert=$3
hex2pubkey $pub pubkey.pem
[[ "$?" -ne "0" ]] && exit 1
signcert $key pubkey.pem $cert
[[ "$?" -ne "0" ]] && exit 1
cbytes.py $cert
[[ "$?" -ne "0" ]] && exit 1

Wyświetl plik

@ -1,6 +1,6 @@
#!/bin/bash
SETUP_HEX=../firmware/release/SETUP.hex
SETUP_HEX=../firmware/SETUP.hex
FINAL_HEX=../firmware/release/u2f-firmware.hex
if [[ $# != "1" ]]
@ -13,19 +13,24 @@ fi
export PATH=$PATH:gencert:u2f_zero_client:flashing
# setup atecc
echo "erasing..."
erase.sh
if [[ "$(python -c 'import os,sys; sys.stdout.write(os.name)')" == "nt" ]]
then
while [[ "$?" -ne "0" ]] ; do
sleep .1
# setup atecc
echo "erasing..."
erase.sh
done
echo "programming setup..."
program.sh $SETUP_HEX
while [[ "$?" -ne "0" ]] ; do
sleep .1
erase.sh
done
[[ "$?" -ne "0" ]] && exit 1
echo "programming setup..."
program.sh $SETUP_HEX
[[ "$?" -ne "0" ]] && exit 1
fi
echo "configuring..."
client.py configure pubkey.hex >/dev/null
@ -41,6 +46,7 @@ gencert.sh "$1" "$(cat pubkey.hex)" attest.der > ../firmware/src/cert.c
[[ "$?" -ne "0" ]] && exit 1
echo "done."
echo "building..."
if [[ "$(python -c 'import os,sys; sys.stdout.write(os.name)')" != "nt" ]]

Wyświetl plik

@ -18,9 +18,7 @@ except:
sys.exit(1)
cmd_prefix = [0xff,0xff,0xff,0xff]
if os.name == 'ns':
cmd_prefix.insert(0,0)
cmd_prefix = [0, 0xff,0xff,0xff,0xff]
class commands:
U2F_CONFIG_GET_SERIAL_NUM = 0x80