| #!/bin/bash |
| set -x |
| |
| P11TOOL="p11tool --provider ${srcdir}/../.libs/openssl-pkcs11-export.so" |
| |
| ${P11TOOL} --list-mechanisms 'pkcs11:manufacturer=openssl-pkcs11-export;token=key-nopass'|awk '{print $2}' > tmp.txt |
| for mech in CKM_RSA_PKCS \ |
| CKM_RSA_X_509 \ |
| CKM_RSA_PKCS_PSS \ |
| CKM_RSA_PKCS_OAEP; do |
| grep -q $mech tmp.txt || exit 1; |
| done |
| |
| GNUTLS_PIN=Passw0rd |
| export GNUTLS_PIN |
| for f in "" "--sign-params=RSA-PSS"; do |
| ${P11TOOL} --test-sign ${f} 'pkcs11:manufacturer=openssl-pkcs11-export;token=key-pass;object=key-pass' || exit 1 |
| done |