The test now works.
[gnutls.git] / src / cli.gaa
bloba343ca8da6140f8bec2292392307a0808b2e20fa
1 #{
3 /* C declarations */
5 #include <common.h>
7 void print_license(void);
8 void cli_version(void);
12 helpnode "GNU TLS test client\nUsage:  gnutls-cli [options] hostname\n\n"
14 #int debug;
15 option (d, debug) INT "integer" { $debug = $1 } "Enable debugging" 
17 #int resume;
18 option (r, resume) { $resume = 1 } "Connect, establish a session. Connect again and resume this session."
20 #int starttls;
21 option (s, starttls) { $starttls = 1 } "Connect, establish a plain session and start TLS when EOF or a SIGALRM is received."
23 #int crlf;
24 option (crlf) { $crlf = 1 } "Send CR LF instead of LF."
26 #int fmtder;
27 option (x509fmtder) { $fmtder = 1 } "Use DER format for certificates to read from."
29 #int fingerprint;
30 option (f, fingerprint) { $fingerprint = 1 } "Send the openpgp fingerprint, instead of the key."
32 #int disable_extensions;
33 option ( disable-extensions) { $disable_extensions = 1 } "Disable all the TLS extensions."
35 #int print_cert;
36 option (print-cert) { $print_cert = 1 } "Print the certificate in PEM format."
38 #int record_size;
39 option (recordsize) INT "integer" { $record_size = $1 } "The maximum record size to advertize."
41 #int verbose;
42 option (V, verbose) { $verbose = 1 } "More verbose output."
44 #int nciphers;
45 #char **ciphers;
46 option (ciphers) *STR "cipher1 cipher2..." { $ciphers = $1; $nciphers = @1 } "Ciphers to enable."
48 #int nproto;
49 #char **proto;
50 option (protocols) *STR "protocol1 protocol2..." { $proto = $1; $nproto = @1 } "Protocols to enable."
52 #int ncomp;
53 #char **comp;
54 option (comp) *STR "comp1 comp2..." { $comp = $1; $ncomp = @1 } "Compression methods to enable."
56 #int nmacs;
57 #char **macs;
58 option (macs) *STR "mac1 mac2..." { $macs = $1; $nmacs = @1 } "MACs to enable."
60 #int nkx;
61 #char **kx;
62 option (kx) *STR "kx1 kx2..." { $kx = $1; $nkx = @1 } "Key exchange methods to enable."
64 #int nctype;
65 #char **ctype;
66 option (ctypes) *STR "certType1 certType2..." { $ctype = $1; $nctype = @1 } "Certificate types to enable."
68 #char *priorities;
69 option (priority) STR "PRIORITY STRING" { $priorities = $1 } "Priorities string."
71 #char *x509_cafile;
72 option (x509cafile) STR "FILE" { $x509_cafile = $1 } "Certificate file to use."
74 #char *x509_crlfile;
75 option (x509crlfile) STR "FILE" { $x509_crlfile = $1 } "CRL file to use."
77 #char *pgp_keyfile;
78 option (pgpkeyfile) STR "FILE" { $pgp_keyfile = $1 } "PGP Key file to use."
80 #char *pgp_keyring;
81 option (pgpkeyring) STR "FILE" { $pgp_keyring = $1 } "PGP Key ring file to use."
83 #char *pgp_certfile;
84 option (pgpcertfile) STR "FILE" { $pgp_certfile = $1 } "PGP Public Key (certificate) file to use."
86 #char *pgp_subkey;
87 option (pgpsubkey) STR "HEX|auto" { $pgp_subkey = $1 } "PGP subkey to use."
89 #char *x509_keyfile;
90 option (x509keyfile) STR "FILE" { $x509_keyfile = $1 } "X.509 key file to use."
92 #char *x509_certfile;
93 option (x509certfile) STR "FILE" { $x509_certfile = $1 } "X.509 Certificate file to use."
95 #char *srp_username;
96 option (srpusername) STR "NAME" { $srp_username = $1 } "SRP username to use."
98 #char *srp_passwd;
99 option (srppasswd) STR "PASSWD" { $srp_passwd = $1 } "SRP password to use."
101 #char *psk_username;
102 option (pskusername) STR "NAME" { $psk_username = $1 } "PSK username to use."
104 #char *psk_key;
105 option (pskkey) STR "KEY" { $psk_key = $1 } "PSK key (in hex) to use."
107 #char *opaque_prf_input;
108 option (opaque-prf-input) STR "DATA" { $opaque_prf_input = $1 } "Use Opaque PRF Input DATA."
110 #char *port;
111 option (p, port) STR "PORT" { $port = $1 } "The port to connect to."
113 #int insecure;
114 option (insecure) { $insecure = 1 } "Don't abort program if server certificate can't be validated."
116 option (l, list) { print_list($verbose); exit(0); } "Print a list of the supported algorithms and modes."
117 option (h, help) { gaa_help(); exit(0); } "prints this help"
119 option (v, version) { cli_version(); exit(0); } "prints the program's version number"
120 option ( copyright) { print_license(); exit(0); } "prints the program's license"
122 #char *rest_args;
123 rest STR "hostname" { $rest_args = $1; }
125 init { $resume=0; $port="443"; $rest_args=NULL; $ciphers=NULL;
126         $kx=NULL; $comp=NULL; $macs=NULL; $ctype=NULL; $nciphers=0;
127         $nkx=0; $ncomp=0; $nmacs=0; $nctype = 0; $record_size=0; 
128         $fingerprint=0; $pgp_keyring=NULL; $x509_crlfile = NULL;
129         $x509_cafile = NULL; $pgp_keyfile=NULL; $pgp_certfile=NULL; $disable_extensions = 0;
130         $x509_keyfile=NULL; $x509_certfile=NULL; $crlf = 0; 
131         $srp_username=NULL; $srp_passwd=NULL; $fmtder = 0; $starttls =0; 
132         $debug = 0; $print_cert = 0; $verbose = 0; $psk_key = NULL; 
133         $psk_username = NULL; $priorities = NULL;
134         $opaque_prf_input = NULL; $pgp_subkey = NULL; }