X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/d03fb293bce1b06d49fb9faf5c492a1e2effc24b..7527c2bdd821ac194ed362f327b5e6b7aef7d1bb:/client/emv/emv_pk.c diff --git a/client/emv/emv_pk.c b/client/emv/emv_pk.c index b577855e..bbaf0294 100644 --- a/client/emv/emv_pk.c +++ b/client/emv/emv_pk.c @@ -44,7 +44,7 @@ static ssize_t emv_pk_read_bin(char *buf, unsigned char *bin, size_t size, size_ { size_t left = size; char *p = buf; - while (*p && *p == ' ') + while (*p && (*p == ' ' || *p == '\t')) p++; while (left > 0) { @@ -71,7 +71,7 @@ static ssize_t emv_pk_read_bin(char *buf, unsigned char *bin, size_t size, size_ return -(p - buf); } - while (*p && *p == ' ') + while (*p && (*p == ' ' || *p == '\t')) p++; p--; @@ -87,7 +87,7 @@ static ssize_t emv_pk_read_ymv(char *buf, unsigned *ymv) *ymv = 0; - while (*p && *p == ' ') + while (*p && (*p == ' ' || *p == '\t')) p++; for (i = 0; i < 3; i++) { @@ -103,7 +103,7 @@ static ssize_t emv_pk_read_ymv(char *buf, unsigned *ymv) temp[i] = (c1 * 16 + c2); } - while (*p && *p == ' ') + while (*p && (*p == ' ' || *p == '\t')) p++; p--; @@ -119,11 +119,11 @@ static ssize_t emv_pk_read_ymv(char *buf, unsigned *ymv) static ssize_t emv_pk_read_string(char *buf, char *str, size_t size) { char *p = buf; - while (*p && *p == ' ') + while (*p && (*p == ' ' || *p == '\t')) p++; while (size > 1) { - if (*p == ' ') + if (*p == ' ' || *p == '\t') break; else if (*p < 0x20 || *p >= 0x7f) return -(p - buf); @@ -135,7 +135,7 @@ static ssize_t emv_pk_read_string(char *buf, char *str, size_t size) *str = 0; - while (*p && *p == ' ') + while (*p && (*p == ' ' || *p == '\t')) p++; p--; @@ -503,7 +503,7 @@ struct emv_pk *emv_pk_get_ca_pk(const unsigned char *rid, unsigned char idx) if (!pk) return NULL; - printf("Verifying CA PK for %02hhx:%02hhx:%02hhx:%02hhx:%02hhx IDX %02hhx %zd bits...", + printf("Verifying CA Public Key for %02hhx:%02hhx:%02hhx:%02hhx:%02hhx IDX %02hhx %zd bits...", pk->rid[0], pk->rid[1], pk->rid[2],