summaryrefslogtreecommitdiff
path: root/tests/pkcs11/pkcs11-cert-import-url-exts.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pkcs11/pkcs11-cert-import-url-exts.c')
-rw-r--r--tests/pkcs11/pkcs11-cert-import-url-exts.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/tests/pkcs11/pkcs11-cert-import-url-exts.c b/tests/pkcs11/pkcs11-cert-import-url-exts.c
index 4e9e628028..d5f3a3b18c 100644
--- a/tests/pkcs11/pkcs11-cert-import-url-exts.c
+++ b/tests/pkcs11/pkcs11-cert-import-url-exts.c
@@ -20,7 +20,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+# include <config.h>
#endif
#include <stdio.h>
@@ -88,17 +88,20 @@ void doit(void)
exit(1);
}
- assert(gnutls_x509_crt_init(&crt)>=0);
- assert(gnutls_x509_crt_init(&ocrt)>=0);
+ assert(gnutls_x509_crt_init(&crt) >= 0);
+ 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_x509_crt_import_url(ocrt, "pkcs11:type=cert;object=cert1", GNUTLS_PKCS11_OBJ_FLAG_OVERWRITE_TRUSTMOD_EXT);
+ ret =
+ gnutls_x509_crt_import_url(ocrt, "pkcs11:type=cert;object=cert1",
+ GNUTLS_PKCS11_OBJ_FLAG_OVERWRITE_TRUSTMOD_EXT);
if (ret < 0) {
fail("%d: %s\n", ret, gnutls_strerror(ret));
exit(1);
@@ -106,7 +109,7 @@ void doit(void)
ret = gnutls_x509_crt_equals(crt, ocrt);
if (ret != 0) {
- fail("exported certificates are equal!\n");
+ fail("exported certificates are equal!\n");
}
ret = gnutls_x509_crt_get_ca_status(ocrt, NULL);
@@ -126,7 +129,9 @@ 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");
}