commit
75622d92d2
@ -1,3 +1,7 @@
|
||||
#define VERSION_MAJOR 1
|
||||
#define VERSION_MINOR 8
|
||||
#define VERSION_PATCH 1
|
||||
|
||||
#define VERSION_MAJOR_CHAR "\x01"
|
||||
#define VERSION_MINOR_CHAR "\x08"
|
||||
#define VERSION_PATCH_CHAR "\x01"
|
||||
|
After Width: | Height: | Size: 877 B |
After Width: | Height: | Size: 844 B |
@ -1,16 +1,21 @@
|
||||
#include "fonts.h"
|
||||
|
||||
const uint8_t *const font_data[2][128] = {
|
||||
const uint8_t *const font_data[FONTS][128 - 32] = {
|
||||
{
|
||||
#include "font.inc"
|
||||
},
|
||||
#ifndef FONT_SKIP_FIXED
|
||||
{
|
||||
#include "fontfixed.inc"
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
int fontCharWidth(int font, uint8_t c) { return font_data[font][c & 0x7f][0]; }
|
||||
int fontCharWidth(uint8_t font, uint8_t c) {
|
||||
return (c < 0x20 || c >= 0x80) ? 0 : font_data[font % FONTS][c - 32][0];
|
||||
}
|
||||
|
||||
const uint8_t *fontCharData(int font, uint8_t c) {
|
||||
return font_data[font][c & 0x7f] + 1;
|
||||
const uint8_t *fontCharData(uint8_t font, uint8_t c) {
|
||||
return (c < 0x20 || c >= 0x80) ? (const uint8_t *)""
|
||||
: font_data[font % FONTS][c - 32] + 1;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 9.3 KiB |
@ -0,0 +1,5 @@
|
||||
assert_param
|
||||
cred
|
||||
cred_param
|
||||
hmac_assert
|
||||
pubkey
|
@ -0,0 +1,22 @@
|
||||
DEVICE=$(fido2-token -L | cut -d : -f 1)
|
||||
|
||||
if [ -z "$DEVICE" ] ; then
|
||||
echo "No FIDO2 token found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# taken from fido2-cred manpage
|
||||
|
||||
echo credential challenge | openssl sha256 -binary | base64 > cred_param
|
||||
echo relying party >> cred_param
|
||||
echo user name >> cred_param
|
||||
dd if=/dev/urandom bs=1 count=32 | base64 >> cred_param
|
||||
fido2-cred -M -i cred_param "$DEVICE" | fido2-cred -V -o cred
|
||||
|
||||
# taken from fido2-assert manpage
|
||||
|
||||
echo assertion challenge | openssl sha256 -binary | base64 > assert_param
|
||||
echo relying party >> assert_param
|
||||
head -1 cred >> assert_param
|
||||
tail -n +2 cred > pubkey
|
||||
fido2-assert -G -i assert_param "$DEVICE" | fido2-assert -V pubkey es256
|
@ -0,0 +1,25 @@
|
||||
DEVICE=$(fido2-token -L | cut -d : -f 1)
|
||||
|
||||
if [ -z "$DEVICE" ] ; then
|
||||
echo "No FIDO2 token found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# taken from https://github.com/Yubico/libfido2/issues/58
|
||||
|
||||
echo credential challenge | openssl sha256 -binary | base64 > cred_param
|
||||
echo relying party >> cred_param
|
||||
echo user name >> cred_param
|
||||
dd if=/dev/urandom bs=1 count=32 | base64 >> cred_param
|
||||
fido2-cred -M -h -i cred_param "$DEVICE" | fido2-cred -V -h -o cred
|
||||
|
||||
# taken from https://github.com/Yubico/libfido2/issues/58
|
||||
|
||||
echo assertion challenge | openssl sha256 -binary | base64 > assert_param
|
||||
echo relying party >> assert_param
|
||||
head -1 cred >> assert_param
|
||||
tail -n +2 cred > pubkey
|
||||
dd if=/dev/urandom bs=1 count=64 | base64 -w0 >> assert_param # hmac salt
|
||||
fido2-assert -G -h -i assert_param "$DEVICE" > hmac_assert
|
||||
fido2-assert -V -h -i hmac_assert pubkey es256
|
||||
tail -1 hmac_assert | base64 -d | xxd # hmac secret
|
Loading…
Reference in new issue