Corrected signed-to-unsigned comparisons
[gnutls.git] / doc / invoke-psktool.texi
blob41dd9d00c5dece74b0f0e6a83fbbc578bfb60d31
1 @node psktool Invocation
2 @subsection Invoking psktool
3 @pindex psktool
4 @cindex GnuTLS PSK tool
5 @ignore
6 #  -*- buffer-read-only: t -*- vi: set ro:
7
8 # DO NOT EDIT THIS FILE   (invoke-psktool.texi)
9
10 # It has been AutoGen-ed  May  9, 2012 at 08:06:14 PM by AutoGen 5.16
11 # From the definitions    ../src/psk-args.def
12 # and the template file   agtexi-cmd.tpl
13 @end ignore
16 Program  that generates random keys for use with TLS-PSK. The
17 keys are stored in hexadecimal format in a key file.
19 This section was generated by @strong{AutoGen},
20 using the @code{agtexi-cmd} template and the option descriptions for the @code{psktool} program.
21 This software is released under the GNU General Public License, version 3 or later.
24 @anchor{psktool usage}
25 @subsubheading psktool help/usage (-h)
26 @cindex psktool help
28 This is the automatically generated usage text for psktool.
29 The text printed is the same whether for the @code{help} option (-h) or the @code{more-help} option (-!).  @code{more-help} will print
30 the usage text by passing it through a pager program.
31 @code{more-help} is disabled on platforms without a working
32 @code{fork(2)} function.  The @code{PAGER} environment variable is
33 used to select the program, defaulting to @file{more}.  Both will exit
34 with a status code of 0.
36 @exampleindent 0
37 @example
38 psktool - GnuTLS PSK tool - Ver. @@VERSION@@
39 USAGE:  psktool [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
41    -d, --debug=num            Enable debugging.
42                                 - It must be in the range:
43                                   0 to 9999
44    -s, --keysize=num          specify the key size in bytes
45                                 - It must be in the range:
46                                   0 to 512
47    -u, --username=str         specify a username
48    -p, --passwd=str           specify a password file.
49    -v, --version[=arg]        Output version information and exit
50    -h, --help                 Display extended usage information and exit
51    -!, --more-help            Extended usage information passed thru pager
53 Options are specified by doubled hyphens and their name or by a single
54 hyphen and the flag character.
58 Program that generates random keys for use with TLS-PSK.  The keys are
59 stored in hexadecimal format in a key file.
61 please send bug reports to:  bug-gnutls@@gnu.org
62 @end example
63 @exampleindent 4
65 @anchor{psktool debug}
66 @subsubheading debug option (-d)
67 @cindex psktool-debug
69 This is the ``enable debugging.'' option.
70 This option takes an argument number.
71 Specifies the debug level.
72 @anchor{psktool exit status}
73 @subsubheading psktool exit status
75 One of the following exit values will be returned:
76 @table @samp
77 @item 0 (EXIT_SUCCESS)
78 Successful program execution.
79 @item 1 (EXIT_FAILURE)
80 The operation failed or the command syntax was not valid.
81 @end table
82 @anchor{psktool See Also}
83 @subsubheading psktool See Also
84     gnutls-cli-debug (1), gnutls-serv (1), srptool (1), certtool (1)
86 @anchor{psktool Examples}
87 @subsubheading psktool Examples
88 To add a user 'psk_identity' in @file{passwd.psk} for use with GnuTLS run:
89 @example
90 $ ./psktool -u psk_identity -p passwd.psk
91 Generating a random key for user 'psk_identity'
92 Key stored to passwd.psk
93 $ cat psks.txt
94 psk_identity:88f3824b3e5659f52d00e959bacab954b6540344
96 @end example
98 This command will create @file{passwd.psk} if it does not exist
99 and will add user 'psk_identity' (you will also be prompted for a password).