diff --git a/client/emv/tlv.c b/client/emv/tlv.c index 9722c931..17bae3ed 100644 --- a/client/emv/tlv.c +++ b/client/emv/tlv.c @@ -582,3 +582,9 @@ bool tlv_get_int(const struct tlv *etlv, int *value) } return false; } + +bool tlvdb_get_uint8(struct tlvdb *tlvRoot, tlv_tag_t tag, uint8_t *value) +{ + const struct tlv *tlvelm = tlvdb_get(tlvRoot, tag, NULL); + return tlv_get_uint8(tlvelm, value); +} diff --git a/client/emv/tlv.h b/client/emv/tlv.h index 80f6b74f..54900f41 100644 --- a/client/emv/tlv.h +++ b/client/emv/tlv.h @@ -65,7 +65,6 @@ bool tlv_equal(const struct tlv *a, const struct tlv *b); bool tlv_get_uint8(const struct tlv *etlv, uint8_t *value); bool tlv_get_int(const struct tlv *etlv, int *value); -bool tlv_get_uint8(const struct tlv *etlv, uint8_t *value); -bool tlv_get_int(const struct tlv *etlv, int *value); +bool tlvdb_get_uint8(struct tlvdb *tlvRoot, tlv_tag_t tag, uint8_t *value); #endif