xtest: pkcs11: fix unused errors
Fix unused parameter and unused variable errors with building
pkcs11_1000.c with OPENSSL disabled, i.e. WITH_OPENSSL = n or undefined.
host/xtest/pkcs11_1000.c:7425:49: error: unused parameter 'c' [-Werror,
-Wunused-parameter]
static void xtest_pkcs11_test_1024(ADBG_Case_t *c)
^
host/xtest/pkcs11_1000.c:7409:19: error: unused variable
'x509_example_root_ca' [-Werror,-Wunused-const-variable]
static const char x509_example_root_ca[] =
^
Signed-off-by: Victor Chong <victor.chong@linaro.org>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
diff --git a/host/xtest/pkcs11_1000.c b/host/xtest/pkcs11_1000.c
index e6188e3..3065b59 100644
--- a/host/xtest/pkcs11_1000.c
+++ b/host/xtest/pkcs11_1000.c
@@ -7406,6 +7406,7 @@
ADBG_CASE_DEFINE(pkcs11, 1023, xtest_pkcs11_test_1023,
"PKCS11: RSA OAEP key generation and crypto operations");
+#ifdef OPENSSL_FOUND
static const char x509_example_root_ca[] =
"-----BEGIN CERTIFICATE-----\n"
"MIICDTCCAZOgAwIBAgIBATAKBggqhkjOPQQDAzA+MQswCQYDVQQGEwJGSTEVMBMG\n"
@@ -7421,10 +7422,12 @@
"APjyNm4f///vWUN3XFd+BRhS2YHR43c0K4oNVyLqigoMoSqu0zXt9Xm+Lsu5iqgJ\n"
"NQ==\n"
"-----END CERTIFICATE-----\n";
+#endif
static void xtest_pkcs11_test_1024(ADBG_Case_t *c)
{
#ifndef OPENSSL_FOUND
+ (void)c;
Do_ADBG_Log("OpenSSL not available, skipping X.509 Certificate tests");
#else
CK_RV rv = CKR_GENERAL_ERROR;