summaryrefslogtreecommitdiff
path: root/tests/pkcs11/pkcs11-mechanisms.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pkcs11/pkcs11-mechanisms.c')
-rw-r--r--tests/pkcs11/pkcs11-mechanisms.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/pkcs11/pkcs11-mechanisms.c b/tests/pkcs11/pkcs11-mechanisms.c
index e3ac80fdcb..464abfc831 100644
--- a/tests/pkcs11/pkcs11-mechanisms.c
+++ b/tests/pkcs11/pkcs11-mechanisms.c
@@ -20,7 +20,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+# include <config.h>
#endif
#include <stdio.h>
@@ -41,13 +41,12 @@
#if defined(HAVE___REGISTER_ATFORK)
-#ifdef _WIN32
-# define P11LIB "libpkcs11mock1.dll"
-#else
-# include <dlfcn.h>
-# define P11LIB "libpkcs11mock1.so"
-#endif
-
+# ifdef _WIN32
+# define P11LIB "libpkcs11mock1.dll"
+# else
+# include <dlfcn.h>
+# define P11LIB "libpkcs11mock1.so"
+# endif
static void tls_log_func(int level, const char *str)
{
@@ -87,12 +86,14 @@ void doit(void)
exit(1);
}
- for (i=0;;i++) {
+ for (i = 0;; i++) {
ret = gnutls_pkcs11_token_get_mechanism("pkcs11:", i, &mech);
if (ret == GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE)
break;
success("mech: %lu\n", mech);
- ret = gnutls_pkcs11_token_check_mechanism("pkcs11:", mech, NULL, 0, 0);
+ ret =
+ gnutls_pkcs11_token_check_mechanism("pkcs11:", mech, NULL,
+ 0, 0);
if (ret == 0) {
fail("mechanism %ld was reported are supported, but is not found!\n", mech);
}