]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
clarify documentation and arguments for psktool
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Wed, 31 May 2017 16:58:58 +0000 (12:58 -0400)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 5 Jun 2017 13:04:55 +0000 (13:04 +0000)
 * psktool's -p argument should really be short for --pskfile, not
   --passwd.  there is no passwd involved.

 * the example documentation switches names halfway through, which is
   confusing.

 * there is no prompt for a password.  do not mention it in the
   example.

src/psk.c
src/psktool-args.def

index e55803d7c8203806c3ccc9431e3d00c61a53e75b..52c90edb290cdf8d5f1e30f4425712f3eef51415 100644 (file)
--- a/src/psk.c
+++ b/src/psk.c
@@ -85,10 +85,10 @@ int main(int argc, char **argv)
        argc -= optct;
        argv += optct;
 
-       if (!HAVE_OPT(PASSWD))
+       if (!HAVE_OPT(PSKFILE))
                passwd = (char *) KPASSWD;
        else
-               passwd = OPT_ARG(PASSWD);
+               passwd = OPT_ARG(PSKFILE);
 
        if (!HAVE_OPT(USERNAME)) {
 #ifndef _WIN32
index 819acdb327a255cc7c90aa527526e8a9eb9bb3e5..176318b26b6d9e40fa78875b57b67f0d52ba63e6 100644 (file)
@@ -27,11 +27,18 @@ flag = {
 };
 
 flag = {
-    name      = passwd;
+    name      = pskfile;
     value     = p;
     arg-type  = string;
-    descrip   = "specify a password file";
-    doc       = "";
+    descrip   = "Specify a pre-shared key file";
+    doc       = "This option will specify the pre-shared key file to store the generated keys.";
+};
+
+flag = {
+    name      = passwd;
+    aliases   = pskfile;
+    descrip   = "Specify a pre-shared key file";
+    deprecated;
 };
 
 doc-section = {
@@ -46,18 +53,18 @@ doc-section = {
   ds-type = 'EXAMPLES';
   ds-format = 'texi';
   ds-text   = <<-_EOT_
-To add a user 'psk_identity' in @file{passwd.psk} for use with GnuTLS run:
+To add a user 'psk_identity' in @file{keys.psk} for use with GnuTLS run:
 @example
-$ ./psktool -u psk_identity -p passwd.psk
+$ ./psktool -u psk_identity -p keys.psk
 Generating a random key for user 'psk_identity'
-Key stored to passwd.psk
-$ cat psks.txt
+Key stored to keys.psk
+$ cat keys.psk
 psk_identity:88f3824b3e5659f52d00e959bacab954b6540344
 $
 @end example
 
-This command will create @file{passwd.psk} if it does not exist
-and will add user 'psk_identity' (you will also be prompted for a password). 
+This command will create @file{keys.psk} if it does not exist
+and will add user 'psk_identity'.
 _EOT_;
 };