summaryrefslogtreecommitdiff
path: root/src/certtool.gaa
blob: 45202a4ee74dabda98874b624d82175603ad29e9 (plain)
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#{

/* C declarations */

#include <config.h>
#ifdef _WIN32
# include <io.h>
#endif

void certtool_version(void);

#}

helpnode "Certtool help\nUsage: certtool [options]"

#int action;
option (s, generate-self-signed) { $action=0; } "Generate a self-signed certificate."

option (c, generate-certificate) { $action=4; } "Generate a signed certificate."

option (generate-proxy) { $action=17; } "Generate a proxy certificate."

option (generate-crl) { $action=13; } "Generate a CRL."

option (u, update-certificate) { $action=7; } "Update a signed certificate."

option (p, generate-privkey) { $action=1; } "Generate a private key."

option (q, generate-request) { $action=3; } "Generate a PKCS #10 certificate request."

option (e, verify-chain) { $action=5; } "Verify a PEM encoded certificate chain. The last certificate in the chain must be a self signed one."

option (verify-crl) { $action=14; } "Verify a CRL."

option (generate-dh-params) { $action=10; } "Generate PKCS #3 encoded Diffie Hellman parameters."
option (get-dh-params) { $action=16; } "Get the included PKCS #3 encoded Diffie Hellman parameters."

#char *privkey;
option (load-privkey) STR "FILE" { $privkey = $1 } "Private key file to use."

#char *request;
option (load-request) STR "FILE" { $request = $1 } "Certificate request file to use."

#char *cert;
option (load-certificate) STR "FILE" { $cert = $1 } "Certificate file to use."

#char *ca_privkey;
option (load-ca-privkey) STR "FILE" { $ca_privkey = $1 } "Certificate authority's private key file to use."

#char *ca;
option (load-ca-certificate) STR "FILE" { $ca = $1 } "Certificate authority's certificate file to use."

#char *pass;
option (password) STR "PASSWORD" { $pass = $1 } "Password to use."

option (i, certificate-info) { $action = 2; } "Print information on a certificate."

option (pgp-certificate-info) { $action = 19; } "Print information on a OpenPGP certificate."

option (pgp-ring-info) { $action = 21; } "Print information on a keyring structure."

option (l, crl-info) { $action = 11; } "Print information on a CRL."

option (p12-info) { $action = 9; } "Print information on a PKCS #12 structure."

option (p7-info) { $action = 12; } "Print information on a PKCS #7 structure."

option (smime-to-p7) { $action = 15; } "Convert S/MIME to PKCS #7 structure."

option (k, key-info) { $action = 6; } "Print information on a private key."

option (pgp-key-info) { $action = 20; } "Print information on a OpenPGP private key."

#int fix_key;
option (fix-key) { $fix_key = 1; } "Regenerate the parameters in a private key."

#int v1_cert;
option (v1) { $v1_cert = 1; } "Generate an X.509 version 1 certificate (no extensions)."

option (to-p12) { $action = 8; } "Generate a PKCS #12 structure."

option (to-p8) { $action = 18; } "Generate a PKCS #8 key structure."

#int pkcs8;
option (8, pkcs8) { $pkcs8=1 } "Use PKCS #8 format for private keys."

#int dsa;
option (dsa) { $dsa=1 } "Use DSA keys."

#char *hash;
option (hash) STR "STR" { $hash = $1 } "Hash algorithm to use for signing (MD5,SHA1,RMD160,SHA256,SHA384,SHA512)."

#int export;
option (export-ciphers) { $export=1 } "Use weak encryption algorithms."

#int incert_format;
option (inder) { $incert_format=1 } "Use DER format for input certificates and private keys."

#int outcert_format;
option (outder) { $outcert_format=1 } "Use DER format for output certificates and private keys."

#int bits;
option (bits) INT "BITS" { $bits = $1 } "specify the number of bits for key generation."

#int quick_random;
option (disable-quick-random) { $quick_random = 0; } "Use /dev/random for key generationg, thus increasing the quality of randomness used."

#char *outfile;
option (outfile) STR "FILE" { $outfile = $1 } "Output file."

#char *infile;
option (infile) STR "FILE" { $infile = $1 } "Input file."

#char *template;
option (template) STR "FILE" { $template = $1 } "Template file to use for non interactive operation."


#int debug;
option (d, debug) INT "LEVEL" { $debug = $1 } "specify the debug level. Default is 1."

option (h, help) { gaa_help(); exit(0); } "shows this help text"

option (v, version) { certtool_version(); exit(0); } "shows the program's version"

init { $bits = 2048; $pkcs8 = 0; $privkey = NULL; $ca=NULL; $ca_privkey = NULL; 
	$debug=1; $request = NULL; $infile = NULL; $outfile = NULL; $cert = NULL; 
	$incert_format = 0; $outcert_format = 0; $action=-1; $pass = NULL; $v1_cert = 0;
	$export = 0; $template = NULL; $hash=NULL; $fix_key = 0; $quick_random=1; }