aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichel Jaouen <michel.jaouen@st.com>2020-03-27 15:23:54 +0100
committerMáté Tóth-Pál <Mate.Toth-Pal@arm.com>2020-08-14 07:20:12 +0000
commit964fc32f296bfe069a51514002e289cbfa412a29 (patch)
tree4fe1f5e336eb758ab2b07e0024be488c3848da9e /tools
parent616680d49582b9090c0b60d7403e055363b6587c (diff)
downloadtrusted-firmware-m-964fc32f296bfe069a51514002e289cbfa412a29.tar.gz
Tools: iatverifier display bytes field in hexa format
The field bytes are more understandable in hex format Change-Id: I27c421ebe8b534af562a60faf41dead172c6e2d8 Signed-off-by: Michel Jaouen <michel.jaouen@st.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/iat-verifier/iatverifier/util.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/iat-verifier/iatverifier/util.py b/tools/iat-verifier/iatverifier/util.py
index ffda7accb..148582e93 100644
--- a/tools/iat-verifier/iatverifier/util.py
+++ b/tools/iat-verifier/iatverifier/util.py
@@ -10,6 +10,7 @@ from copy import deepcopy
import cbor
import yaml
+import base64
from ecdsa import SigningKey, VerifyingKey
from pycose.sign1message import Sign1Message
from pycose.mac0message import Mac0Message
@@ -138,7 +139,7 @@ def recursive_bytes_to_strings(d, in_place=False):
result = [recursive_bytes_to_strings(r, in_place=True)
for r in result]
elif isinstance(result, bytes):
- result = str(result)[2:-1]
+ result = str(base64.b16encode(result))
return result