Update `NEWS'.
[gnutls.git] / src / certtool.gaa
blob828b3253f3934992c79338964e10cecce2fdb97a
1 #{
3 /* C declarations */
5 #include <config.h>
6 #ifdef _WIN32
7 # include <io.h>
8 #endif
10 void certtool_version(void);
14 helpnode "Certtool help\nUsage: certtool [options]"
16 #int action;
17 option (s, generate-self-signed) { $action=0; } "Generate a self-signed certificate."
19 option (c, generate-certificate) { $action=4; } "Generate a signed certificate."
21 option (generate-proxy) { $action=17; } "Generate a proxy certificate."
23 option (generate-crl) { $action=13; } "Generate a CRL."
25 option (u, update-certificate) { $action=7; } "Update a signed certificate."
27 option (p, generate-privkey) { $action=1; } "Generate a private key."
29 option (q, generate-request) { $action=3; } "Generate a PKCS #10 certificate request."
31 option (e, verify-chain) { $action=5; } "Verify a PEM encoded certificate chain. The last certificate in the chain must be a self signed one."
33 option (verify-crl) { $action=14; } "Verify a CRL."
35 option (generate-dh-params) { $action=10; } "Generate PKCS #3 encoded Diffie Hellman parameters."
36 option (get-dh-params) { $action=16; } "Get the included PKCS #3 encoded Diffie Hellman parameters."
38 #char *privkey;
39 option (load-privkey) STR "FILE" { $privkey = $1 } "Private key file to use."
41 #char *request;
42 option (load-request) STR "FILE" { $request = $1 } "Certificate request file to use."
44 #char *cert;
45 option (load-certificate) STR "FILE" { $cert = $1 } "Certificate file to use."
47 #char *ca_privkey;
48 option (load-ca-privkey) STR "FILE" { $ca_privkey = $1 } "Certificate authority's private key file to use."
50 #char *ca;
51 option (load-ca-certificate) STR "FILE" { $ca = $1 } "Certificate authority's certificate file to use."
53 #char *pass;
54 option (password) STR "PASSWORD" { $pass = $1 } "Password to use."
56 option (i, certificate-info) { $action = 2; } "Print information on a certificate."
58 option (l, crl-info) { $action = 11; } "Print information on a CRL."
60 option (p12-info) { $action = 9; } "Print information on a PKCS #12 structure."
62 option (p7-info) { $action = 12; } "Print information on a PKCS #7 structure."
64 option (smime-to-p7) { $action = 15; } "Convert S/MIME to PKCS #7 structure."
66 option (k, key-info) { $action = 6; } "Print information on a private key."
68 #int fix_key;
69 option (fix-key) { $fix_key = 1; } "Regenerate the parameters in a private key."
71 option (to-p12) { $action = 8; } "Generate a PKCS #12 structure."
73 #int pkcs8;
74 option (8, pkcs8) { $pkcs8=1 } "Use PKCS #8 format for private keys."
76 #int dsa;
77 option (dsa) { $dsa=1 } "Use DSA keys."
79 #char *hash;
80 option (hash) STR "STR" { $hash = $1 } "Hash algorithm to use for signing (MD5,SHA1,RMD160,SHA256,SHA384,SHA512)."
82 #int export;
83 option (export-ciphers) { $export=1 } "Use weak encryption algorithms."
85 #int incert_format;
86 option (inder) { $incert_format=1 } "Use DER format for input certificates and private keys."
88 #int outcert_format;
89 option (outder) { $outcert_format=1 } "Use DER format for output certificates and private keys."
91 #int bits;
92 option (bits) INT "BITS" { $bits = $1 } "specify the number of bits for key generation."
94 #int quick_random;
95 option (quick-random) { $quick_random = 1; } "Use /dev/urandom for all operation, reducing the quality of randomness used."
97 #char *outfile;
98 option (outfile) STR "FILE" { $outfile = $1 } "Output file."
100 #char *infile;
101 option (infile) STR "FILE" { $infile = $1 } "Input file."
103 #char *template;
104 option (template) STR "FILE" { $template = $1 } "Template file to use for non interactive operation."
107 #int debug;
108 option (d, debug) INT "LEVEL" { $debug = $1 } "specify the debug level. Default is 1."
110 option (h, help) { gaa_help(); exit(0); } "shows this help text"
112 option (v, version) { certtool_version(); exit(0); } "shows the program's version"
114 init { $bits = 1024; $pkcs8 = 0; $privkey = NULL; $ca=NULL; $ca_privkey = NULL; 
115         $debug=1; $request = NULL; $infile = NULL; $outfile = NULL; $cert = NULL; 
116         $incert_format = 0; $outcert_format = 0; $action=-1; $pass = NULL; 
117         $export = 0; $template = NULL; $hash=NULL; $fix_key = 0; $quick_random=0; }