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