diff --git a/lib/ykpiv.c b/lib/ykpiv.c index b46234e..ea927db 100644 --- a/lib/ykpiv.c +++ b/lib/ykpiv.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -465,7 +466,7 @@ ykpiv_rc ykpiv_hex_decode(const char *hex_in, size_t in_len, } *out_len = in_len / 2; for(i = 0; i < in_len; i++) { - char *ind_ptr = strchr(hex_translate, *hex_in++); + char *ind_ptr = strchr(hex_translate, tolower(*hex_in++)); int index = 0; if(ind_ptr) { index = ind_ptr - hex_translate;