diff options
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 +} |