diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-10-13 17:01:16 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-10-13 17:01:16 +0200 |
commit | 7daed1fd0602bce7495d252f1a9b638fc41e38d3 (patch) | |
tree | 4b6cc58d4eae17f5592e06a6b04026c962bb2704 | |
parent | 2668735c3a0cafd73778d9339acc4e4a53d5b23d (diff) | |
download | gnutls-7daed1fd0602bce7495d252f1a9b638fc41e38d3.tar.gz |
certtool: improve text on missing options for cert generation
-rw-r--r-- | src/certtool.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/certtool.c b/src/certtool.c index 64801b97ea..9459e11430 100644 --- a/src/certtool.c +++ b/src/certtool.c @@ -273,7 +273,11 @@ generate_certificate(gnutls_privkey_t * ret_key, key = load_private_key(0, cinfo); - pubkey = load_public_key_or_import(1, key, cinfo); + pubkey = load_public_key_or_import(0, key, cinfo); + if (pubkey == NULL && key == NULL) { + fprintf(stderr, "missing --load-privkey\n"); + exit(1); + } if (!batch) fprintf(stderr, |