psktool(1)

psktool1

Gnutls psk tool

Usage

psktool [-flags] [-flag [value]] [--option-name [[{= | }] value]]

Overview

Program that generates random keys for use with TLS-PSK. The keys are stored in hexadecimal format in a key file.

Options

-d num, --debug=num

Enable debugging. This option takes an integer number as its argument. The value of num is constrained to being:

in the range 0 through 9999

Specifies the debug level.

-s num, --keysize=num

Specify the key size in bytes (default is 32-bytes or 256-bits). This option takes an integer number as its argument. The value of num is constrained to being:

in the range 0 through 512
-u str, --username=str

Specify the username to use.

-p str, --pskfile=str

Specify a pre-shared key file.

This option will specify the pre-shared key file to store the generated keys.

--passwd

This is an alias for the --pskfile option.

NOTE: THIS OPTION IS DEPRECATED

-v arg, --version=arg

Output version of program and exit. The default mode is `v', a simple version. The `c' mode will print copyright information and `n' will print the full copyright notice.

-h, --help

Display usage information and exit.

-!, --more-help

Pass the extended usage information through a pager.

Examples

To add a user 'psk_identity' in keys.psk for use with GnuTLS run:

$ ./psktool -u psk_identity -p keys.psk
Generating a random key for user 'psk_identity'
Key stored to keys.psk
$ cat keys.psk
psk_identity:88f3824b3e5659f52d00e959bacab954b6540344
$

This command will create keys.psk if it does not exist and will add user 'psk_identity'.

Exit status

One of the following exit values will be returned:

0 (EXIT_SUCCESS)

Successful program execution.

1 (EXIT_FAILURE)

The operation failed or the command syntax was not valid.

Releases

11 releases since Debian 4.0 (Etch); the text changed 7 times.

  1. 4.0–7
  2. 8
  3. 9
  4. 10
  5. 11
  6. 12
  7. 13
  8. Arch

-! since Debian 8 (Jessie); --debug since Debian 8 (Jessie); --more-help since Debian 8 (Jessie); --pskfile since Debian 10 (Buster); --version since Debian 8 (Jessie); -d since Debian 8 (Jessie); -s since Debian 8 (Jessie); -v since Debian 8 (Jessie).

Authors

Bugs

Please send bug reports to: [email protected]

From gnutls 3.8.13-3 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.