Tizen 2.0 Release
[external/libgnutls26.git] / src / cli.gaa
1 #{
2
3 /* C declarations */
4
5 #include <config.h>
6 #include <common.h>
7
8 void cli_version(void);
9
10 #}
11
12 helpnode "GnuTLS test client\nUsage:  gnutls-cli [options] hostname\n\n"
13
14 #int debug;
15 option (d, debug) INT "integer" { $debug = $1 } "Enable debugging" 
16
17 #int resume;
18 option (r, resume) { $resume = 1 } "Connect, establish a session. Connect again and resume this session."
19
20 #int rehandshake;
21 option (e, rehandshake) { $rehandshake = 1 } "Connect, establish a session and rehandshake immediately."
22
23 #int noticket;
24 option (noticket) { $noticket = 1 } "Doen't accept session tickets."
25
26 #int starttls;
27 option (s, starttls) { $starttls = 1 } "Connect, establish a plain session and start TLS when EOF or a SIGALRM is received."
28
29 #int crlf;
30 option (crlf) { $crlf = 1 } "Send CR LF instead of LF."
31
32 #int fmtder;
33 option (x509fmtder) { $fmtder = 1 } "Use DER format for certificates to read from."
34
35 #int fingerprint;
36 option (f, fingerprint) { $fingerprint = 1 } "Send the openpgp fingerprint, instead of the key."
37
38 #int disable_extensions;
39 option ( disable-extensions) { $disable_extensions = 1 } "Disable all the TLS extensions."
40
41 #int print_cert;
42 option (print-cert) { $print_cert = 1 } "Print the certificate in PEM format."
43
44 #int record_size;
45 option (recordsize) INT "integer" { $record_size = $1 } "The maximum record size to advertize."
46
47 #int verbose;
48 option (V, verbose) { $verbose = 1 } "More verbose output."
49
50 #char *priorities;
51 option (priority) STR "PRIORITY STRING" { $priorities = $1 } "Priorities string."
52
53 #char *x509_cafile;
54 option (x509cafile) STR "FILE" { $x509_cafile = $1 } "Certificate file or PKCS #11 URL to use."
55
56 #char *x509_crlfile;
57 option (x509crlfile) STR "FILE" { $x509_crlfile = $1 } "CRL file to use."
58
59 #char *pgp_keyfile;
60 option (pgpkeyfile) STR "FILE" { $pgp_keyfile = $1 } "PGP Key file to use."
61
62 #char *pgp_keyring;
63 option (pgpkeyring) STR "FILE" { $pgp_keyring = $1 } "PGP Key ring file to use."
64
65 #char *pgp_certfile;
66 option (pgpcertfile) STR "FILE" { $pgp_certfile = $1 } "PGP Public Key (certificate) file to use."
67
68 #char *pgp_subkey;
69 option (pgpsubkey) STR "HEX|auto" { $pgp_subkey = $1 } "PGP subkey to use."
70
71 #char *x509_keyfile;
72 option (x509keyfile) STR "FILE" { $x509_keyfile = $1 } "X.509 key file or PKCS #11 URL to use."
73
74 #char *x509_certfile;
75 option (x509certfile) STR "FILE" { $x509_certfile = $1 } "X.509 Certificate file or PKCS #11 URL to use."
76
77 #char *srp_username;
78 option (srpusername) STR "NAME" { $srp_username = $1 } "SRP username to use."
79
80 #char *srp_passwd;
81 option (srppasswd) STR "PASSWD" { $srp_passwd = $1 } "SRP password to use."
82
83 #char *psk_username;
84 option (pskusername) STR "NAME" { $psk_username = $1 } "PSK username to use."
85
86 #char *psk_key;
87 option (pskkey) STR "KEY" { $psk_key = $1 } "PSK key (in hex) to use."
88
89 #char *opaque_prf_input;
90 option (opaque-prf-input) STR "DATA" { $opaque_prf_input = $1 } "Use Opaque PRF Input DATA."
91
92 #char *port;
93 option (p, port) STR "PORT" { $port = $1 } "The port to connect to."
94
95 #int insecure;
96 option (insecure) { $insecure = 1 } "Don't abort program if server certificate can't be validated."
97
98 option (l, list) { print_list($verbose); exit(0); } "Print a list of the supported algorithms and modes."
99 option (h, help) { gaa_help(); exit(0); } "prints this help"
100
101 option (v, version) { cli_version(); exit(0); } "prints the program's version number"
102
103 #char *rest_args;
104 rest STR "hostname" { $rest_args = $1; }
105
106 init { $resume=0; $noticket=0; $port="443"; $rest_args=NULL; 
107         $record_size=0; 
108         $fingerprint=0; $pgp_keyring=NULL; $x509_crlfile = NULL;
109         $x509_cafile = NULL; $pgp_keyfile=NULL; $pgp_certfile=NULL; $disable_extensions = 0;
110         $x509_keyfile=NULL; $x509_certfile=NULL; $crlf = 0; 
111         $srp_username=NULL; $srp_passwd=NULL; $fmtder = 0; $starttls =0; 
112         $debug = 0; $print_cert = 0; $verbose = 0; $psk_key = NULL; 
113         $psk_username = NULL; $priorities = NULL;
114         $opaque_prf_input = NULL; $pgp_subkey = NULL; $rehandshake = 0; }