File: psktool-args.def

package info (click to toggle)
gnutls28 3.6.7-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 67,368 kB
  • sloc: ansic: 295,691; asm: 70,637; sh: 15,067; makefile: 6,288; yacc: 1,840; lisp: 1,371; cpp: 1,358; perl: 1,030; sed: 16
file content (70 lines) | stat: -rw-r--r-- 1,735 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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 (default is 32-bytes or 256-bits)";
    doc = "";
};

flag = {
    name      = username;
    value     = u;
    arg-type  = string;
    descrip   = "Specify the username to use";
    doc = "";
};

flag = {
    name      = pskfile;
    value     = p;
    arg-type  = string;
    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 = {
  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{keys.psk} for use with GnuTLS run:
@example
$ ./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
$
@end example

This command will create @file{keys.psk} if it does not exist
and will add user 'psk_identity'.
_EOT_;
};