summaryrefslogtreecommitdiff
path: root/src/certtool-common.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2016-10-14 13:13:26 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2016-10-14 13:20:26 +0200
commit2347c783c99121ac48c165d57b0ec97ee4c24900 (patch)
tree72c631b21c1782aaf3b32df54d79427cd52391eb /src/certtool-common.c
parent6abd406ba492fbd37a2450fa2de3ac0c5d824297 (diff)
downloadgnutls-2347c783c99121ac48c165d57b0ec97ee4c24900.tar.gz
certtool: improve text on missing options for cert generation
Diffstat (limited to 'src/certtool-common.c')
-rw-r--r--src/certtool-common.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/certtool-common.c b/src/certtool-common.c
index 99e43e5557..afbcefcb9a 100644
--- a/src/certtool-common.c
+++ b/src/certtool-common.c
@@ -679,7 +679,11 @@ gnutls_pubkey_t load_public_key_or_import(int mand,
if (!privkey || (ret = gnutls_pubkey_import_privkey(pubkey, privkey, 0, 0)) < 0) { /* could not get (e.g. on PKCS #11 */
gnutls_pubkey_deinit(pubkey);
- return load_pubkey(mand, info);
+ pubkey = load_pubkey(0, info);
+ if (pubkey == NULL && mand) {
+ fprintf(stderr, "You must specify --load-privkey\n");
+ exit(1);
+ }
}
return pubkey;