New test.
[mono.git] / man / certmgr.1
1 .\" 
2 .\" certmgr manual page.
3 .\" Copyright 2004-2005 Novell
4 .\" Author:
5 .\"   Sebastien Pouliot <sebastien@ximian.com>
6 .\"
7 .TH Mono "certmgr"
8 .SH NAME
9 certmgr \- Mono Certificate Manager (CLI version)
10 .SH SYNOPSIS
11 .PP
12 .B certmgr [action] [object type] [options] store [filename]
13 or
14 .B certmgr -ssl [options] url
15 .SH DESCRIPTION
16 This tool allow to list, add, remove or extract certificates, certificate 
17 revocation lists (CRL) or certificate trust lists (CTL) to/from a 
18 certificate store. Certificate stores are used to build and validate 
19 certificate chains for Authenticode(r) code signing validation and SSL 
20 server certificates.
21 .SH ACTIONS
22 .TP
23 .I "-list"
24 List the certificates, CTL or CTL in the specified store.
25 .TP
26 .I "-add"
27 Add a certificate, CRL or CTL to specified store.
28 .TP
29 .I "-del"
30 Remove a certificate, CRL or CTL from specified store. You must specify the 
31 object to be removed with it's hash value (and not a filename). This hash 
32 value is shown when doing a 
33 .B -list
34 on the store.
35 .TP
36 .I "-put"
37 Copy a certificate, CRL or CTL from a store to a file.
38 .TP
39 .I "-ssl"
40 Download and add the certificates from a SSL session. You'll be asked to 
41 confirm the addition of every certificate received from the server. Note 
42 that SSL/TLS protocols do not requires a server to send the root certificate.
43 This action assume an certificate (-c) object type and will import the 
44 certificates in appropriate stores (i.e. server certificate in the 
45 OtherPeople store, the root certificate in the Trust store, any other 
46 intermediate certificates in the IntermediateCA store).
47
48 .SH OBJECT TYPES
49 .TP
50 .I "-c", "-cert", "-certificate"
51 Add, Delete or Put certificates. That is the specified file must/will contains
52 X.509 certificates in DER binary encoding.
53 .TP
54 .I "-crl"
55 Add, Delete or Put certificate revocation lists (CRL). That is the specified 
56 file must/will contains X.509 CRL in DER binary encoding.
57 .TP
58 .I "-ctl"
59 Add, Delete or Put certificate trust lists (CRL). UNSUPPORTED.
60
61 .SH OPTIONS
62 .TP
63 .I "-m"
64 Use the machine's certificate stores (instead of the default user's stores).
65 .TP
66 .I "-v"
67 More details displayed on the console.
68 .TP
69 .I "-help", "-h", "-?", "/?"
70 Display help about this tool.
71
72 .SH FILES
73 .B WARNING: This details the current behavior of Mono and could change between releases.
74 The only safe way to interact with certificate stores is to use the certmgr
75 tool. The current releases of Mono keeps all the user certificate stores in 
76 separates directories under
77 .I ~/.config/.mono/certs/
78 .TP
79 For example the trusted root certificates for a user would be kept under
80 .I ~/.config/.mono/certs/Trust/
81 .TP
82 Certificates files are kept in DER (binary) format (extension .cer).
83 .TP
84 The filenames either starts with
85 .I tbp 
86 (thumbprint) or
87 .I ski
88 (subject key identifier).
89 .TP
90 The rest of the filename is the base64-encoded value (tbp or ski).
91
92 .SH EXAMPLES
93 .TP
94 .B mono certmgr.exe -list -c -m Trust
95 List all certificates in the machine Trust store. This will display the hash
96 value for each certificate. This value can be used to identify uniquely a 
97 certificate for some operations (e.g. delete). E.g.
98 .B Unique Hash:   FFA3AC0084DA1673B5A031EBB2156B3E8FBBF6D8
99 .TP
100 .B mono certmgr.exe -del -c -m Trust FFA3AC0084DA1673B5A031EBB2156B3E8FBBF6D8
101 Remove the certificate, represented by the hash value, from the machine Trust
102 store. Note that the machine store is normally restricted. The following
103 error message will appear if the current user doesn't have the minimum access
104 rights to remove the certificate: 
105 .B Access to the machine 'Trust' certificate store has been denied.
106 .TP
107 .B certmgr -ssl https://www.verisign.com
108 Import certificates from www.verisign.com used for HTTP over SSL. See KNOWN 
109 ISSUES (MD2) if you're downloading from www.verisign.com.
110 .TP
111 .B certmgr -ssl ldaps://www.nldap.com:636
112 Import the certificates from www.nldap.com used for secure LDAP. This works
113 even if we don't know how to speak LDAP because we stop the communication
114 shortly after the SSL handshake (which gives us the certificate).
115
116 .SH KNOWN ISSUES
117 .TP
118 .B MD2
119 Some Certificate Authorities (CA) old root certificates use the MD2 hash
120 algorithm. MD2 is old enough not to be part of the standard .NET framework. 
121 This makes it impossible to validate a digital signature made with MD2. For
122 this reason MD2 is included in the Mono.Security.dll assembly. However the
123 machine.config file must be updated so the OID for MD2 is known at runtime.
124
125 To correct this insert the following XML snippet inside the <configuration>
126 element of your machine.config file.
127   <mscorlib>
128     <cryptographySettings>
129       <cryptoNameMapping>
130         <cryptoClasses>
131           <cryptoClass monoMD2="Mono.Security.Cryptography.MD2Managed, Mono.Security, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
132         </cryptoClasses>
133         <nameEntry name="MD2" class="monoMD2" />
134       </cryptoNameMapping>
135       <oidMap>
136         <oidEntry OID="1.2.840.113549.2.2" name="MD2" />
137       </oidMap>
138     </cryptographySettings>
139   </mscorlib>
140
141 .SH AUTHOR
142 Written by Sebastien Pouliot
143 .SH COPYRIGHT
144 Copyright (C) 2004-2005 Novell.
145 .SH MAILING LISTS
146 Visit http://lists.ximian.com/mailman/listinfo/mono-list for details.
147 .SH WEB SITE
148 Visit http://www.mono-project.com for details
149 .SH SEE ALSO
150 .BR makecert(1), setreg(1)