summaryrefslogtreecommitdiff
path: root/tests/pkcs11/pkcs11-privkey-export.c
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2023-04-24 12:39:42 +0900
committerDaiki Ueno <ueno@gnu.org>2023-04-24 12:45:46 +0900
commitaa5950abab56b011331ad4331409b6ff8efb8aeb (patch)
treead363fb38e8b65c942876641cda9c76caa13b498 /tests/pkcs11/pkcs11-privkey-export.c
parent0fe9cb6842d63761718046cc7dd7eb437e6c5163 (diff)
downloadgnutls-aa5950abab56b011331ad4331409b6ff8efb8aeb.tar.gz
build: re-indent code
Signed-off-by: Daiki Ueno <ueno@gnu.org>
Diffstat (limited to 'tests/pkcs11/pkcs11-privkey-export.c')
-rw-r--r--tests/pkcs11/pkcs11-privkey-export.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/tests/pkcs11/pkcs11-privkey-export.c b/tests/pkcs11/pkcs11-privkey-export.c
index 7d7f6e88c3..4ae6e1ba05 100644
--- a/tests/pkcs11/pkcs11-privkey-export.c
+++ b/tests/pkcs11/pkcs11-privkey-export.c
@@ -20,7 +20,7 @@
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+#include <config.h>
#endif
#include <stdio.h>
@@ -39,10 +39,10 @@
#define PIN "1234"
#ifdef _WIN32
-# define P11LIB "libpkcs11mock1.dll"
+#define P11LIB "libpkcs11mock1.dll"
#else
-# include <dlfcn.h>
-# define P11LIB "libpkcs11mock1.so"
+#include <dlfcn.h>
+#define P11LIB "libpkcs11mock1.so"
#endif
static void tls_log_func(int level, const char *str)
@@ -50,9 +50,9 @@ static void tls_log_func(int level, const char *str)
fprintf(stderr, "|<%d>| %s", level, str);
}
-static
-int pin_func(void *userdata, int attempt, const char *url, const char *label,
- unsigned flags, char *pin, size_t pin_max)
+static int pin_func(void *userdata, int attempt, const char *url,
+ const char *label, unsigned flags, char *pin,
+ size_t pin_max)
{
if (attempt == 0) {
strcpy(pin, PIN);
@@ -103,9 +103,8 @@ void doit(void)
gnutls_privkey_set_pin_function(key, pin_func, NULL);
- ret =
- gnutls_privkey_import_url(key, "pkcs11:object=test",
- GNUTLS_PKCS11_OBJ_FLAG_LOGIN);
+ ret = gnutls_privkey_import_url(key, "pkcs11:object=test",
+ GNUTLS_PKCS11_OBJ_FLAG_LOGIN);
if (ret < 0) {
fail("%d: %s\n", ret, gnutls_strerror(ret));
exit(1);
@@ -130,8 +129,8 @@ void doit(void)
ret = gnutls_pubkey_init(&pub);
assert(ret >= 0);
- ret =
- gnutls_pubkey_import_url(pub, "pkcs11:object=test;type=public", 0);
+ ret = gnutls_pubkey_import_url(pub, "pkcs11:object=test;type=public",
+ 0);
if (ret < 0) {
fail("%d: %s\n", ret, gnutls_strerror(ret));
exit(1);