summaryrefslogtreecommitdiff
path: root/test/tpm_test/hash_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/tpm_test/hash_test.py')
-rw-r--r--test/tpm_test/hash_test.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/tpm_test/hash_test.py b/test/tpm_test/hash_test.py
index c1cdddbbe5..fd8d0f4184 100644
--- a/test/tpm_test/hash_test.py
+++ b/test/tpm_test/hash_test.py
@@ -10,10 +10,9 @@ from __future__ import print_function
import hashlib
import struct
+import subcmd
import utils
-HASH = 1
-
# Hash command modes
CMD_START = 0
CMD_CONT = 1
@@ -92,7 +91,7 @@ def hash_test(tpm):
cmd += '%c' % handle # Ignored for single shots
cmd += struct.pack('>H', len(text))
cmd += text
- wrapped_response = tpm.command(tpm.wrap_ext_command(HASH, cmd))
+ wrapped_response = tpm.command(tpm.wrap_ext_command(subcmd.HASH, cmd))
if hash_cmd in (CMD_START, CMD_CONT):
if hash_cmd == CMD_START:
contexts[handle] = hash_func()