diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-10-15 21:08:04 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-10-17 15:02:42 +0300 |
commit | de91921561092689369b56c54950474e0a86e66f (patch) | |
tree | a9949058021d911db1106b1a2e4d9e0e9281de16 /openssl/agent/pkcs11/url.test.testscript | |
parent | fb65c93daaf369157bd712f2c4c20161c4840b94 (diff) |
Add implementation
Diffstat (limited to 'openssl/agent/pkcs11/url.test.testscript')
-rw-r--r-- | openssl/agent/pkcs11/url.test.testscript | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/openssl/agent/pkcs11/url.test.testscript b/openssl/agent/pkcs11/url.test.testscript new file mode 100644 index 0000000..807fad9 --- /dev/null +++ b/openssl/agent/pkcs11/url.test.testscript @@ -0,0 +1,34 @@ +# file : openssl/agent/pkcs11/url.test.testscript -*- C++ -*- +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +: valid +: +$* <<EOF >>EOF +pkcs11:token=unused;object=SIGN%20key +pkcs11:token=unused;object=SIGN%20key?pin-value=123123 +pkcs11: +pkcs11:?pin=123123 +pkcs11:library-version=1.2 +pkcs11:?module-path=/usr/lib +pkcs11:id=%01%00%38%02;token=unused +pkcs11:?a=b +EOF + +: invalid +: +{ + $* <'file:/abc' 2>'invalid scheme' != 0 : invalid-scheme + $* <'pkcs11:/abc' 2>'one-level path expected' != 0 : root + $* <'pkcs11:a/bc' 2>'one-level path expected' != 0 : multi-level + $* <'pkcs11://a/abc' 2>'unexpected authority' != 0 : authority + $* <'pkcs11:abc#x' 2>'unexpected fragment' != 0 : fragment + + $* <'pkcs11:slot-id=a' 2>"invalid slot-id attribute value 'a'"!= 0 : slot-id + + $* <'pkcs11:a=b' 2>"unknown attribute 'a'" != 0 : unknown-ident + + : lib-min-ver + : + $* <'pkcs11:library-version=1.a' 2>"invalid library minor version 'a'" != 0 +} |