diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-06-05 09:39:49 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2017-06-05 13:04:55 +0000 |
commit | 17c6848ad68266a50f53f3ecb572a2c30774ddfe (patch) | |
tree | 4404a213c2f867350a527b51f56337a95fa20df9 /src | |
parent | 4feb42dc7a709272d6c198a21cbdeee7ebe27293 (diff) | |
download | gnutls-17c6848ad68266a50f53f3ecb572a2c30774ddfe.tar.gz |
psktool: do not assume any default key file
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/psk.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -59,7 +59,6 @@ int main(int argc, char **argv) static int write_key(const char *username, const char *key, int key_size, const char *passwd_file); -#define KPASSWD "/etc/passwd.psk" #define MAX_KEY_SIZE 64 int main(int argc, char **argv) { @@ -85,9 +84,10 @@ int main(int argc, char **argv) argc -= optct; argv += optct; - if (!HAVE_OPT(PSKFILE)) - passwd = (char *) KPASSWD; - else + if (!HAVE_OPT(PSKFILE)) { + fprintf(stderr, "You need to specify a PSK key file\n"); + exit(1); + } else passwd = OPT_ARG(PSKFILE); if (!HAVE_OPT(USERNAME)) { |