This commit is contained in:
iceman1001 2021-06-29 22:23:39 +02:00
commit d6e55a2f40

View file

@ -1,4 +1,4 @@
//----------------------------------------------------------------------------- // //-----------------------------------------------------------------------------
// Copyright (C) 2018 Merlok // Copyright (C) 2018 Merlok
// //
// This code is licensed to you under the terms of the GNU GPL, version 2 or, // This code is licensed to you under the terms of the GNU GPL, version 2 or,
@ -227,10 +227,11 @@ static void asn1_tag_dump_integer(const struct tlv *tlv, const struct asn1_tag *
for (size_t i = 0; i < tlv->len; i++) { for (size_t i = 0; i < tlv->len; i++) {
val = (val << 8) + tlv->value[i]; val = (val << 8) + tlv->value[i];
} }
PrintAndLogEx(NORMAL, " value4b: %d", val); PrintAndLogEx(NORMAL, " value: %d (0x%08X)", val, val);
return; return;
} }
PrintAndLogEx(NORMAL, " value: %lu", asn1_value_integer(tlv, 0, tlv->len * 2)); uint32_t val = asn1_value_integer(tlv, 0, tlv->len * 2);
PrintAndLogEx(NORMAL, " value: %lu (0x%X)", val, val);
} }
static char *asn1_oid_description(const char *oid, bool with_group_desc) { static char *asn1_oid_description(const char *oid, bool with_group_desc) {
@ -326,7 +327,7 @@ bool asn1_tag_dump(const struct tlv *tlv, int level, bool *candump) {
*/ */
PrintAndLogEx(INFO, PrintAndLogEx(INFO,
"%*s-- %2x [%02zx] '"_YELLOW_("%s") "'" NOLF "%*s-- %02X [%02X] '"_YELLOW_("%s") "'" NOLF
, (level * 4) , (level * 4)
, " " , " "
, tlv->tag , tlv->tag