diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-10-14 13:13:26 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-10-14 13:18:57 +0200 |
commit | bd21292d235883e316a8f9fa1b58384576bf3a65 (patch) | |
tree | 1d4d2689dbf4e4773dc347a41df3f7db079dd938 /src | |
parent | 8200043c9d8a47d69143e041e8e954339d06205d (diff) | |
download | gnutls-bd21292d235883e316a8f9fa1b58384576bf3a65.tar.gz |
certtool: improve text on missing options for cert generation
Diffstat (limited to 'src')
-rw-r--r-- | src/certtool-common.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/certtool-common.c b/src/certtool-common.c index 609ed1595c..230bb85adc 100644 --- a/src/certtool-common.c +++ b/src/certtool-common.c @@ -632,7 +632,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; |