aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/py11-test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/py11-test.py b/scripts/py11-test.py
index cf633a3..2ac74b7 100644
--- a/scripts/py11-test.py
+++ b/scripts/py11-test.py
@@ -95,7 +95,7 @@ print()
print("Generating some random data")
session = p11.C_OpenSession(slot)
random = p11.C_GenerateRandom(session, 33)
-print(len(random), hexlify(random))
+print(len(random), hexlify(random).decode("ascii"))
print()
print("Logging in")
@@ -137,7 +137,7 @@ print()
print("Testing P-256 signature")
p11.C_SignInit(session, CKM_ECDSA_SHA256, ec_p256_keypair[1])
sig_p256 = p11.C_Sign(session, hamster)
-print("Signature:", hexlify(sig_p256.encode))
+print("Signature:", hexlify(sig_p256).decode("ascii"))
print()
print("Testing P256 verification")