summaryrefslogtreecommitdiff
path: root/src/psktool-args.def
diff options
context:
space:
mode:
authorKevin Cernekee <cernekee@gmail.com>2014-03-06 22:35:08 -0800
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2014-03-07 08:13:32 +0100
commit0725ad38511343a91e506b53cd931f630bd259a8 (patch)
tree23ab923f8e70a34545f5ca3c585097fac7ba403e /src/psktool-args.def
parentfdd10532c0b81f54c5c09d52aa7867cf490e9f0a (diff)
downloadgnutls-0725ad38511343a91e506b53cd931f630bd259a8.tar.gz
Rename psk-args.def to psktool-args.def
Other utilities generate invoke-%.texi from %-args.def, but currently invoke-psktool.texi is generated from psk-args.def. If we make psktool conform to the same convention as the other utilities, we can use a generic pattern to handle all of them the same way. Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Diffstat (limited to 'src/psktool-args.def')
-rw-r--r--src/psktool-args.def63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/psktool-args.def b/src/psktool-args.def
new file mode 100644
index 0000000000..819acdb327
--- /dev/null
+++ b/src/psktool-args.def
@@ -0,0 +1,63 @@
+AutoGen Definitions options;
+prog-name = psktool;
+prog-title = "GnuTLS PSK tool";
+prog-desc = "Program to create PSK parameters.\n";
+detail = "Program that generates random keys for use with TLS-PSK. The
+keys are stored in hexadecimal format in a key file.";
+short-usage = "psktool [options]\npsktool --help for usage instructions.\n";
+explain = "";
+
+#include args-std.def
+
+flag = {
+ name = keysize;
+ value = s;
+ arg-type = number;
+ arg-range = "0 -> 512";
+ descrip = "specify the key size in bytes";
+ doc = "";
+};
+
+flag = {
+ name = username;
+ value = u;
+ arg-type = string;
+ descrip = "specify a username";
+ doc = "";
+};
+
+flag = {
+ name = passwd;
+ value = p;
+ arg-type = string;
+ descrip = "specify a password file";
+ doc = "";
+};
+
+doc-section = {
+ ds-type = 'SEE ALSO';
+ ds-format = 'texi';
+ ds-text = <<-_EOT_
+ gnutls-cli-debug (1), gnutls-serv (1), srptool (1), certtool (1)
+_EOT_;
+};
+
+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:
+@example
+$ ./psktool -u psk_identity -p passwd.psk
+Generating a random key for user 'psk_identity'
+Key stored to passwd.psk
+$ cat psks.txt
+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).
+_EOT_;
+};
+