aboutsummaryrefslogtreecommitdiff
path: root/unit_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'unit_tests.py')
-rw-r--r--unit_tests.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/unit_tests.py b/unit_tests.py
index 27d938a..3c359fb 100644
--- a/unit_tests.py
+++ b/unit_tests.py
@@ -22,6 +22,9 @@ def parse_arguments(argv = ()):
parser.add_argument("--quiet", action = "store_true", help = "suppress chatter")
parser.add_argument("--so-pin", default = "fnord", help = "security officer PIN")
parser.add_argument("--user-pin", default = "fnord", help = "user PIN")
+ parser.add_argument("--wheel-pin", default = "fnord", help = "wheel PIN")
+ parser.add_argument("--initial-pin", help = "initial PIN",
+ default = "YouReallyNeedToChangeThisPINRightNowWeAreNotKidding")
parser.add_argument("--slot", default = 0, type = int, help = "slot number")
parser.add_argument("--libpkcs11", default = "./libpkcs11.so", help = "PKCS #11 library")
parser.add_argument("--p11util", default = "./p11util", help = "p11util binary")
@@ -66,8 +69,8 @@ def setUpModule():
if not args.quiet:
print "Setting PINs"
- Popen((args.p11util, "-sup"), stdin = PIPE).communicate(
- "{args.so_pin}\n{args.user_pin}\n".format(args = args))
+ Popen((args.p11util, "-wsup"), stdin = PIPE).communicate("".join(pin + "\n" for pin in (
+ args.initial_pin, args.wheel_pin, args.so_pin, args.user_pin)))
if not args.quiet:
print "Loading PKCS #11 library", args.libpkcs11