diff options
Diffstat (limited to 'src/lib')
20 files changed, 17 insertions, 1267 deletions
diff --git a/src/lib/libssl/src/doc/HOWTO/certificates.txt b/src/lib/libssl/src/doc/HOWTO/certificates.txt deleted file mode 100644 index a8a34c7abc..0000000000 --- a/src/lib/libssl/src/doc/HOWTO/certificates.txt +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | <DRAFT!> | ||
2 | HOWTO certificates | ||
3 | |||
4 | 1. Introduction | ||
5 | |||
6 | How you handle certificates depend a great deal on what your role is. | ||
7 | Your role can be one or several of: | ||
8 | |||
9 | - User of some client software | ||
10 | - User of some server software | ||
11 | - Certificate authority | ||
12 | |||
13 | This file is for users who wish to get a certificate of their own. | ||
14 | Certificate authorities should read ca.txt. | ||
15 | |||
16 | In all the cases shown below, the standard configuration file, as | ||
17 | compiled into openssl, will be used. You may find it in /etc/, | ||
18 | /usr/local/ssl/ or somewhere else. The name is openssl.cnf, and | ||
19 | is better described in another HOWTO <config.txt?>. If you want to | ||
20 | use a different configuration file, use the argument '-config {file}' | ||
21 | with the command shown below. | ||
22 | |||
23 | |||
24 | 2. Relationship with keys | ||
25 | |||
26 | Certificates are related to public key cryptography by containing a | ||
27 | public key. To be useful, there must be a corresponding private key | ||
28 | somewhere. With OpenSSL, public keys are easily derived from private | ||
29 | keys, so before you create a certificate or a certificate request, you | ||
30 | need to create a private key. | ||
31 | |||
32 | Private keys are generated with 'openssl genrsa' if you want a RSA | ||
33 | private key, or 'openssl gendsa' if you want a DSA private key. | ||
34 | Further information on how to create private keys can be found in | ||
35 | another HOWTO <keys.txt?>. The rest of this text assumes you have | ||
36 | a private key in the file privkey.pem. | ||
37 | |||
38 | |||
39 | 3. Creating a certificate request | ||
40 | |||
41 | To create a certificate, you need to start with a certificate | ||
42 | request (or, as some certificate authorities like to put | ||
43 | it, "certificate signing request", since that's exactly what they do, | ||
44 | they sign it and give you the result back, thus making it authentic | ||
45 | according to their policies). A certificate request can then be sent | ||
46 | to a certificate authority to get it signed into a certificate, or if | ||
47 | you have your own certificate authority, you may sign it yourself, or | ||
48 | if you need a self-signed certificate (because you just want a test | ||
49 | certificate or because you are setting up your own CA). | ||
50 | |||
51 | The certificate request is created like this: | ||
52 | |||
53 | openssl req -new -key privkey.pem -out cert.csr | ||
54 | |||
55 | Now, cert.csr can be sent to the certificate authority, if they can | ||
56 | handle files in PEM format. If not, use the extra argument '-outform' | ||
57 | followed by the keyword for the format to use (see another HOWTO | ||
58 | <formats.txt?>). In some cases, that isn't sufficient and you will | ||
59 | have to be more creative. | ||
60 | |||
61 | When the certificate authority has then done the checks the need to | ||
62 | do (and probably gotten payment from you), they will hand over your | ||
63 | new certificate to you. | ||
64 | |||
65 | Section 5 will tell you more on how to handle the certificate you | ||
66 | received. | ||
67 | |||
68 | |||
69 | 4. Creating a self-signed test certificate | ||
70 | |||
71 | If you don't want to deal with another certificate authority, or just | ||
72 | want to create a test certificate for yourself. This is similar to | ||
73 | creating a certificate request, but creates a certificate instead of | ||
74 | a certificate request. This is NOT the recommended way to create a | ||
75 | CA certificate, see ca.txt. | ||
76 | |||
77 | openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095 | ||
78 | |||
79 | |||
80 | 5. What to do with the certificate | ||
81 | |||
82 | If you created everything yourself, or if the certificate authority | ||
83 | was kind enough, your certificate is a raw DER thing in PEM format. | ||
84 | Your key most definitely is if you have followed the examples above. | ||
85 | However, some (most?) certificate authorities will encode them with | ||
86 | things like PKCS7 or PKCS12, or something else. Depending on your | ||
87 | applications, this may be perfectly OK, it all depends on what they | ||
88 | know how to decode. If not, There are a number of OpenSSL tools to | ||
89 | convert between some (most?) formats. | ||
90 | |||
91 | So, depending on your application, you may have to convert your | ||
92 | certificate and your key to various formats, most often also putting | ||
93 | them together into one file. The ways to do this is described in | ||
94 | another HOWTO <formats.txt?>, I will just mention the simplest case. | ||
95 | In the case of a raw DER thing in PEM format, and assuming that's all | ||
96 | right for yor applications, simply concatenating the certificate and | ||
97 | the key into a new file and using that one should be enough. With | ||
98 | some applications, you don't even have to do that. | ||
99 | |||
100 | |||
101 | By now, you have your cetificate and your private key and can start | ||
102 | using the software that depend on it. | ||
103 | |||
104 | -- | ||
105 | Richard Levitte | ||
diff --git a/src/lib/libssl/src/doc/HOWTO/keys.txt b/src/lib/libssl/src/doc/HOWTO/keys.txt deleted file mode 100644 index 7ae2a3a118..0000000000 --- a/src/lib/libssl/src/doc/HOWTO/keys.txt +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | <DRAFT!> | ||
2 | HOWTO keys | ||
3 | |||
4 | 1. Introduction | ||
5 | |||
6 | Keys are the basis of public key algorithms and PKI. Keys usually | ||
7 | come in pairs, with one half being the public key and the other half | ||
8 | being the private key. With OpenSSL, the private key contains the | ||
9 | public key information as well, so a public key doesn't need to be | ||
10 | generated separately. | ||
11 | |||
12 | Public keys come in several flavors, using different cryptographic | ||
13 | algorithms. The most popular ones associated with certificates are | ||
14 | RSA and DSA, and this HOWTO will show how to generate each of them. | ||
15 | |||
16 | |||
17 | 2. To generate a RSA key | ||
18 | |||
19 | A RSA key can be used both for encryption and for signing. | ||
20 | |||
21 | Generating a key for the RSA algorithm is quite easy, all you have to | ||
22 | do is the following: | ||
23 | |||
24 | openssl genrsa -des3 -out privkey.pem 2048 | ||
25 | |||
26 | With this variant, you will be prompted for a protecting password. If | ||
27 | you don't want your key to be protected by a password, remove the flag | ||
28 | '-des3' from the command line above. | ||
29 | |||
30 | NOTE: if you intend to use the key together with a server | ||
31 | certificate, it may be a good thing to avoid protecting it | ||
32 | with a password, since that would mean someone would have to | ||
33 | type in the password every time the server needs to access | ||
34 | the key. | ||
35 | |||
36 | The number 2048 is the size of the key, in bits. Today, 2048 or | ||
37 | higher is recommended for RSA keys, as fewer amount of bits is | ||
38 | consider insecure or to be insecure pretty soon. | ||
39 | |||
40 | |||
41 | 3. To generate a DSA key | ||
42 | |||
43 | A DSA key can be used for signing only. This is important to keep | ||
44 | in mind to know what kind of purposes a certificate request with a | ||
45 | DSA key can really be used for. | ||
46 | |||
47 | Generating a key for the DSA algorithm is a two-step process. First, | ||
48 | you have to generate parameters from which to generate the key: | ||
49 | |||
50 | openssl dsaparam -out dsaparam.pem 2048 | ||
51 | |||
52 | The number 2048 is the size of the key, in bits. Today, 2048 or | ||
53 | higher is recommended for DSA keys, as fewer amount of bits is | ||
54 | consider insecure or to be insecure pretty soon. | ||
55 | |||
56 | When that is done, you can generate a key using the parameters in | ||
57 | question (actually, several keys can be generated from the same | ||
58 | parameters): | ||
59 | |||
60 | openssl gendsa -des3 -out privkey.pem dsaparam.pem | ||
61 | |||
62 | With this variant, you will be prompted for a protecting password. If | ||
63 | you don't want your key to be protected by a password, remove the flag | ||
64 | '-des3' from the command line above. | ||
65 | |||
66 | NOTE: if you intend to use the key together with a server | ||
67 | certificate, it may be a good thing to avoid protecting it | ||
68 | with a password, since that would mean someone would have to | ||
69 | type in the password every time the server needs to access | ||
70 | the key. | ||
71 | |||
72 | -- | ||
73 | Richard Levitte | ||
diff --git a/src/lib/libssl/src/doc/HOWTO/proxy_certificates.txt b/src/lib/libssl/src/doc/HOWTO/proxy_certificates.txt deleted file mode 100644 index f98ec36076..0000000000 --- a/src/lib/libssl/src/doc/HOWTO/proxy_certificates.txt +++ /dev/null | |||
@@ -1,322 +0,0 @@ | |||
1 | <DRAFT!> | ||
2 | HOWTO proxy certificates | ||
3 | |||
4 | 0. WARNING | ||
5 | |||
6 | NONE OF THE CODE PRESENTED HERE HAVE BEEN CHECKED! They are just an | ||
7 | example to show you how things can be done. There may be typos or | ||
8 | type conflicts, and you will have to resolve them. | ||
9 | |||
10 | 1. Introduction | ||
11 | |||
12 | Proxy certificates are defined in RFC 3820. They are really usual | ||
13 | certificates with the mandatory extension proxyCertInfo. | ||
14 | |||
15 | Proxy certificates are issued by an End Entity (typically a user), | ||
16 | either directly with the EE certificate as issuing certificate, or by | ||
17 | extension through an already issued proxy certificate.. They are used | ||
18 | to extend rights to some other entity (a computer process, typically, | ||
19 | or sometimes to the user itself), so it can perform operations in the | ||
20 | name of the owner of the EE certificate. | ||
21 | |||
22 | See http://www.ietf.org/rfc/rfc3820.txt for more information. | ||
23 | |||
24 | |||
25 | 2. A warning about proxy certificates | ||
26 | |||
27 | Noone seems to have tested proxy certificates with security in mind. | ||
28 | Basically, to this date, it seems that proxy certificates have only | ||
29 | been used in a world that's highly aware of them. What would happen | ||
30 | if an unsuspecting application is to validate a chain of certificates | ||
31 | that contains proxy certificates? It would usually consider the leaf | ||
32 | to be the certificate to check for authorisation data, and since proxy | ||
33 | certificates are controlled by the EE certificate owner alone, it's | ||
34 | would be normal to consider what the EE certificate owner could do | ||
35 | with them. | ||
36 | |||
37 | subjectAltName and issuerAltName are forbidden in proxy certificates, | ||
38 | and this is enforced in OpenSSL. The subject must be the same as the | ||
39 | issuer, with one commonName added on. | ||
40 | |||
41 | Possible threats are, as far as has been imagined so far: | ||
42 | |||
43 | - impersonation through commonName (think server certificates). | ||
44 | - use of additional extensions, possibly non-standard ones used in | ||
45 | certain environments, that would grant extra or different | ||
46 | authorisation rights. | ||
47 | |||
48 | For this reason, OpenSSL requires that the use of proxy certificates | ||
49 | be explicitely allowed. Currently, this can be done using the | ||
50 | following methods: | ||
51 | |||
52 | - if the application calls X509_verify_cert() itself, it can do the | ||
53 | following prior to that call (ctx is the pointer passed in the call | ||
54 | to X509_verify_cert()): | ||
55 | |||
56 | X509_STORE_CTX_set_flags(ctx, X509_V_FLAG_ALLOW_PROXY_CERTS); | ||
57 | |||
58 | - in all other cases, proxy certificate validation can be enabled | ||
59 | before starting the application by setting the envirnoment variable | ||
60 | OPENSSL_ALLOW_PROXY_CERTS with some non-empty value. | ||
61 | |||
62 | There are thoughts to allow proxy certificates with a line in the | ||
63 | default openssl.cnf, but that's still in the future. | ||
64 | |||
65 | |||
66 | 3. How to create proxy cerificates | ||
67 | |||
68 | It's quite easy to create proxy certificates, by taking advantage of | ||
69 | the lack of checks of the 'openssl x509' application (*ahem*). But | ||
70 | first, you need to create a configuration section that contains a | ||
71 | definition of the proxyCertInfo extension, a little like this: | ||
72 | |||
73 | [ v3_proxy ] | ||
74 | # A proxy certificate MUST NEVER be a CA certificate. | ||
75 | basicConstraints=CA:FALSE | ||
76 | |||
77 | # Usual authority key ID | ||
78 | authorityKeyIdentifier=keyid,issuer:always | ||
79 | |||
80 | # Now, for the extension that marks this certificate as a proxy one | ||
81 | proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:1,policy:text:AB | ||
82 | |||
83 | It's also possible to give the proxy extension in a separate section: | ||
84 | |||
85 | proxyCertInfo=critical,@proxy_ext | ||
86 | |||
87 | [ proxy_ext ] | ||
88 | language=id-ppl-anyLanguage | ||
89 | pathlen=0 | ||
90 | policy=text:BC | ||
91 | |||
92 | The policy value has a specific syntax, {syntag}:{string}, where the | ||
93 | syntag determines what will be done with the string. The recognised | ||
94 | syntags are as follows: | ||
95 | |||
96 | text indicates that the string is simply the bytes, not | ||
97 | encoded in any kind of way: | ||
98 | |||
99 | policy=text:räksmörgås | ||
100 | |||
101 | Previous versions of this design had a specific tag | ||
102 | for UTF-8 text. However, since the bytes are copied | ||
103 | as-is anyway, there's no need for it. Instead, use | ||
104 | the text: tag, like this: | ||
105 | |||
106 | policy=text:räksmörgås | ||
107 | |||
108 | hex indicates the string is encoded in hex, with colons | ||
109 | between each byte (every second hex digit): | ||
110 | |||
111 | policy=hex:72:E4:6B:73:6D:F6:72:67:E5:73 | ||
112 | |||
113 | Previous versions of this design had a tag to insert a | ||
114 | complete DER blob. However, the only legal use for | ||
115 | this would be to surround the bytes that would go with | ||
116 | the hex: tag with what's needed to construct a correct | ||
117 | OCTET STRING. Since hex: does that, the DER tag felt | ||
118 | superfluous, and was therefore removed. | ||
119 | |||
120 | file indicates that the text of the policy should really be | ||
121 | taken from a file. The string is then really a file | ||
122 | name. This is useful for policies that are large | ||
123 | (more than a few of lines) XML documents, for example. | ||
124 | |||
125 | The 'policy' setting can be split up in multiple lines like this: | ||
126 | |||
127 | 0.policy=This is | ||
128 | 1.polisy= a multi- | ||
129 | 2.policy=line policy. | ||
130 | |||
131 | NOTE: the proxy policy value is the part that determines the rights | ||
132 | granted to the process using the proxy certificate. The value is | ||
133 | completely dependent on the application reading and interpretting it! | ||
134 | |||
135 | Now that you have created an extension section for your proxy | ||
136 | certificate, you can now easily create a proxy certificate like this: | ||
137 | |||
138 | openssl req -new -config openssl.cnf \ | ||
139 | -out proxy.req -keyout proxy.key | ||
140 | openssl x509 -req -CAcreateserial -in proxy.req -days 7 \ | ||
141 | -out proxy.crt -CA user.crt -CAkey user.key \ | ||
142 | -extfile openssl.cnf -extensions v3_proxy | ||
143 | |||
144 | It's just as easy to create a proxy certificate using another proxy | ||
145 | certificate as issuer (note that I'm using a different configuration | ||
146 | section for it): | ||
147 | |||
148 | openssl req -new -config openssl.cnf \ | ||
149 | -out proxy2.req -keyout proxy2.key | ||
150 | openssl x509 -req -CAcreateserial -in proxy2.req -days 7 \ | ||
151 | -out proxy2.crt -CA proxy.crt -CAkey proxy.key \ | ||
152 | -extfile openssl.cnf -extensions v3_proxy2 | ||
153 | |||
154 | |||
155 | 4. How to have your application interpret the policy? | ||
156 | |||
157 | The basic way to interpret proxy policies is to prepare some default | ||
158 | rights, then do a check of the proxy certificate against the a chain | ||
159 | of proxy certificates, user certificate and CA certificates, and see | ||
160 | what rights came out by the end. Sounds easy, huh? It almost is. | ||
161 | |||
162 | The slightly complicated part is how to pass data between your | ||
163 | application and the certificate validation procedure. | ||
164 | |||
165 | You need the following ingredients: | ||
166 | |||
167 | - a callback routing that will be called for every certificate that's | ||
168 | validated. It will be called several times for each certificates, | ||
169 | so you must be attentive to when it's a good time to do the proxy | ||
170 | policy interpretation and check, as well as to fill in the defaults | ||
171 | when the EE certificate is checked. | ||
172 | |||
173 | - a structure of data that's shared between your application code and | ||
174 | the callback. | ||
175 | |||
176 | - a wrapper function that sets it all up. | ||
177 | |||
178 | - an ex_data index function that creates an index into the generic | ||
179 | ex_data store that's attached to an X509 validation context. | ||
180 | |||
181 | This is some cookbook code for you to fill in: | ||
182 | |||
183 | /* In this example, I will use a view of granted rights as a bit | ||
184 | array, one bit for each possible right. */ | ||
185 | typedef struct your_rights { | ||
186 | unsigned char rights[total_rights / 8]; | ||
187 | } YOUR_RIGHTS; | ||
188 | |||
189 | /* The following procedure will create an index for the ex_data | ||
190 | store in the X509 validation context the first time it's called. | ||
191 | Subsequent calls will return the same index. */ | ||
192 | static int get_proxy_auth_ex_data_idx(void) | ||
193 | { | ||
194 | static volatile int idx = -1; | ||
195 | if (idx < 0) | ||
196 | { | ||
197 | CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE); | ||
198 | if (idx < 0) | ||
199 | { | ||
200 | idx = X509_STORE_CTX_get_ex_new_index(0, | ||
201 | "for verify callback", | ||
202 | NULL,NULL,NULL); | ||
203 | } | ||
204 | CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE); | ||
205 | } | ||
206 | return idx; | ||
207 | } | ||
208 | |||
209 | /* Callback to be given to the X509 validation procedure. */ | ||
210 | static int verify_callback(int ok, X509_STORE_CTX *ctx) | ||
211 | { | ||
212 | if (ok == 1) /* It's REALLY important you keep the proxy policy | ||
213 | check within this secion. It's important to know | ||
214 | that when ok is 1, the certificates are checked | ||
215 | from top to bottom. You get the CA root first, | ||
216 | followed by the possible chain of intermediate | ||
217 | CAs, followed by the EE certificate, followed by | ||
218 | the possible proxy certificates. */ | ||
219 | { | ||
220 | X509 *xs = ctx->current_cert; | ||
221 | |||
222 | if (xs->ex_flags & EXFLAG_PROXY) | ||
223 | { | ||
224 | YOUR_RIGHTS *rights = | ||
225 | (YOUR_RIGHTS *)X509_STORE_CTX_get_ex_data(ctx, | ||
226 | get_proxy_auth_ex_data_idx()); | ||
227 | PROXY_CERT_INFO_EXTENSION *pci = | ||
228 | X509_get_ext_d2i(xs, NID_proxyCertInfo, NULL, NULL); | ||
229 | |||
230 | switch (OBJ_obj2nid(pci->proxyPolicy->policyLanguage)) | ||
231 | { | ||
232 | case NID_Independent: | ||
233 | /* Do whatever you need to grant explicit rights to | ||
234 | this particular proxy certificate, usually by | ||
235 | pulling them from some database. If there are none | ||
236 | to be found, clear all rights (making this and any | ||
237 | subsequent proxy certificate void of any rights). | ||
238 | */ | ||
239 | memset(rights->rights, 0, sizeof(rights->rights)); | ||
240 | break; | ||
241 | case NID_id_ppl_inheritAll: | ||
242 | /* This is basically a NOP, we simply let the current | ||
243 | rights stand as they are. */ | ||
244 | break; | ||
245 | default: | ||
246 | /* This is usually the most complex section of code. | ||
247 | You really do whatever you want as long as you | ||
248 | follow RFC 3820. In the example we use here, the | ||
249 | simplest thing to do is to build another, temporary | ||
250 | bit array and fill it with the rights granted by | ||
251 | the current proxy certificate, then use it as a | ||
252 | mask on the accumulated rights bit array, and | ||
253 | voilà, you now have a new accumulated rights bit | ||
254 | array. */ | ||
255 | { | ||
256 | int i; | ||
257 | YOUR_RIGHTS tmp_rights; | ||
258 | memset(tmp_rights.rights, 0, sizeof(tmp_rights.rights)); | ||
259 | |||
260 | /* process_rights() is supposed to be a procedure | ||
261 | that takes a string and it's length, interprets | ||
262 | it and sets the bits in the YOUR_RIGHTS pointed | ||
263 | at by the third argument. */ | ||
264 | process_rights((char *) pci->proxyPolicy->policy->data, | ||
265 | pci->proxyPolicy->policy->length, | ||
266 | &tmp_rights); | ||
267 | |||
268 | for(i = 0; i < total_rights / 8; i++) | ||
269 | rights->rights[i] &= tmp_rights.rights[i]; | ||
270 | } | ||
271 | break; | ||
272 | } | ||
273 | PROXY_CERT_INFO_EXTENSION_free(pci); | ||
274 | } | ||
275 | else if (!(xs->ex_flags & EXFLAG_CA)) | ||
276 | { | ||
277 | /* We have a EE certificate, let's use it to set default! | ||
278 | */ | ||
279 | YOUR_RIGHTS *rights = | ||
280 | (YOUR_RIGHTS *)X509_STORE_CTX_get_ex_data(ctx, | ||
281 | get_proxy_auth_ex_data_idx()); | ||
282 | |||
283 | /* The following procedure finds out what rights the owner | ||
284 | of the current certificate has, and sets them in the | ||
285 | YOUR_RIGHTS structure pointed at by the second | ||
286 | argument. */ | ||
287 | set_default_rights(xs, rights); | ||
288 | } | ||
289 | } | ||
290 | return ok; | ||
291 | } | ||
292 | |||
293 | static int my_X509_verify_cert(X509_STORE_CTX *ctx, | ||
294 | YOUR_RIGHTS *needed_rights) | ||
295 | { | ||
296 | int i; | ||
297 | int (*save_verify_cb)(int ok,X509_STORE_CTX *ctx) = ctx->verify_cb; | ||
298 | YOUR_RIGHTS rights; | ||
299 | |||
300 | X509_STORE_CTX_set_verify_cb(ctx, verify_callback); | ||
301 | X509_STORE_CTX_set_ex_data(ctx, get_proxy_auth_ex_data_idx(), &rights); | ||
302 | X509_STORE_CTX_set_flags(ctx, X509_V_FLAG_ALLOW_PROXY_CERTS); | ||
303 | ok = X509_verify_cert(ctx); | ||
304 | |||
305 | if (ok == 1) | ||
306 | { | ||
307 | ok = check_needed_rights(rights, needed_rights); | ||
308 | } | ||
309 | |||
310 | X509_STORE_CTX_set_verify_cb(ctx, save_verify_cb); | ||
311 | |||
312 | return ok; | ||
313 | } | ||
314 | |||
315 | If you use SSL or TLS, you can easily set up a callback to have the | ||
316 | certificates checked properly, using the code above: | ||
317 | |||
318 | SSL_CTX_set_cert_verify_callback(s_ctx, my_X509_verify_cert, &needed_rights); | ||
319 | |||
320 | |||
321 | -- | ||
322 | Richard Levitte | ||
diff --git a/src/lib/libssl/src/doc/README b/src/lib/libssl/src/doc/README deleted file mode 100644 index 6ecc14d994..0000000000 --- a/src/lib/libssl/src/doc/README +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | |||
2 | apps/openssl.pod .... Documentation of OpenSSL `openssl' command | ||
3 | crypto/crypto.pod ... Documentation of OpenSSL crypto.h+libcrypto.a | ||
4 | ssl/ssl.pod ......... Documentation of OpenSSL ssl.h+libssl.a | ||
5 | openssl.txt ......... Assembled documentation files for OpenSSL [not final] | ||
6 | ssleay.txt .......... Assembled documentation of ancestor SSLeay [obsolete] | ||
7 | standards.txt ....... Assembled pointers to standards, RFCs or internet drafts | ||
8 | that are related to OpenSSL. | ||
9 | |||
10 | An archive of HTML documents for the SSLeay library is available from | ||
11 | http://www.columbia.edu/~ariel/ssleay/ | ||
12 | |||
diff --git a/src/lib/libssl/src/doc/apps/CA.pl.pod b/src/lib/libssl/src/doc/apps/CA.pl.pod deleted file mode 100644 index d326101cde..0000000000 --- a/src/lib/libssl/src/doc/apps/CA.pl.pod +++ /dev/null | |||
@@ -1,179 +0,0 @@ | |||
1 | |||
2 | =pod | ||
3 | |||
4 | =head1 NAME | ||
5 | |||
6 | CA.pl - friendlier interface for OpenSSL certificate programs | ||
7 | |||
8 | =head1 SYNOPSIS | ||
9 | |||
10 | B<CA.pl> | ||
11 | [B<-?>] | ||
12 | [B<-h>] | ||
13 | [B<-help>] | ||
14 | [B<-newcert>] | ||
15 | [B<-newreq>] | ||
16 | [B<-newreq-nodes>] | ||
17 | [B<-newca>] | ||
18 | [B<-xsign>] | ||
19 | [B<-sign>] | ||
20 | [B<-signreq>] | ||
21 | [B<-signcert>] | ||
22 | [B<-verify>] | ||
23 | [B<files>] | ||
24 | |||
25 | =head1 DESCRIPTION | ||
26 | |||
27 | The B<CA.pl> script is a perl script that supplies the relevant command line | ||
28 | arguments to the B<openssl> command for some common certificate operations. | ||
29 | It is intended to simplify the process of certificate creation and management | ||
30 | by the use of some simple options. | ||
31 | |||
32 | =head1 COMMAND OPTIONS | ||
33 | |||
34 | =over 4 | ||
35 | |||
36 | =item B<?>, B<-h>, B<-help> | ||
37 | |||
38 | prints a usage message. | ||
39 | |||
40 | =item B<-newcert> | ||
41 | |||
42 | creates a new self signed certificate. The private key is written to the file | ||
43 | "newkey.pem" and the request written to the file "newreq.pem". | ||
44 | |||
45 | =item B<-newreq> | ||
46 | |||
47 | creates a new certificate request. The private key is written to the file | ||
48 | "newkey.pem" and the request written to the file "newreq.pem". | ||
49 | |||
50 | =item B<-newreq-nodes> | ||
51 | |||
52 | is like B<-newreq> except that the private key will not be encrypted. | ||
53 | |||
54 | =item B<-newca> | ||
55 | |||
56 | creates a new CA hierarchy for use with the B<ca> program (or the B<-signcert> | ||
57 | and B<-xsign> options). The user is prompted to enter the filename of the CA | ||
58 | certificates (which should also contain the private key) or by hitting ENTER | ||
59 | details of the CA will be prompted for. The relevant files and directories | ||
60 | are created in a directory called "demoCA" in the current directory. | ||
61 | |||
62 | =item B<-pkcs12> | ||
63 | |||
64 | create a PKCS#12 file containing the user certificate, private key and CA | ||
65 | certificate. It expects the user certificate and private key to be in the | ||
66 | file "newcert.pem" and the CA certificate to be in the file demoCA/cacert.pem, | ||
67 | it creates a file "newcert.p12". This command can thus be called after the | ||
68 | B<-sign> option. The PKCS#12 file can be imported directly into a browser. | ||
69 | If there is an additional argument on the command line it will be used as the | ||
70 | "friendly name" for the certificate (which is typically displayed in the browser | ||
71 | list box), otherwise the name "My Certificate" is used. | ||
72 | |||
73 | =item B<-sign>, B<-signreq>, B<-xsign> | ||
74 | |||
75 | calls the B<ca> program to sign a certificate request. It expects the request | ||
76 | to be in the file "newreq.pem". The new certificate is written to the file | ||
77 | "newcert.pem" except in the case of the B<-xsign> option when it is written | ||
78 | to standard output. | ||
79 | |||
80 | |||
81 | =item B<-signCA> | ||
82 | |||
83 | this option is the same as the B<-signreq> option except it uses the configuration | ||
84 | file section B<v3_ca> and so makes the signed request a valid CA certificate. This | ||
85 | is useful when creating intermediate CA from a root CA. | ||
86 | |||
87 | =item B<-signcert> | ||
88 | |||
89 | this option is the same as B<-sign> except it expects a self signed certificate | ||
90 | to be present in the file "newreq.pem". | ||
91 | |||
92 | =item B<-verify> | ||
93 | |||
94 | verifies certificates against the CA certificate for "demoCA". If no certificates | ||
95 | are specified on the command line it tries to verify the file "newcert.pem". | ||
96 | |||
97 | =item B<files> | ||
98 | |||
99 | one or more optional certificate file names for use with the B<-verify> command. | ||
100 | |||
101 | =back | ||
102 | |||
103 | =head1 EXAMPLES | ||
104 | |||
105 | Create a CA hierarchy: | ||
106 | |||
107 | CA.pl -newca | ||
108 | |||
109 | Complete certificate creation example: create a CA, create a request, sign | ||
110 | the request and finally create a PKCS#12 file containing it. | ||
111 | |||
112 | CA.pl -newca | ||
113 | CA.pl -newreq | ||
114 | CA.pl -signreq | ||
115 | CA.pl -pkcs12 "My Test Certificate" | ||
116 | |||
117 | =head1 DSA CERTIFICATES | ||
118 | |||
119 | Although the B<CA.pl> creates RSA CAs and requests it is still possible to | ||
120 | use it with DSA certificates and requests using the L<req(1)|req(1)> command | ||
121 | directly. The following example shows the steps that would typically be taken. | ||
122 | |||
123 | Create some DSA parameters: | ||
124 | |||
125 | openssl dsaparam -out dsap.pem 1024 | ||
126 | |||
127 | Create a DSA CA certificate and private key: | ||
128 | |||
129 | openssl req -x509 -newkey dsa:dsap.pem -keyout cacert.pem -out cacert.pem | ||
130 | |||
131 | Create the CA directories and files: | ||
132 | |||
133 | CA.pl -newca | ||
134 | |||
135 | enter cacert.pem when prompted for the CA file name. | ||
136 | |||
137 | Create a DSA certificate request and private key (a different set of parameters | ||
138 | can optionally be created first): | ||
139 | |||
140 | openssl req -out newreq.pem -newkey dsa:dsap.pem | ||
141 | |||
142 | Sign the request: | ||
143 | |||
144 | CA.pl -signreq | ||
145 | |||
146 | =head1 NOTES | ||
147 | |||
148 | Most of the filenames mentioned can be modified by editing the B<CA.pl> script. | ||
149 | |||
150 | If the demoCA directory already exists then the B<-newca> command will not | ||
151 | overwrite it and will do nothing. This can happen if a previous call using | ||
152 | the B<-newca> option terminated abnormally. To get the correct behaviour | ||
153 | delete the demoCA directory if it already exists. | ||
154 | |||
155 | Under some environments it may not be possible to run the B<CA.pl> script | ||
156 | directly (for example Win32) and the default configuration file location may | ||
157 | be wrong. In this case the command: | ||
158 | |||
159 | perl -S CA.pl | ||
160 | |||
161 | can be used and the B<OPENSSL_CONF> environment variable changed to point to | ||
162 | the correct path of the configuration file "openssl.cnf". | ||
163 | |||
164 | The script is intended as a simple front end for the B<openssl> program for use | ||
165 | by a beginner. Its behaviour isn't always what is wanted. For more control over the | ||
166 | behaviour of the certificate commands call the B<openssl> command directly. | ||
167 | |||
168 | =head1 ENVIRONMENT VARIABLES | ||
169 | |||
170 | The variable B<OPENSSL_CONF> if defined allows an alternative configuration | ||
171 | file location to be specified, it should contain the full path to the | ||
172 | configuration file, not just its directory. | ||
173 | |||
174 | =head1 SEE ALSO | ||
175 | |||
176 | L<x509(1)|x509(1)>, L<ca(1)|ca(1)>, L<req(1)|req(1)>, L<pkcs12(1)|pkcs12(1)>, | ||
177 | L<config(5)|config(5)> | ||
178 | |||
179 | =cut | ||
diff --git a/src/lib/libssl/src/doc/apps/tsget.pod b/src/lib/libssl/src/doc/apps/tsget.pod deleted file mode 100644 index 56db985c4b..0000000000 --- a/src/lib/libssl/src/doc/apps/tsget.pod +++ /dev/null | |||
@@ -1,194 +0,0 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | tsget - Time Stamping HTTP/HTTPS client | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | B<tsget> | ||
10 | B<-h> server_url | ||
11 | [B<-e> extension] | ||
12 | [B<-o> output] | ||
13 | [B<-v>] | ||
14 | [B<-d>] | ||
15 | [B<-k> private_key.pem] | ||
16 | [B<-p> key_password] | ||
17 | [B<-c> client_cert.pem] | ||
18 | [B<-C> CA_certs.pem] | ||
19 | [B<-P> CA_path] | ||
20 | [B<-r> file:file...] | ||
21 | [B<-g> EGD_socket] | ||
22 | [request]... | ||
23 | |||
24 | =head1 DESCRIPTION | ||
25 | |||
26 | The B<tsget> command can be used for sending a time stamp request, as | ||
27 | specified in B<RFC 3161>, to a time stamp server over HTTP or HTTPS and storing | ||
28 | the time stamp response in a file. This tool cannot be used for creating the | ||
29 | requests and verifying responses, you can use the OpenSSL B<ts(1)> command to | ||
30 | do that. B<tsget> can send several requests to the server without closing | ||
31 | the TCP connection if more than one requests are specified on the command | ||
32 | line. | ||
33 | |||
34 | The tool sends the following HTTP request for each time stamp request: | ||
35 | |||
36 | POST url HTTP/1.1 | ||
37 | User-Agent: OpenTSA tsget.pl/<version> | ||
38 | Host: <host>:<port> | ||
39 | Pragma: no-cache | ||
40 | Content-Type: application/timestamp-query | ||
41 | Accept: application/timestamp-reply | ||
42 | Content-Length: length of body | ||
43 | |||
44 | ...binary request specified by the user... | ||
45 | |||
46 | B<tsget> expects a response of type application/timestamp-reply, which is | ||
47 | written to a file without any interpretation. | ||
48 | |||
49 | =head1 OPTIONS | ||
50 | |||
51 | =over 4 | ||
52 | |||
53 | =item B<-h> server_url | ||
54 | |||
55 | The URL of the HTTP/HTTPS server listening for time stamp requests. | ||
56 | |||
57 | =item B<-e> extension | ||
58 | |||
59 | If the B<-o> option is not given this argument specifies the extension of the | ||
60 | output files. The base name of the output file will be the same as those of | ||
61 | the input files. Default extension is '.tsr'. (Optional) | ||
62 | |||
63 | =item B<-o> output | ||
64 | |||
65 | This option can be specified only when just one request is sent to the | ||
66 | server. The time stamp response will be written to the given output file. '-' | ||
67 | means standard output. In case of multiple time stamp requests or the absence | ||
68 | of this argument the names of the output files will be derived from the names | ||
69 | of the input files and the default or specified extension argument. (Optional) | ||
70 | |||
71 | =item B<-v> | ||
72 | |||
73 | The name of the currently processed request is printed on standard | ||
74 | error. (Optional) | ||
75 | |||
76 | =item B<-d> | ||
77 | |||
78 | Switches on verbose mode for the underlying B<curl> library. You can see | ||
79 | detailed debug messages for the connection. (Optional) | ||
80 | |||
81 | =item B<-k> private_key.pem | ||
82 | |||
83 | (HTTPS) In case of certificate-based client authentication over HTTPS | ||
84 | <private_key.pem> must contain the private key of the user. The private key | ||
85 | file can optionally be protected by a passphrase. The B<-c> option must also | ||
86 | be specified. (Optional) | ||
87 | |||
88 | =item B<-p> key_password | ||
89 | |||
90 | (HTTPS) Specifies the passphrase for the private key specified by the B<-k> | ||
91 | argument. If this option is omitted and the key is passphrase protected B<tsget> | ||
92 | will ask for it. (Optional) | ||
93 | |||
94 | =item B<-c> client_cert.pem | ||
95 | |||
96 | (HTTPS) In case of certificate-based client authentication over HTTPS | ||
97 | <client_cert.pem> must contain the X.509 certificate of the user. The B<-k> | ||
98 | option must also be specified. If this option is not specified no | ||
99 | certificate-based client authentication will take place. (Optional) | ||
100 | |||
101 | =item B<-C> CA_certs.pem | ||
102 | |||
103 | (HTTPS) The trusted CA certificate store. The certificate chain of the peer's | ||
104 | certificate must include one of the CA certificates specified in this file. | ||
105 | Either option B<-C> or option B<-P> must be given in case of HTTPS. (Optional) | ||
106 | |||
107 | =item B<-P> CA_path | ||
108 | |||
109 | (HTTPS) The path containing the trusted CA certificates to verify the peer's | ||
110 | certificate. The directory must be prepared with the B<c_rehash> | ||
111 | OpenSSL utility. Either option B<-C> or option B<-P> must be given in case of | ||
112 | HTTPS. (Optional) | ||
113 | |||
114 | =item B<-rand> file:file... | ||
115 | |||
116 | The files containing random data for seeding the random number | ||
117 | generator. Multiple files can be specified, the separator is B<;> for | ||
118 | MS-Windows, B<,> for VMS and B<:> for all other platforms. (Optional) | ||
119 | |||
120 | =item B<-g> EGD_socket | ||
121 | |||
122 | The name of an EGD socket to get random data from. (Optional) | ||
123 | |||
124 | =item [request]... | ||
125 | |||
126 | List of files containing B<RFC 3161> DER-encoded time stamp requests. If no | ||
127 | requests are specified only one request will be sent to the server and it will be | ||
128 | read from the standard input. (Optional) | ||
129 | |||
130 | =back | ||
131 | |||
132 | =head1 ENVIRONMENT VARIABLES | ||
133 | |||
134 | The B<TSGET> environment variable can optionally contain default | ||
135 | arguments. The content of this variable is added to the list of command line | ||
136 | arguments. | ||
137 | |||
138 | =head1 EXAMPLES | ||
139 | |||
140 | The examples below presume that B<file1.tsq> and B<file2.tsq> contain valid | ||
141 | time stamp requests, tsa.opentsa.org listens at port 8080 for HTTP requests | ||
142 | and at port 8443 for HTTPS requests, the TSA service is available at the /tsa | ||
143 | absolute path. | ||
144 | |||
145 | Get a time stamp response for file1.tsq over HTTP, output is written to | ||
146 | file1.tsr: | ||
147 | |||
148 | tsget -h http://tsa.opentsa.org:8080/tsa file1.tsq | ||
149 | |||
150 | Get a time stamp response for file1.tsq and file2.tsq over HTTP showing | ||
151 | progress, output is written to file1.reply and file2.reply respectively: | ||
152 | |||
153 | tsget -h http://tsa.opentsa.org:8080/tsa -v -e .reply \ | ||
154 | file1.tsq file2.tsq | ||
155 | |||
156 | Create a time stamp request, write it to file3.tsq, send it to the server and | ||
157 | write the response to file3.tsr: | ||
158 | |||
159 | openssl ts -query -data file3.txt -cert | tee file3.tsq \ | ||
160 | | tsget -h http://tsa.opentsa.org:8080/tsa \ | ||
161 | -o file3.tsr | ||
162 | |||
163 | Get a time stamp response for file1.tsq over HTTPS without client | ||
164 | authentication: | ||
165 | |||
166 | tsget -h https://tsa.opentsa.org:8443/tsa \ | ||
167 | -C cacerts.pem file1.tsq | ||
168 | |||
169 | Get a time stamp response for file1.tsq over HTTPS with certificate-based | ||
170 | client authentication (it will ask for the passphrase if client_key.pem is | ||
171 | protected): | ||
172 | |||
173 | tsget -h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \ | ||
174 | -k client_key.pem -c client_cert.pem file1.tsq | ||
175 | |||
176 | You can shorten the previous command line if you make use of the B<TSGET> | ||
177 | environment variable. The following commands do the same as the previous | ||
178 | example: | ||
179 | |||
180 | TSGET='-h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \ | ||
181 | -k client_key.pem -c client_cert.pem' | ||
182 | export TSGET | ||
183 | tsget file1.tsq | ||
184 | |||
185 | =head1 AUTHOR | ||
186 | |||
187 | Zoltan Glozik <zglozik@opentsa.org>, OpenTSA project (http://www.opentsa.org) | ||
188 | |||
189 | =head1 SEE ALSO | ||
190 | |||
191 | L<openssl(1)|openssl(1)>, L<ts(1)|ts(1)>, L<curl(1)|curl(1)>, | ||
192 | B<RFC 3161> | ||
193 | |||
194 | =cut | ||
diff --git a/src/lib/libssl/src/doc/apps/verify.pod b/src/lib/libssl/src/doc/apps/verify.pod index da683004bd..f1d5384b9a 100644 --- a/src/lib/libssl/src/doc/apps/verify.pod +++ b/src/lib/libssl/src/doc/apps/verify.pod | |||
@@ -43,8 +43,7 @@ The B<verify> command verifies certificate chains. | |||
43 | A directory of trusted certificates. The certificates should have names | 43 | A directory of trusted certificates. The certificates should have names |
44 | of the form: hash.0 or have symbolic links to them of this | 44 | of the form: hash.0 or have symbolic links to them of this |
45 | form ("hash" is the hashed certificate subject name: see the B<-hash> option | 45 | form ("hash" is the hashed certificate subject name: see the B<-hash> option |
46 | of the B<x509> utility). Under Unix the B<c_rehash> script will automatically | 46 | of the B<x509> utility). |
47 | create symbolic links to a directory of certificates. | ||
48 | 47 | ||
49 | =item B<-CAfile file> | 48 | =item B<-CAfile file> |
50 | 49 | ||
diff --git a/src/lib/libssl/src/doc/apps/x509.pod b/src/lib/libssl/src/doc/apps/x509.pod index d2d9eb812a..314018f086 100644 --- a/src/lib/libssl/src/doc/apps/x509.pod +++ b/src/lib/libssl/src/doc/apps/x509.pod | |||
@@ -856,6 +856,6 @@ The hash algorithm used in the B<-subject_hash> and B<-issuer_hash> options | |||
856 | before OpenSSL 1.0.0 was based on the deprecated MD5 algorithm and the encoding | 856 | before OpenSSL 1.0.0 was based on the deprecated MD5 algorithm and the encoding |
857 | of the distinguished name. In OpenSSL 1.0.0 and later it is based on a | 857 | of the distinguished name. In OpenSSL 1.0.0 and later it is based on a |
858 | canonical version of the DN using SHA1. This means that any directories using | 858 | canonical version of the DN using SHA1. This means that any directories using |
859 | the old form must have their links rebuilt using B<c_rehash> or similar. | 859 | the old form must have their links rebuilt. |
860 | 860 | ||
861 | =cut | 861 | =cut |
diff --git a/src/lib/libssl/src/doc/c-indentation.el b/src/lib/libssl/src/doc/c-indentation.el deleted file mode 100644 index 90861d3979..0000000000 --- a/src/lib/libssl/src/doc/c-indentation.el +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | ; This Emacs Lisp file defines a C indentation style that closely | ||
2 | ; follows most aspects of the one that is used throughout SSLeay, | ||
3 | ; and hence in OpenSSL. | ||
4 | ; | ||
5 | ; This definition is for the "CC mode" package, which is the default | ||
6 | ; mode for editing C source files in Emacs 20, not for the older | ||
7 | ; c-mode.el (which was the default in less recent releaes of Emacs 19). | ||
8 | ; | ||
9 | ; Copy the definition in your .emacs file or use M-x eval-buffer. | ||
10 | ; To activate this indentation style, visit a C file, type | ||
11 | ; M-x c-set-style <RET> (or C-c . for short), and enter "eay". | ||
12 | ; To toggle the auto-newline feature of CC mode, type C-c C-a. | ||
13 | ; | ||
14 | ; Apparently statement blocks that are not introduced by a statement | ||
15 | ; such as "if" and that are not the body of a function cannot | ||
16 | ; be handled too well by CC mode with this indentation style, | ||
17 | ; so you have to indent them manually (you can use C-q tab). | ||
18 | ; | ||
19 | ; For suggesting improvements, please send e-mail to bodo@openssl.org. | ||
20 | |||
21 | (c-add-style "eay" | ||
22 | '((c-basic-offset . 8) | ||
23 | (indent-tabs-mode . t) | ||
24 | (c-comment-only-line-offset . 0) | ||
25 | (c-hanging-braces-alist) | ||
26 | (c-offsets-alist . ((defun-open . +) | ||
27 | (defun-block-intro . 0) | ||
28 | (class-open . +) | ||
29 | (class-close . +) | ||
30 | (block-open . 0) | ||
31 | (block-close . 0) | ||
32 | (substatement-open . +) | ||
33 | (statement . 0) | ||
34 | (statement-block-intro . 0) | ||
35 | (statement-case-open . +) | ||
36 | (statement-case-intro . +) | ||
37 | (case-label . -) | ||
38 | (label . -) | ||
39 | (arglist-cont-nonempty . +) | ||
40 | (topmost-intro . -) | ||
41 | (brace-list-close . 0) | ||
42 | (brace-list-intro . 0) | ||
43 | (brace-list-open . +) | ||
44 | )))) | ||
45 | |||
diff --git a/src/lib/libssl/src/doc/fingerprints.txt b/src/lib/libssl/src/doc/fingerprints.txt deleted file mode 100644 index 7d05a85594..0000000000 --- a/src/lib/libssl/src/doc/fingerprints.txt +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | Fingerprints | ||
2 | |||
3 | OpenSSL releases are signed with PGP/GnuPG keys. You can find the | ||
4 | signatures in separate files in the same location you find the | ||
5 | distributions themselves. The normal file name is the same as the | ||
6 | distribution file, with '.asc' added. For example, the signature for | ||
7 | the distribution of OpenSSL 0.9.7f, openssl-0.9.7f.tar.gz, is found in | ||
8 | the file openssl-0.9.7f.tar.gz.asc. | ||
9 | |||
10 | The following is the list of fingerprints for the keys that are | ||
11 | currently in use (have been used since summer 2004) to sign OpenSSL | ||
12 | distributions: | ||
13 | |||
14 | pub 1024D/F709453B 2003-10-20 | ||
15 | Key fingerprint = C4CA B749 C34F 7F4C C04F DAC9 A7AF 9E78 F709 453B | ||
16 | uid Richard Levitte <richard@levitte.org> | ||
17 | uid Richard Levitte <levitte@openssl.org> | ||
18 | uid Richard Levitte <levitte@lp.se> | ||
19 | |||
20 | pub 2048R/F295C759 1998-12-13 | ||
21 | Key fingerprint = D0 5D 8C 61 6E 27 E6 60 41 EC B1 B8 D5 7E E5 97 | ||
22 | uid Dr S N Henson <shenson@drh-consultancy.demon.co.uk> | ||
23 | |||
24 | pub 1024R/49A563D9 1997-02-24 | ||
25 | Key fingerprint = 7B 79 19 FA 71 6B 87 25 0E 77 21 E5 52 D9 83 BF | ||
26 | uid Mark Cox <mjc@redhat.com> | ||
27 | uid Mark Cox <mark@awe.com> | ||
28 | uid Mark Cox <mjc@apache.org> | ||
29 | |||
30 | pub 1024R/26BB437D 1997-04-28 | ||
31 | Key fingerprint = 00 C9 21 8E D1 AB 70 37 DD 67 A2 3A 0A 6F 8D A5 | ||
32 | uid Ralf S. Engelschall <rse@engelschall.com> | ||
33 | |||
34 | pub 1024R/9C58A66D 1997-04-03 | ||
35 | Key fingerprint = 13 D0 B8 9D 37 30 C3 ED AC 9C 24 7D 45 8C 17 67 | ||
36 | uid jaenicke@openssl.org | ||
37 | uid Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE> | ||
38 | |||
39 | pub 1024D/2118CF83 1998-07-13 | ||
40 | Key fingerprint = 7656 55DE 62E3 96FF 2587 EB6C 4F6D E156 2118 CF83 | ||
41 | uid Ben Laurie <ben@thebunker.net> | ||
42 | uid Ben Laurie <ben@cryptix.org> | ||
43 | uid Ben Laurie <ben@algroup.co.uk> | ||
44 | sub 4096g/1F5143E7 1998-07-13 | ||
45 | |||
46 | pub 1024R/5A6A9B85 1994-03-22 | ||
47 | Key fingerprint = C7 AC 7E AD 56 6A 65 EC F6 16 66 83 7E 86 68 28 | ||
48 | uid Bodo Moeller <2005@bmoeller.de> | ||
49 | uid Bodo Moeller <2003@bmoeller.de> | ||
50 | uid Bodo Moeller <2004@bmoeller.de> | ||
51 | uid Bodo Moeller <bmoeller@acm.org> | ||
52 | uid Bodo Moeller <bodo@openssl.org> | ||
53 | uid Bodo Moeller <bm@ulf.mali.sub.org> | ||
54 | uid Bodo Moeller <3moeller@informatik.uni-hamburg.de> | ||
55 | uid Bodo Moeller <Bodo_Moeller@public.uni-hamburg.de> | ||
56 | uid Bodo Moeller <3moeller@rzdspc5.informatik.uni-hamburg.de> | ||
57 | |||
diff --git a/src/lib/libssl/src/doc/openssl-shared.txt b/src/lib/libssl/src/doc/openssl-shared.txt deleted file mode 100644 index 5cf84a054f..0000000000 --- a/src/lib/libssl/src/doc/openssl-shared.txt +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | The OpenSSL shared libraries are often installed in a directory like | ||
2 | /usr/local/ssl/lib. | ||
3 | |||
4 | If this directory is not in a standard system path for dynamic/shared | ||
5 | libraries, then you will have problems linking and executing | ||
6 | applications that use OpenSSL libraries UNLESS: | ||
7 | |||
8 | * you link with static (archive) libraries. If you are truly | ||
9 | paranoid about security, you should use static libraries. | ||
10 | * you use the GNU libtool code during linking | ||
11 | (http://www.gnu.org/software/libtool/libtool.html) | ||
12 | * you use pkg-config during linking (this requires that | ||
13 | PKG_CONFIG_PATH includes the path to the OpenSSL shared | ||
14 | library directory), and make use of -R or -rpath. | ||
15 | (http://www.freedesktop.org/software/pkgconfig/) | ||
16 | * you specify the system-wide link path via a command such | ||
17 | as crle(1) on Solaris systems. | ||
18 | * you add the OpenSSL shared library directory to /etc/ld.so.conf | ||
19 | and run ldconfig(8) on Linux systems. | ||
20 | * you define the LD_LIBRARY_PATH, LIBPATH, SHLIB_PATH (HP), | ||
21 | DYLD_LIBRARY_PATH (MacOS X) or PATH (Cygwin and DJGPP) | ||
22 | environment variable and add the OpenSSL shared library | ||
23 | directory to it. | ||
24 | |||
25 | One common tool to check the dynamic dependencies of an executable | ||
26 | or dynamic library is ldd(1) on most UNIX systems. | ||
27 | |||
28 | See any operating system documentation and manpages about shared | ||
29 | libraries for your version of UNIX. The following manpages may be | ||
30 | helpful: ld(1), ld.so(1), ld.so.1(1) [Solaris], dld.sl(1) [HP], | ||
31 | ldd(1), crle(1) [Solaris], pldd(1) [Solaris], ldconfig(8) [Linux], | ||
32 | chatr(1) [HP]. | ||
diff --git a/src/lib/libssl/src/doc/openssl_button.gif b/src/lib/libssl/src/doc/openssl_button.gif deleted file mode 100644 index 3d3c90c9f8..0000000000 --- a/src/lib/libssl/src/doc/openssl_button.gif +++ /dev/null | |||
Binary files differ | |||
diff --git a/src/lib/libssl/src/doc/openssl_button.html b/src/lib/libssl/src/doc/openssl_button.html deleted file mode 100644 index 44c91bd3d0..0000000000 --- a/src/lib/libssl/src/doc/openssl_button.html +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | |||
2 | <!-- the `Includes OpenSSL Cryptogaphy Software' button --> | ||
3 | <!-- freely usable by any application linked against OpenSSL --> | ||
4 | <a href="http://www.openssl.org/"> | ||
5 | <img src="openssl_button.gif" | ||
6 | width=102 height=47 border=0></a> | ||
7 | |||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_load_verify_locations.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_load_verify_locations.pod index de01065285..cd78dd285f 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_CTX_load_verify_locations.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_load_verify_locations.pod | |||
@@ -40,7 +40,6 @@ If more than one CA certificate with the same name hash value exist, the | |||
40 | extension must be different (e.g. 9d66eef0.0, 9d66eef0.1 etc). The search | 40 | extension must be different (e.g. 9d66eef0.0, 9d66eef0.1 etc). The search |
41 | is performed in the ordering of the extension number, regardless of other | 41 | is performed in the ordering of the extension number, regardless of other |
42 | properties of the certificates. | 42 | properties of the certificates. |
43 | Use the B<c_rehash> utility to create the necessary links. | ||
44 | 43 | ||
45 | The certificates in B<CApath> are only looked up when required, e.g. when | 44 | The certificates in B<CApath> are only looked up when required, e.g. when |
46 | building the certificate chain or when actually performing the verification | 45 | building the certificate chain or when actually performing the verification |
@@ -92,7 +91,21 @@ Prepare the directory /some/where/certs containing several CA certificates | |||
92 | for use as B<CApath>: | 91 | for use as B<CApath>: |
93 | 92 | ||
94 | cd /some/where/certs | 93 | cd /some/where/certs |
95 | c_rehash . | 94 | rm -f *.[0-9]* *.r[0-9]* |
95 | for c in *.pem; do | ||
96 | [ "$c" = "*.pem" ] && continue | ||
97 | hash=$(openssl x509 -noout -hash -in "$c") | ||
98 | if egrep -q -- '-BEGIN( X509 | TRUSTED | )CERTIFICATE-' "$c"; then | ||
99 | suf=0 | ||
100 | while [ -e $hash.$suf ]; do suf=$(( $suf + 1 )); done | ||
101 | ln -s "$c" $hash.$suf | ||
102 | fi | ||
103 | if egrep -q -- '-BEGIN X509 CRL-' "$c"; then | ||
104 | suf=0 | ||
105 | while [ -e $hash.r$suf ]; do suf=$(( $suf + 1 )); done | ||
106 | ln -s "$c" $hash.r$suf | ||
107 | fi | ||
108 | done | ||
96 | 109 | ||
97 | =head1 RETURN VALUES | 110 | =head1 RETURN VALUES |
98 | 111 | ||
diff --git a/src/lib/libssl/src/tools/c89.sh b/src/lib/libssl/src/tools/c89.sh deleted file mode 100644 index b25c9fda2d..0000000000 --- a/src/lib/libssl/src/tools/c89.sh +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | #!/bin/sh -k | ||
2 | # | ||
3 | # Re-order arguments so that -L comes first | ||
4 | # | ||
5 | opts="" | ||
6 | lopts="" | ||
7 | |||
8 | for arg in $* ; do | ||
9 | case $arg in | ||
10 | -L*) lopts="$lopts $arg" ;; | ||
11 | *) opts="$opts $arg" ;; | ||
12 | esac | ||
13 | done | ||
14 | |||
15 | c89 $lopts $opts | ||
diff --git a/src/lib/libssl/src/tools/c_hash b/src/lib/libssl/src/tools/c_hash deleted file mode 100644 index 5e0a908175..0000000000 --- a/src/lib/libssl/src/tools/c_hash +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | # print out the hash values | ||
3 | # | ||
4 | |||
5 | for i in $* | ||
6 | do | ||
7 | h=`openssl x509 -hash -noout -in $i` | ||
8 | echo "$h.0 => $i" | ||
9 | done | ||
diff --git a/src/lib/libssl/src/tools/c_info b/src/lib/libssl/src/tools/c_info deleted file mode 100644 index 0e1e633b6f..0000000000 --- a/src/lib/libssl/src/tools/c_info +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # print the subject | ||
4 | # | ||
5 | |||
6 | for i in $* | ||
7 | do | ||
8 | n=`openssl x509 -subject -issuer -enddate -noout -in $i` | ||
9 | echo "$i" | ||
10 | echo "$n" | ||
11 | echo "--------" | ||
12 | done | ||
diff --git a/src/lib/libssl/src/tools/c_issuer b/src/lib/libssl/src/tools/c_issuer deleted file mode 100644 index 55821ab740..0000000000 --- a/src/lib/libssl/src/tools/c_issuer +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # print out the issuer | ||
4 | # | ||
5 | |||
6 | for i in $* | ||
7 | do | ||
8 | n=`openssl x509 -issuer -noout -in $i` | ||
9 | echo "$i $n" | ||
10 | done | ||
diff --git a/src/lib/libssl/src/tools/c_name b/src/lib/libssl/src/tools/c_name deleted file mode 100644 index 28800c0b30..0000000000 --- a/src/lib/libssl/src/tools/c_name +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # print the subject | ||
4 | # | ||
5 | |||
6 | for i in $* | ||
7 | do | ||
8 | n=`openssl x509 -subject -noout -in $i` | ||
9 | echo "$i $n" | ||
10 | done | ||
diff --git a/src/lib/libssl/src/tools/c_rehash.in b/src/lib/libssl/src/tools/c_rehash.in deleted file mode 100644 index bfc4a69ed4..0000000000 --- a/src/lib/libssl/src/tools/c_rehash.in +++ /dev/null | |||
@@ -1,180 +0,0 @@ | |||
1 | #!/usr/local/bin/perl | ||
2 | |||
3 | |||
4 | # Perl c_rehash script, scan all files in a directory | ||
5 | # and add symbolic links to their hash values. | ||
6 | |||
7 | my $openssl; | ||
8 | |||
9 | my $dir; | ||
10 | my $prefix; | ||
11 | |||
12 | if(defined $ENV{OPENSSL}) { | ||
13 | $openssl = $ENV{OPENSSL}; | ||
14 | } else { | ||
15 | $openssl = "openssl"; | ||
16 | $ENV{OPENSSL} = $openssl; | ||
17 | } | ||
18 | |||
19 | my $pwd; | ||
20 | eval "require Cwd"; | ||
21 | if (defined(&Cwd::getcwd)) { | ||
22 | $pwd=Cwd::getcwd(); | ||
23 | } else { | ||
24 | $pwd=`pwd`; chomp($pwd); | ||
25 | } | ||
26 | my $path_delim = ($pwd =~ /^[a-z]\:/i) ? ';' : ':'; # DOS/Win32 or Unix delimiter? | ||
27 | |||
28 | $ENV{PATH} = "$prefix/bin" . ($ENV{PATH} ? $path_delim . $ENV{PATH} : ""); # prefix our path | ||
29 | |||
30 | if(! -x $openssl) { | ||
31 | my $found = 0; | ||
32 | foreach (split /$path_delim/, $ENV{PATH}) { | ||
33 | if(-x "$_/$openssl") { | ||
34 | $found = 1; | ||
35 | $openssl = "$_/$openssl"; | ||
36 | last; | ||
37 | } | ||
38 | } | ||
39 | if($found == 0) { | ||
40 | print STDERR "c_rehash: rehashing skipped ('openssl' program not available)\n"; | ||
41 | exit 0; | ||
42 | } | ||
43 | } | ||
44 | |||
45 | if(@ARGV) { | ||
46 | @dirlist = @ARGV; | ||
47 | } elsif($ENV{SSL_CERT_DIR}) { | ||
48 | @dirlist = split /$path_delim/, $ENV{SSL_CERT_DIR}; | ||
49 | } else { | ||
50 | $dirlist[0] = "$dir/certs"; | ||
51 | } | ||
52 | |||
53 | if (-d $dirlist[0]) { | ||
54 | chdir $dirlist[0]; | ||
55 | $openssl="$pwd/$openssl" if (!-x $openssl); | ||
56 | chdir $pwd; | ||
57 | } | ||
58 | |||
59 | foreach (@dirlist) { | ||
60 | if(-d $_ and -w $_) { | ||
61 | hash_dir($_); | ||
62 | } | ||
63 | } | ||
64 | |||
65 | sub hash_dir { | ||
66 | my %hashlist; | ||
67 | print "Doing $_[0]\n"; | ||
68 | chdir $_[0]; | ||
69 | opendir(DIR, "."); | ||
70 | my @flist = readdir(DIR); | ||
71 | # Delete any existing symbolic links | ||
72 | foreach (grep {/^[\da-f]+\.r{0,1}\d+$/} @flist) { | ||
73 | if(-l $_) { | ||
74 | unlink $_; | ||
75 | } | ||
76 | } | ||
77 | closedir DIR; | ||
78 | FILE: foreach $fname (grep {/\.pem$/} @flist) { | ||
79 | # Check to see if certificates and/or CRLs present. | ||
80 | my ($cert, $crl) = check_file($fname); | ||
81 | if(!$cert && !$crl) { | ||
82 | print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n"; | ||
83 | next; | ||
84 | } | ||
85 | link_hash_cert($fname) if($cert); | ||
86 | link_hash_crl($fname) if($crl); | ||
87 | } | ||
88 | } | ||
89 | |||
90 | sub check_file { | ||
91 | my ($is_cert, $is_crl) = (0,0); | ||
92 | my $fname = $_[0]; | ||
93 | open IN, $fname; | ||
94 | while(<IN>) { | ||
95 | if(/^-----BEGIN (.*)-----/) { | ||
96 | my $hdr = $1; | ||
97 | if($hdr =~ /^(X509 |TRUSTED |)CERTIFICATE$/) { | ||
98 | $is_cert = 1; | ||
99 | last if($is_crl); | ||
100 | } elsif($hdr eq "X509 CRL") { | ||
101 | $is_crl = 1; | ||
102 | last if($is_cert); | ||
103 | } | ||
104 | } | ||
105 | } | ||
106 | close IN; | ||
107 | return ($is_cert, $is_crl); | ||
108 | } | ||
109 | |||
110 | |||
111 | # Link a certificate to its subject name hash value, each hash is of | ||
112 | # the form <hash>.<n> where n is an integer. If the hash value already exists | ||
113 | # then we need to up the value of n, unless its a duplicate in which | ||
114 | # case we skip the link. We check for duplicates by comparing the | ||
115 | # certificate fingerprints | ||
116 | |||
117 | sub link_hash_cert { | ||
118 | my $fname = $_[0]; | ||
119 | $fname =~ s/'/'\\''/g; | ||
120 | my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in "$fname"`; | ||
121 | chomp $hash; | ||
122 | chomp $fprint; | ||
123 | $fprint =~ s/^.*=//; | ||
124 | $fprint =~ tr/://d; | ||
125 | my $suffix = 0; | ||
126 | # Search for an unused hash filename | ||
127 | while(exists $hashlist{"$hash.$suffix"}) { | ||
128 | # Hash matches: if fingerprint matches its a duplicate cert | ||
129 | if($hashlist{"$hash.$suffix"} eq $fprint) { | ||
130 | print STDERR "WARNING: Skipping duplicate certificate $fname\n"; | ||
131 | return; | ||
132 | } | ||
133 | $suffix++; | ||
134 | } | ||
135 | $hash .= ".$suffix"; | ||
136 | print "$fname => $hash\n"; | ||
137 | $symlink_exists=eval {symlink("",""); 1}; | ||
138 | if ($symlink_exists) { | ||
139 | symlink $fname, $hash; | ||
140 | } else { | ||
141 | open IN,"<$fname" or die "can't open $fname for read"; | ||
142 | open OUT,">$hash" or die "can't open $hash for write"; | ||
143 | print OUT <IN>; # does the job for small text files | ||
144 | close OUT; | ||
145 | close IN; | ||
146 | } | ||
147 | $hashlist{$hash} = $fprint; | ||
148 | } | ||
149 | |||
150 | # Same as above except for a CRL. CRL links are of the form <hash>.r<n> | ||
151 | |||
152 | sub link_hash_crl { | ||
153 | my $fname = $_[0]; | ||
154 | $fname =~ s/'/'\\''/g; | ||
155 | my ($hash, $fprint) = `"$openssl" crl -hash -fingerprint -noout -in '$fname'`; | ||
156 | chomp $hash; | ||
157 | chomp $fprint; | ||
158 | $fprint =~ s/^.*=//; | ||
159 | $fprint =~ tr/://d; | ||
160 | my $suffix = 0; | ||
161 | # Search for an unused hash filename | ||
162 | while(exists $hashlist{"$hash.r$suffix"}) { | ||
163 | # Hash matches: if fingerprint matches its a duplicate cert | ||
164 | if($hashlist{"$hash.r$suffix"} eq $fprint) { | ||
165 | print STDERR "WARNING: Skipping duplicate CRL $fname\n"; | ||
166 | return; | ||
167 | } | ||
168 | $suffix++; | ||
169 | } | ||
170 | $hash .= ".r$suffix"; | ||
171 | print "$fname => $hash\n"; | ||
172 | $symlink_exists=eval {symlink("",""); 1}; | ||
173 | if ($symlink_exists) { | ||
174 | symlink $fname, $hash; | ||
175 | } else { | ||
176 | system ("cp", $fname, $hash); | ||
177 | } | ||
178 | $hashlist{$hash} = $fprint; | ||
179 | } | ||
180 | |||