Add this for backwards compatibility
[mono.git] / man / sn.1
1 .\" 
2 .\" sn manual page.
3 .\" Copyright 2003 Motus Technologies
4 .\" Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
5 .\" Author:
6 .\"   Sebastien Pouliot <sebastien@ximian.com>
7 .\"
8 .TH Mono "sn"
9 .SH NAME
10 sn \- Digitally sign/verify/compare strongname on CLR assemblies.
11 .SH SYNOPSIS
12 .PP
13 .B sn [-q | -quiet] [options] [parameters]
14 .SH DESCRIPTION
15 Digitally sign, verify or compare, CLR assemblies using strongnames. 
16 .SH CONFIGURATION OPTIONS
17 Configuration options are stored in the machine.config configuration file
18 under /configuration/strongNames.
19 .TP
20 .I "-c provider"
21 Change the default CSP (Crypto Service Provider). Currently not supported
22 in Mono.
23 .TP
24 .I "-m [y|n]"
25 Use a machine [y] key container or a user [n] key container. Currently not
26 supported in Mono.
27 .TP
28 .I "-Vl"
29 List the verification options. The list is kept under /configuration/
30 strongNames/verificationSettings in machine.config.
31 .TP
32 .I "-Vr assembly [userlist]"
33 Exempt the specified assembly from verification for the specified user list.
34 Currently not supported by sn, you must edit machine.config manually if you
35 require this.
36 .TP
37 .I "-Vu assembly"
38 Remove the exemption entry for the specified assembly. Currently not 
39 supported by sn, you must edit machine.config manually if you require this.
40 .TP
41 .I "-Vx"
42 Remove all exemptions entries. Currently not supported by sn, you must edit 
43 machine.config manually if you require this.
44 .SH CSP RELATED OPTIONS
45 .TP
46 .I "-d container"
47 Delete the keypair present in the specified key container.
48 .TP
49 .I "-i keypair.snk container"
50 Import the specified strongname file into the specified container.
51 .TP
52 .I "-pc container publickey"
53 Export the public key from the specified CSP container to the specified file.
54 .SH CONVERTION OPTIONS
55 .TP
56 .I "-e assembly output.pub"
57 Export the assembly public key to the specified output file.
58 .TP
59 .I "-p keypair.snk output.pub"
60 Export the public key from the specified strongname key file (SNK) to the 
61 specified output file.
62 .TP
63 .I "-o input output.txt"
64 Convert the input file to a CSV file (using decimal).
65 .TP
66 .I "-oh input output.txt"
67 Convert the input file to a CSV file (using hexadecimal).
68 .SH STRONGNAME SIGNING OPTIONS
69 .TP
70 .I "-D assembly1 assembly2"
71 Compare if assembly1 and assembly are the same exception for their signature.
72 This is done by comparing the hash of the metadata of both assembly.
73 .TP
74 .I "-k [size] keypair.snk"
75 Create a new strongname keypair in the specified file. The default key 
76 length is 1024 bits and MUST ALWAYS be used when signing 1.x assemblies. 
77 Any value from 384 to 16384 bits (in increments of 8 bits) is a valid key 
78 length to sign 2.x assemblies. To ensure maximum compatibility you may 
79 want to continue using 1024 bits keys. Note that there's no good reason, 
80 even if it's possible, to use length lesser than 1024 bits.
81 .TP
82 .I "-R assembly keypair.snk"
83 Resign the specified assembly using the specified strongname keypair file 
84 (SNK). You can only sign an assembly with the private key (SNK) that match 
85 the public key inside the assembly (unless it's public key token has been
86 remapped in machine.config).
87 .TP
88 .I "-Rc assembly container"
89 Resign the specified assembly using the specified strongname container.
90 .TP
91 .I "-t file"
92 Show the public key from the specified file.
93 .TP
94 .I "-tp file"
95 Show the public key and the public key token from the specified file.
96 .TP
97 .I "-T assembly"
98 Show the public key from the specified assembly.
99 .TP
100 .I "-Tp assembly"
101 Show the public key and the public key token from the specified assembly.
102 .TP
103 .I "-v assembly"
104 Verify the specified assembly signature.
105 .TP
106 .I "-vf assembly"
107 Verify the specified assembly signature (even if disabled).
108 .SH HELP OPTIONS
109 .TP
110 .I "-h", "-?"
111 Display basic help about this tool.
112 .TP
113 .I "-h config", "-? config"
114 Display configuration related help about this tool.
115 .TP
116 .I "-h csp", "-? csp"
117 Display Cryptographic Service Provider related help about this tool.
118 .TP
119 .I "-h convert", "-? convert"
120 Display convertion related help about this tool.
121 .TP
122 .I "-h sn", "-? sn"
123 Display strongname related help about this tool.
124 .SH CONFIGURATION FILE
125 .TP
126 Strongnames configuration is kept in "machine.config" file. Currently two 
127 features can be configured.
128 .TP
129 .I "/configuration/strongNames/pubTokenMapping"
130 This mechanism let Mono remap a public key token, like the ECMA token, to
131 another public key for verification. This is useful in two scenarios. First 
132 assemblies signed with the "ECMA key" needs to be verified by the "runtime"
133 key (as the ECMA key isn't a public key). Second, many assemblies are signed
134 with private keys that Mono can't use (e.g. System.Security.dll assembly).
135 A new key cannot be used because it should change thr strongname (a new key 
136 pair would have a new public key which would produce a new token). Public 
137 key token remapping is the solution for both problems. Each token must be
138 configured in a "map" entry similar to this one: <map Token="b77a5c561934e089" 
139 PublicKey="00..." />
140 .TP
141 .I "/configuration/strongNames/verificationSettings"
142 It is often useful during development to use delay signed assemblies. 
143 Normally* the runtime wouldn't allow delay-signed assemblies to be loaded.
144 This feature allows some delay-signed assemblies (based on their public key
145 token, optionally assembly name and user name) to be used like they were 
146 fully signed assemblies. [*] Note that Mono 1.0 "runtime" doesn't validate 
147 strongname signatures so this option shouldn't be required in most scenarios.
148 .SH AUTHOR
149 Written by Sebastien Pouliot
150 .SH COPYRIGHT
151 Copyright (C) 2003 Motus Technologies. 
152 Copyright (C) 2004 Novell. 
153 Released under BSD license.
154 .SH MAILING LISTS
155 Visit http://lists.ximian.com/mailman/listinfo/mono-list for details.
156 .SH WEB SITE
157 Visit http://www.mono-project.com for details
158 .SH SEE ALSO
159 .BR secutil(1)