summaryrefslogtreecommitdiff
path: root/tests/pkcs11/pkcs11-get-raw-issuer-exts.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pkcs11/pkcs11-get-raw-issuer-exts.c')
-rw-r--r--tests/pkcs11/pkcs11-get-raw-issuer-exts.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/tests/pkcs11/pkcs11-get-raw-issuer-exts.c b/tests/pkcs11/pkcs11-get-raw-issuer-exts.c
index f0e36e733b..adf5c6e93c 100644
--- a/tests/pkcs11/pkcs11-get-raw-issuer-exts.c
+++ b/tests/pkcs11/pkcs11-get-raw-issuer-exts.c
@@ -20,7 +20,7 @@
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+#include <config.h>
#endif
#include <stdio.h>
@@ -40,12 +40,12 @@
*/
#ifdef _WIN32
-# define P11LIB "libpkcs11mock1.dll"
+#define P11LIB "libpkcs11mock1.dll"
#else
-# define P11LIB "libpkcs11mock1.so"
+#define P11LIB "libpkcs11mock1.so"
#endif
-static time_t mytime(time_t * t)
+static time_t mytime(time_t *t)
{
time_t then = 1424466893;
@@ -95,17 +95,16 @@ void doit(void)
assert(gnutls_x509_crt_init(&ocrt) >= 0);
/* check high level certificate functions */
- ret =
- gnutls_x509_crt_import_url(crt, "pkcs11:type=cert;object=cert1", 0);
+ ret = gnutls_x509_crt_import_url(crt, "pkcs11:type=cert;object=cert1",
+ 0);
if (ret < 0) {
fail("%d: %s\n", ret, gnutls_strerror(ret));
exit(1);
}
- ret =
- gnutls_pkcs11_get_raw_issuer("pkcs11:", crt, &issuer,
- GNUTLS_X509_FMT_DER,
- GNUTLS_PKCS11_OBJ_FLAG_OVERWRITE_TRUSTMOD_EXT);
+ ret = gnutls_pkcs11_get_raw_issuer(
+ "pkcs11:", crt, &issuer, GNUTLS_X509_FMT_DER,
+ GNUTLS_PKCS11_OBJ_FLAG_OVERWRITE_TRUSTMOD_EXT);
if (ret < 0) {
fail("%d: %s\n", ret, gnutls_strerror(ret));
exit(1);
@@ -139,9 +138,8 @@ void doit(void)
exit(1);
}
- if (keyusage !=
- (GNUTLS_KEY_KEY_ENCIPHERMENT | GNUTLS_KEY_ENCIPHER_ONLY |
- GNUTLS_KEY_KEY_CERT_SIGN)) {
+ if (keyusage != (GNUTLS_KEY_KEY_ENCIPHERMENT |
+ GNUTLS_KEY_ENCIPHER_ONLY | GNUTLS_KEY_KEY_CERT_SIGN)) {
fail("Extension does not have the expected key usage!\n");
}