1 | * * * * * |
---|
2 | |
---|
3 | `mod_gnutls` is a module for the Apache web server that provides HTTPS |
---|
4 | (HTTP over Transport Layer Security (TLS)) using the GnuTLS library. |
---|
5 | More information about the module can be found at |
---|
6 | [the project's website](https://mod.gnutls.org/). |
---|
7 | |
---|
8 | * * * * * |
---|
9 | |
---|
10 | Compilation & Installation |
---|
11 | ========================== |
---|
12 | |
---|
13 | `mod_gnutls` uses the `./configure && make && make install` mechanism |
---|
14 | common to many Open Source programs. Most of the dirty work is |
---|
15 | handled by either `./configure` or Apache's `apxs` utility. If you have |
---|
16 | built Apache modules before, there shouldn't be any surprises for you. |
---|
17 | |
---|
18 | The interesting options you can pass to configure are: |
---|
19 | |
---|
20 | `--with-apxs=PATH` |
---|
21 | : This option is used to specify the location of the apxs utility that |
---|
22 | was installed as part of apache. Specify the location of the |
---|
23 | binary, not the directory it is located in. |
---|
24 | |
---|
25 | `--with-apu-config=PATH` |
---|
26 | : Path to APR Utility Library config tool (`apu-1-config`) |
---|
27 | |
---|
28 | `--help` |
---|
29 | : Provides a list of all available configure options. |
---|
30 | |
---|
31 | It is recommended to run `make check` before installation. If your |
---|
32 | system doesn't have a loopback device with IPv6 and IPv4 support or |
---|
33 | `localhost` does not resolve to at least one of `[::1]` and |
---|
34 | `127.0.0.1`, you may have to set the `TEST_HOST` or `TEST_IP` |
---|
35 | environment variables when running `./configure` to make the test |
---|
36 | suite work correctly. |
---|
37 | |
---|
38 | * * * * * |
---|
39 | |
---|
40 | Integration |
---|
41 | =========== |
---|
42 | |
---|
43 | To activate `mod_gnutls` just add the following line to your httpd.conf |
---|
44 | and restart Apache: |
---|
45 | |
---|
46 | LoadModule gnutls_module modules/mod_gnutls.so |
---|
47 | |
---|
48 | Module Dependencies |
---|
49 | ------------------- |
---|
50 | |
---|
51 | `mod_gnutls` uses the Apache HTTPD [Shared Object |
---|
52 | Cache](http://httpd.apache.org/docs/current/en/socache.html) to cache |
---|
53 | [OCSP responses for OCSP stapling](#gnutlsocspcache) and [TLS |
---|
54 | sessions](#gnutlscache). To use either cache you need to load a |
---|
55 | suitable `mod_socache_PROVIDER` module, which should be provided by |
---|
56 | your Apache installation. |
---|
57 | |
---|
58 | It is recommended to load at least `mod_socache_shmcb`. If that module |
---|
59 | is loaded `mod_gnutls` will [enable OCSP stapling by |
---|
60 | default](#gnutlsocspstapling), without needing any further |
---|
61 | configuration other than a [certificate chain](#gnutlscertificatefile) |
---|
62 | with OCSP support. |
---|
63 | |
---|
64 | * * * * * |
---|
65 | |
---|
66 | Configuration Directives |
---|
67 | ======================== |
---|
68 | |
---|
69 | General Options |
---|
70 | --------------- |
---|
71 | |
---|
72 | ### GnuTLSEnable |
---|
73 | |
---|
74 | Enable GnuTLS for this virtual host |
---|
75 | |
---|
76 | GnuTLSEnable [on|off] |
---|
77 | |
---|
78 | Default: *off*\ |
---|
79 | Context: virtual host |
---|
80 | |
---|
81 | This directive enables SSL/TLS Encryption for a Virtual Host. |
---|
82 | |
---|
83 | ### GnuTLSCache |
---|
84 | |
---|
85 | Configure TLS Session Cache |
---|
86 | |
---|
87 | GnuTLSCache (shmcb|dbm|memcache|...|none)[:PARAMETERS] |
---|
88 | |
---|
89 | Default: `GnuTLSCache none`\ |
---|
90 | Context: server config |
---|
91 | |
---|
92 | This directive configures the TLS Session Cache for `mod_gnutls`. This |
---|
93 | could be shared between machines of different architectures. If the |
---|
94 | selected cache implementation is not thread-safe, access is serialized |
---|
95 | using the `gnutls-cache` mutex. |
---|
96 | |
---|
97 | Which cache implementations are available depends on your Apache |
---|
98 | installation and configuration, `mod_gnutls` can use any socache |
---|
99 | provider. In general you will need to load a `mod_socache_PROVIDER` |
---|
100 | module. Common options are described below, please check the Apache |
---|
101 | HTTPD documentation for details on available providers and their |
---|
102 | configuration. |
---|
103 | |
---|
104 | `shmcb` |
---|
105 | : Uses a shared memory segment. This is a high performance local |
---|
106 | cache. The parameter is a relative or absolute path to be used if |
---|
107 | the local shared memory implementation requires one, followed by |
---|
108 | the cache size in bytes enclosed in parentheses. |
---|
109 | |
---|
110 | Example: `shmcb:cache/gnutls_cache(65536)` |
---|
111 | |
---|
112 | `dbm` |
---|
113 | : Uses a DBM cache file. The parameter is a relative or absolute |
---|
114 | path to be used as the DBM cache file. |
---|
115 | |
---|
116 | Example: `dbm:cache/gnutls_cache` |
---|
117 | |
---|
118 | `memcache` |
---|
119 | : Uses memcached server(s) to cache TLS session data. The parameter |
---|
120 | is a comma separated list of servers (host:port). This can be used |
---|
121 | to share a session cache between all servers in a cluster. |
---|
122 | |
---|
123 | Example: `memcache:memcache.example.com:12345,memcache2.example.com:12345` |
---|
124 | |
---|
125 | `none` |
---|
126 | : Turns off all caching of TLS sessions. |
---|
127 | |
---|
128 | This can significantly reduce the performance of `mod_gnutls` |
---|
129 | since even followup connections by a client must renegotiate |
---|
130 | parameters instead of reusing old ones. This is the default, since |
---|
131 | it requires no configuration. |
---|
132 | |
---|
133 | Session tickets are an alternative to using a session cache, |
---|
134 | please see `GnuTLSSessionTickets`. Note that for TLS 1.3 GnuTLS |
---|
135 | supports resumption using session tickets only as of version |
---|
136 | 3.6.4. |
---|
137 | |
---|
138 | ### GnuTLSCacheTimeout |
---|
139 | |
---|
140 | Timeout for TLS Session Cache expiration |
---|
141 | |
---|
142 | GnuTLSCacheTimeout SECONDS |
---|
143 | |
---|
144 | Default: `GnuTLSCacheTimeout 300`\ |
---|
145 | Context: server config, virtual host |
---|
146 | |
---|
147 | Sets the expiration timeout for cached TLS sessions. |
---|
148 | |
---|
149 | ### GnuTLSSessionTickets |
---|
150 | |
---|
151 | Enable Session Tickets for the server |
---|
152 | |
---|
153 | GnuTLSSessionTickets [on|off] |
---|
154 | |
---|
155 | Default: `on` with GnuTLS 3.6.4 and newer, `off` otherwise\ |
---|
156 | Context: server config, virtual host |
---|
157 | |
---|
158 | Session tickets allow TLS session resumption without session state |
---|
159 | stored on the server, using encrypted tickets provided to the clients |
---|
160 | instead. Tickets are an alternative to using a session cache, and |
---|
161 | currently the only session resumption mechanism in TLS 1.3. For a pool |
---|
162 | of servers this option is not recommended since the tickets are bound |
---|
163 | to the issuing server only. |
---|
164 | |
---|
165 | If this option is set in the global configuration, virtual hosts |
---|
166 | without a `GnuTLSSessionTickets` setting will use the global setting. |
---|
167 | |
---|
168 | *Warning:* With GnuTLS version before 3.6.4 the master key that |
---|
169 | protects the tickets is generated only on server start, and there is |
---|
170 | no mechanism to roll over the key. If session tickets are enabled it |
---|
171 | is highly recommended to restart the server regularly to protect past |
---|
172 | sessions in case an attacker gains access to server memory. GnuTLS |
---|
173 | 3.6.4 introduced an automatic TOTP-based key rollover, so this warning |
---|
174 | does not apply any more and tickets are enabled by default. |
---|
175 | |
---|
176 | ### GnuTLSDHFile |
---|
177 | |
---|
178 | Use the provided PKCS \#3 encoded Diffie-Hellman parameters |
---|
179 | |
---|
180 | GnuTLSDHFile FILEPATH |
---|
181 | |
---|
182 | Default: *none*\ |
---|
183 | Context: server config, virtual host |
---|
184 | |
---|
185 | By default `mod_gnutls` uses the DH parameters included with GnuTLS |
---|
186 | corresponding to the security level of the configured private keys. |
---|
187 | |
---|
188 | If you need to use different DH parameters, you can provide a PEM file |
---|
189 | containing them in PKCS \#3 encoding using this option. Please see the |
---|
190 | "[Parameter |
---|
191 | generation](https://gnutls.org/manual/html_node/Parameter-generation.html)" |
---|
192 | section of the GnuTLS documentation for a short discussion of the |
---|
193 | security implications. |
---|
194 | |
---|
195 | ### GnuTLSPriorities |
---|
196 | |
---|
197 | Set the allowed protocol versions, ciphers, key exchange algorithms, |
---|
198 | MACs and compression methods |
---|
199 | |
---|
200 | GnuTLSPriorities NORMAL:+CIPHER_0:+CIPHER_1:...:+CIPHER_N |
---|
201 | |
---|
202 | Default: `NORMAL`\ |
---|
203 | Context: server config, virtual host |
---|
204 | |
---|
205 | Sets the allowed protocol version(s), ciphers, key exchange methods, |
---|
206 | message authentication codes, and other TLS parameters for the server. |
---|
207 | The parameter is a GnuTLS priority string as described in the |
---|
208 | [the GnuTLS documentation](https://gnutls.org/manual/html_node/Priority-Strings.html). |
---|
209 | |
---|
210 | For example, to disable TLS 1.0 use `NORMAL:-VERS-TLS1.0`. |
---|
211 | |
---|
212 | ### GnuTLSP11Module |
---|
213 | |
---|
214 | Load this PKCS #11 module. |
---|
215 | |
---|
216 | GnuTLSP11Module PATH_TO_LIBRARY |
---|
217 | |
---|
218 | Default: *none*\ |
---|
219 | Context: server config |
---|
220 | |
---|
221 | Load this PKCS #11 provider module, instead of the system |
---|
222 | defaults. May occur multiple times to load multiple modules. |
---|
223 | |
---|
224 | ### GnuTLSPIN |
---|
225 | |
---|
226 | Set the PIN to be used to access encrypted key files or PKCS #11 objects. |
---|
227 | |
---|
228 | GnuTLSPIN XXXXXX |
---|
229 | |
---|
230 | Default: *none*\ |
---|
231 | Context: server config, virtual host |
---|
232 | |
---|
233 | Takes a string to be used as a PIN for the protected objects in |
---|
234 | a security module, or as a key to be used to decrypt PKCS #8, PKCS #12, |
---|
235 | or openssl encrypted keys. |
---|
236 | |
---|
237 | ### GnuTLSSRKPIN |
---|
238 | |
---|
239 | Set the SRK PIN to be used to access the TPM. |
---|
240 | |
---|
241 | GnuTLSSRKPIN XXXXXX |
---|
242 | |
---|
243 | Default: *none*\ |
---|
244 | Context: server config, virtual host |
---|
245 | |
---|
246 | Takes a string to be used as a PIN for the protected objects in |
---|
247 | the TPM module. |
---|
248 | |
---|
249 | ### GnuTLSExportCertificates |
---|
250 | |
---|
251 | Export the PEM encoded certificates to CGIs |
---|
252 | |
---|
253 | GnuTLSExportCertificates [off|on|SIZE] |
---|
254 | |
---|
255 | Default: `off`\ |
---|
256 | Context: server config, virtual host |
---|
257 | |
---|
258 | This directive configures exporting the full certificates of the |
---|
259 | server and the client to CGI scripts via the `SSL_SERVER_CERT` and |
---|
260 | `SSL_CLIENT_CERT` environment variables. The exported certificates |
---|
261 | will be PEM-encoded, limited to the given size. The type of the |
---|
262 | certificate will be exported in `SSL_SERVER_CERT_TYPE` and |
---|
263 | `SSL_CLIENT_CERT_TYPE`. |
---|
264 | |
---|
265 | SIZE should be an integer number of bytes, or may be written with a |
---|
266 | trailing `K` to indicate kibibytes. `off` means the same thing as |
---|
267 | `0`, in which case the certificates will not be exported to the |
---|
268 | environment. `on` is an alias for `16K`. If a non-zero size is |
---|
269 | specified for this directive, but a certificate is too large to fit in |
---|
270 | the buffer, then the corresponding environment variable will contain |
---|
271 | the fixed string `GNUTLS_CERTIFICATE_SIZE_LIMIT_EXCEEDED`. |
---|
272 | |
---|
273 | With GnuTLSExportCertificates enabled, `mod_gnutls` exports the same |
---|
274 | environment variables to the CGI process as `mod_ssl`. |
---|
275 | |
---|
276 | X.509 Certificate Authentication |
---|
277 | -------------------------------- |
---|
278 | |
---|
279 | ### GnuTLSCertificateFile |
---|
280 | |
---|
281 | Set the PEM encoded server certificate or certificate chain |
---|
282 | |
---|
283 | GnuTLSCertificateFile FILEPATH |
---|
284 | |
---|
285 | Default: *none*\ |
---|
286 | Context: server config, virtual host |
---|
287 | |
---|
288 | FILEPATH is an absolute or relative path to a file containing the |
---|
289 | PEM-encoded X.509 certificate to use as this Server's End Entity (EE) |
---|
290 | certificate, and optionally those of the issuing Certificate |
---|
291 | Authorities (CAs). If the file contains multiple certificates they |
---|
292 | must be ordered from EE to the CA closest to the root CA. |
---|
293 | |
---|
294 | Including the full certificate chain is highly recommended because the |
---|
295 | CA certificates are needed for [OCSP stapling](#ocsp-stapling-configuration). |
---|
296 | |
---|
297 | Since version 0.7 this can be a PKCS #11 URL instead of a file. |
---|
298 | |
---|
299 | On Linux and other Unix-like systems you can create the file with a |
---|
300 | command like this (assuming "CA 1" issued the server certificate and |
---|
301 | has been issued by "Root CA" itself): |
---|
302 | |
---|
303 | $ cat server.pem ca-1.pem root-ca.pem >server-chain.pem |
---|
304 | |
---|
305 | ### GnuTLSKeyFile |
---|
306 | |
---|
307 | Set to the PEM Encoded Server Private Key |
---|
308 | |
---|
309 | GnuTLSKeyFile FILEPATH |
---|
310 | |
---|
311 | Default: *none*\ |
---|
312 | Context: server config, virtual host |
---|
313 | |
---|
314 | Takes an absolute or relative path to the Server Private Key. Set |
---|
315 | `GnuTLSPIN` if the key file is encrypted. |
---|
316 | |
---|
317 | Since version 0.7 this can be a PKCS #11 URL. |
---|
318 | |
---|
319 | **Security Warning:**\ |
---|
320 | This private key must be protected. It is read while Apache is still |
---|
321 | running as root, and does not need to be readable by the nobody or |
---|
322 | apache user. |
---|
323 | |
---|
324 | ### GnuTLSClientVerify |
---|
325 | |
---|
326 | Enable client certificate verification |
---|
327 | |
---|
328 | GnuTLSClientVerify [ignore|request|require] |
---|
329 | |
---|
330 | Default: `ignore`\ |
---|
331 | Context: server config, virtual host, directory, .htaccess |
---|
332 | |
---|
333 | This directive controls if clients need to authenticate with a |
---|
334 | certificate to access resources. If a mode other than `ignore` is used |
---|
335 | in a directory context the server may request post-handshake |
---|
336 | authentication (TLS 1.3 only, see below). Trusted CAs for certificate |
---|
337 | validation are set using [`GnuTLSClientCAFile`](#gnutlsclientcafile). |
---|
338 | |
---|
339 | `ignore` |
---|
340 | : `mod_gnutls` will not request certificates from clients, and allow |
---|
341 | any requests. |
---|
342 | |
---|
343 | `request` |
---|
344 | : Client certificates will be requested, but requests are still |
---|
345 | allowed if the client does not send one or the provided |
---|
346 | certificate is invalid. If the client authenticates, the |
---|
347 | certificate validation status will be stored in the |
---|
348 | [`SSL_CLIENT_VERIFY`](#ssl_client_verify) environment variable and |
---|
349 | can be `SUCCESS`, `FAILED` or `NONE`. |
---|
350 | |
---|
351 | `require` |
---|
352 | : Client certificate authentication will be required for access. If |
---|
353 | set at server or virtual host level TLS connections from clients |
---|
354 | without a valid certificate will be denied. If set at directory |
---|
355 | level any requests without a valid client certificate will be |
---|
356 | denied with a 403 Forbidden error. The `SSL_CLIENT_VERIFY` |
---|
357 | environment variable will be set to `SUCCESS` if access is |
---|
358 | allowed, additional [environment |
---|
359 | variables](#environment-variables) will hold details on the client |
---|
360 | certificate. |
---|
361 | |
---|
362 | When using TLS 1.3 `mod_gnutls` will request [post-handshake |
---|
363 | authentication](https://tools.ietf.org/html/rfc8446#section-4.6.2) as |
---|
364 | necessary if the client announced support during the handshake. With |
---|
365 | TLS versions 1.2 and earlier `mod_gnutls` supports client |
---|
366 | authentication only during the initial handshake. |
---|
367 | |
---|
368 | If you want clients that do not support TLS 1.3 at all or do not |
---|
369 | support the post-handshake authentication extension to have access to |
---|
370 | resources that require authentication, you can set `GnuTLSClientVerify |
---|
371 | request` at the server or virtual host level so clients can |
---|
372 | authenticate during the initial handshake. |
---|
373 | |
---|
374 | ### GnuTLSClientCAFile |
---|
375 | |
---|
376 | Set the PEM encoded Certificate Authority list to use for X.509 base |
---|
377 | client authentication |
---|
378 | |
---|
379 | GnuTLSClientCAFile FILEPATH |
---|
380 | |
---|
381 | Default: *none* |
---|
382 | Context: server config, virtual host |
---|
383 | |
---|
384 | Takes an absolute or relative path to a PEM Encoded Certificate to use |
---|
385 | as a Certificate Authority with Client Certificate Authentication. |
---|
386 | This file may contain a list of trusted authorities. |
---|
387 | |
---|
388 | SRP Authentication |
---|
389 | ------------------ |
---|
390 | |
---|
391 | ### GnuTLSSRPPasswdFile |
---|
392 | |
---|
393 | Set to the SRP password file for SRP ciphersuites |
---|
394 | |
---|
395 | GnuTLSSRPPasswdFile FILEPATH |
---|
396 | |
---|
397 | Default: *none*\ |
---|
398 | Context: server config, virtual host |
---|
399 | |
---|
400 | Takes an absolute or relative path to an SRP password file. This is |
---|
401 | the same format as used in libsrp. You can generate such file using |
---|
402 | the command `srptool --passwd /etc/tpasswd --passwd-conf |
---|
403 | /etc/tpasswd.conf -u test` to set a password for user test. This |
---|
404 | password file holds the username, a password verifier and the |
---|
405 | dependency to the SRP parameters. |
---|
406 | |
---|
407 | ### GnuTLSSRPPasswdConfFile |
---|
408 | |
---|
409 | Set to the SRP password.conf file for SRP ciphersuites |
---|
410 | |
---|
411 | GnuTLSSRPPasswdConfFile FILEPATH |
---|
412 | |
---|
413 | Default: *none*\ |
---|
414 | Context: server config, virtual host |
---|
415 | |
---|
416 | Takes an absolute or relative path to an SRP password.conf file. This |
---|
417 | is the same format as used in `libsrp`. You can generate such file |
---|
418 | using the command `srptool --create-conf /etc/tpasswd.conf`. This |
---|
419 | file holds the SRP parameters and is associate with the password file |
---|
420 | (the verifiers depends on these parameters). |
---|
421 | |
---|
422 | TLS Proxy Configuration |
---|
423 | ----------------------- |
---|
424 | |
---|
425 | ### GnuTLSProxyEngine |
---|
426 | |
---|
427 | Enable TLS proxy connections for this virtual host |
---|
428 | |
---|
429 | GnuTLSProxyEngine [on|off] |
---|
430 | |
---|
431 | Default: *off*\ |
---|
432 | Context: virtual host |
---|
433 | |
---|
434 | This directive enables support for TLS proxy connections for a virtual |
---|
435 | host. |
---|
436 | |
---|
437 | ### GnuTLSProxyCAFile |
---|
438 | |
---|
439 | Set to the PEM encoded Certificate Authority Certificate |
---|
440 | |
---|
441 | GnuTLSProxyCAFile FILEPATH |
---|
442 | |
---|
443 | Default: *none*\ |
---|
444 | Context: server config, virtual host |
---|
445 | |
---|
446 | Takes an absolute or relative path to a PEM encoded certificate to use |
---|
447 | as a Certificate Authority when verifying certificates provided by |
---|
448 | proxy back end servers. This file may contain a list of trusted |
---|
449 | authorities. If not set, verification of TLS back end servers will |
---|
450 | always fail due to lack of a trusted CA. |
---|
451 | |
---|
452 | ### GnuTLSProxyCRLFile |
---|
453 | |
---|
454 | Set to the PEM encoded Certificate Revocation List |
---|
455 | |
---|
456 | GnuTLSProxyCRLFile FILEPATH |
---|
457 | |
---|
458 | Default: *none*\ |
---|
459 | Context: server config, virtual host |
---|
460 | |
---|
461 | Takes an absolute or relative path to a PEM encoded Certificate |
---|
462 | Revocation List to use when verifying certificates provided by proxy |
---|
463 | back end servers. The file may contain a list of CRLs. |
---|
464 | |
---|
465 | ### GnuTLSProxyCertificateFile |
---|
466 | |
---|
467 | Set to the PEM encoded Client Certificate |
---|
468 | |
---|
469 | GnuTLSProxyCertificateFile FILEPATH |
---|
470 | |
---|
471 | Default: *none*\ |
---|
472 | Context: server config, virtual host |
---|
473 | |
---|
474 | Takes an absolute or relative path to a PEM encoded X.509 certificate |
---|
475 | to use as this Server's End Entity (EE) client certificate for TLS |
---|
476 | client authentication in proxy TLS connections. If you need to supply |
---|
477 | certificates for intermediate Certificate Authorities (iCAs), they |
---|
478 | should be listed in sequence in the file, from EE to the iCA closest |
---|
479 | to the root CA. Optionally, you can also include the root CA's |
---|
480 | certificate as the last certificate in the list. |
---|
481 | |
---|
482 | If not set, TLS client authentication will be disabled for TLS proxy |
---|
483 | connections. If set, `GnuTLSProxyKeyFile` must be set as well to |
---|
484 | provide the matching private key. |
---|
485 | |
---|
486 | ### GnuTLSProxyKeyFile |
---|
487 | |
---|
488 | Set to the PEM encoded Private Key |
---|
489 | |
---|
490 | GnuTLSProxyKeyFile FILEPATH |
---|
491 | |
---|
492 | Default: *none*\ |
---|
493 | Context: server config, virtual host |
---|
494 | |
---|
495 | Takes an absolute or relative path to the Private Key matching the |
---|
496 | certificate configured using the `GnuTLSProxyCertificateFile` |
---|
497 | directive. This key cannot currently be password protected. |
---|
498 | |
---|
499 | **Security Warning:**\ |
---|
500 | This private key must be protected. It is read while Apache is still |
---|
501 | running as root, and does not need to be readable by the nobody or |
---|
502 | apache user. |
---|
503 | |
---|
504 | ### GnuTLSProxyPriorities |
---|
505 | |
---|
506 | Set the allowed ciphers, key exchange algorithms, MACs and compression |
---|
507 | methods for proxy connections |
---|
508 | |
---|
509 | GnuTLSProxyPriorities NORMAL:+CIPHER_0:+CIPHER_1:...:+CIPHER_N |
---|
510 | |
---|
511 | Default: `NORMAL`\ |
---|
512 | Context: server config, virtual host |
---|
513 | |
---|
514 | Sets the allowed protocol version(s), ciphers, key exchange methods, |
---|
515 | message authentication codes, and other TLS parameters for TLS proxy |
---|
516 | connections. Like for `GnuTLSPriorities` the parameter is a GnuTLS |
---|
517 | priority string as described in the |
---|
518 | [the GnuTLS documentation](https://gnutls.org/manual/html_node/Priority-Strings.html). |
---|
519 | |
---|
520 | OCSP Stapling Configuration |
---|
521 | --------------------------- |
---|
522 | |
---|
523 | OCSP stapling, formally known as the TLS Certificate Status Request |
---|
524 | extension, allows the server to provide the client with a cached OCSP |
---|
525 | response for its certificate during the handshake. With OCSP stapling |
---|
526 | the client does not have to send an OCSP request to the issuer CA to |
---|
527 | check the certificate status, which offers privacy and performance |
---|
528 | advantages, and avoids the security issue of how to handle errors that |
---|
529 | prevent the client from getting a response. |
---|
530 | |
---|
531 | With TLS 1.2 stapling can be used only for the server certificate. |
---|
532 | TLS 1.3 supports stapling for all transmitted certificates. |
---|
533 | Mod\_gnutls will staple for as many consecutive certificates in the |
---|
534 | certificate chain as possible, ideally all except the root CA. |
---|
535 | |
---|
536 | Mod\_gnutls enables OCSP stapling by default if possible. The following |
---|
537 | requirements must be met: |
---|
538 | |
---|
539 | * OCSP responses are verified using the issuer CAs of the certificates |
---|
540 | being checked, so the CAs must be included in |
---|
541 | [`GnuTLSCertificateFile`](#gnutlscertificatefile). Providing the |
---|
542 | whole certificate chain (including the root CA) is recommended. |
---|
543 | |
---|
544 | * Mod\_gnutls needs a cache to store OCSP responses for stapling. If |
---|
545 | [mod\_socache\_shmcb](http://httpd.apache.org/docs/current/en/mod/mod_socache_shmcb.html) |
---|
546 | is loaded mod\_gnutls can set up the cache without additional |
---|
547 | configuration, for other options see |
---|
548 | [`GnuTLSOCSPCache`](#gnutlsocspcache). |
---|
549 | |
---|
550 | * The certificates must contain OCSP access URIs using HTTP so |
---|
551 | mod_gnutls can fetch responses, alternatively you may provide |
---|
552 | responses using [`GnuTLSOCSPResponseFile`](#gnutlsocspresponsefile). |
---|
553 | |
---|
554 | If a server certificate contains the "must-staple" extension (X.509 |
---|
555 | TLS Feature extension defined in [RFC |
---|
556 | 7633](https://tools.ietf.org/html/rfc7633)) and the configuration does |
---|
557 | not support stapling mod_gnutls will refuse to start. |
---|
558 | |
---|
559 | By default mod\_gnutls regularly refreshes the cached OCSP responses |
---|
560 | in the background, see |
---|
561 | [`GnuTLSOCSPAutoRefresh`](#gnutlsocspautorefresh) for details. |
---|
562 | |
---|
563 | ### GnuTLSOCSPStapling |
---|
564 | |
---|
565 | Enable OCSP stapling for this (virtual) host. |
---|
566 | |
---|
567 | GnuTLSOCSPStapling [On|Off] |
---|
568 | |
---|
569 | Default: *on* if requirements are met, *off* otherwise\ |
---|
570 | Context: server config, virtual host |
---|
571 | |
---|
572 | Stapling is activated by default if the requirements [listed |
---|
573 | above](#ocsp-stapling-configuration) are met. |
---|
574 | |
---|
575 | If the server certificate requires stapling ("must-staple") or |
---|
576 | `GnuTLSOCSPStapling` is explicitly set to `on` unmet requirements are |
---|
577 | an error. |
---|
578 | |
---|
579 | OCSP cache updates are serialized using the `gnutls-ocsp` mutex. |
---|
580 | |
---|
581 | ### GnuTLSOCSPCache |
---|
582 | |
---|
583 | OCSP stapling cache configuration |
---|
584 | |
---|
585 | GnuTLSOCSPCache (shmcb|memcache|...|none)[:PARAMETERS] |
---|
586 | |
---|
587 | Default: `shmcb:gnutls_ocsp_cache`\ |
---|
588 | Context: server config |
---|
589 | |
---|
590 | This directive configures the OCSP stapling cache, and uses the same |
---|
591 | syntax as `GnuTLSOCSPCache`. Please check there for details. |
---|
592 | |
---|
593 | The default should be reasonable for most servers and requires |
---|
594 | [mod\_socache\_shmcb](http://httpd.apache.org/docs/current/en/mod/mod_socache_shmcb.html) |
---|
595 | to be loaded. Servers with very many virtual hosts may need to |
---|
596 | increase the default cache size via the parameters string, those with |
---|
597 | few virtual hosts and memory constraints could save a few KB by reducing |
---|
598 | it. Note that `mod_socache_dbm` has a size constraint for entries that |
---|
599 | is generally too small for OCSP responses. |
---|
600 | |
---|
601 | If the selected cache implementation is not thread-safe, access |
---|
602 | is serialized using the `gnutls-ocsp-cache` mutex. |
---|
603 | |
---|
604 | ### GnuTLSOCSPAutoRefresh |
---|
605 | |
---|
606 | Regularly refresh cached OCSP responses independent of TLS handshakes? |
---|
607 | |
---|
608 | GnuTLSOCSPAutoRefresh [On|Off] |
---|
609 | |
---|
610 | Default: *on*\ |
---|
611 | Context: server config, virtual host |
---|
612 | |
---|
613 | By default `mod_gnutls` will regularly refresh the cached OCSP |
---|
614 | responses, regardless of whether they are used. This has advantages |
---|
615 | over updating OCSP responses only when a TLS handshake needs them: |
---|
616 | |
---|
617 | * Handshakes are not delayed by updating the OCSP response cache |
---|
618 | first. |
---|
619 | |
---|
620 | * Updating the cached response before it expires can hide short |
---|
621 | unavailability of the OCSP responder, if a repeated request is |
---|
622 | successful before the cache expires (see below). |
---|
623 | |
---|
624 | The interval to the next request is determined as follows: After a |
---|
625 | successful OCSP request the next one is scheduled for a random period |
---|
626 | between `GnuTLSOCSPFuzzTime` and half of it before |
---|
627 | `GnuTLSOCSPCacheTimeout` expires. For example, if the cache timeout is |
---|
628 | 3600 seconds and the fuzz time 600 seconds, the next request will be |
---|
629 | sent after 3000 to 3300 seconds. If the validity period of the |
---|
630 | response expires before then, the selected interval is halved until it |
---|
631 | is smaller than the time until expiry. If an OCSP request fails, it is |
---|
632 | retried after `GnuTLSOCSPFailureTimeout`. |
---|
633 | |
---|
634 | Regularly updating the OCSP cache requires `mod_watchdog`, |
---|
635 | `mod_gnutls` will fall back to updating the OCSP cache during |
---|
636 | handshakes if `mod_watchdog` is not available or this option is set to |
---|
637 | `Off`. |
---|
638 | |
---|
639 | ### GnuTLSOCSPCheckNonce |
---|
640 | |
---|
641 | Check the nonce in OCSP responses? |
---|
642 | |
---|
643 | GnuTLSOCSPCheckNonce [On|Off] |
---|
644 | |
---|
645 | Default: *on*\ |
---|
646 | Context: server config, virtual host |
---|
647 | |
---|
648 | Some CAs refuse to send nonces in their OCSP responses, probably |
---|
649 | because that way they can cache responses. If your CA is one of them |
---|
650 | you can use this flag to disable nonce verification. Note that |
---|
651 | `mod_gnutls` will _send_ a nonce either way. |
---|
652 | |
---|
653 | ### GnuTLSOCSPResponseFile |
---|
654 | |
---|
655 | Read OCSP responses for stapling from these files (one or more) |
---|
656 | instead of sending a request over HTTP. |
---|
657 | |
---|
658 | GnuTLSOCSPResponseFile /path/to/response.der [...] |
---|
659 | |
---|
660 | Default: *empty*\ |
---|
661 | Context: server config, virtual host |
---|
662 | |
---|
663 | The first listed file must contain a response for the server |
---|
664 | certificate, responses for intermediate CAs may be added in the order |
---|
665 | they appear in [GnuTLSCertificateFile](#gnutlscertificatefile). You |
---|
666 | can revert to the default fetch mechanism for a specific certificate |
---|
667 | (including the server certificate) by giving the empty string (`""`) |
---|
668 | instead of a file path. |
---|
669 | |
---|
670 | The response files must be updated externally, for example using a |
---|
671 | cron job. This option is an alternative to the server fetching OCSP |
---|
672 | responses over HTTP. Reasons to use this option include: |
---|
673 | |
---|
674 | * Performing OCSP requests separate from the web server (e.g. to share |
---|
675 | responses across a server cluster). |
---|
676 | * The issuer CA uses an access method other than HTTP, or doesn't |
---|
677 | include an OCSP URL in the certificate. |
---|
678 | * Testing |
---|
679 | |
---|
680 | You can use a GnuTLS `ocsptool` command like the following to create |
---|
681 | and update the response file: |
---|
682 | |
---|
683 | ocsptool --ask --nonce --load-issuer ca_cert.pem \ |
---|
684 | --load-cert server_cert.pem --outfile ocsp_response.der |
---|
685 | |
---|
686 | Additional error checking is highly recommended. You may have to |
---|
687 | remove the `--nonce` option if the OCSP responder of your CA does not |
---|
688 | support nonces. |
---|
689 | |
---|
690 | ### GnuTLSOCSPCacheTimeout |
---|
691 | |
---|
692 | Cache timeout for OCSP responses |
---|
693 | |
---|
694 | GnuTLSOCSPCacheTimeout SECONDS |
---|
695 | |
---|
696 | Default: *3600*\ |
---|
697 | Context: server config, virtual host |
---|
698 | |
---|
699 | Cached OCSP responses will be refreshed after the configured number of |
---|
700 | seconds. How long this timeout should reasonably be depends on your |
---|
701 | CA, namely how often its OCSP responder is updated and how long |
---|
702 | responses are valid. Note that a response will not be cached beyond |
---|
703 | its lifetime as denoted in the `nextUpdate` field of the response. |
---|
704 | |
---|
705 | ### GnuTLSOCSPFailureTimeout |
---|
706 | |
---|
707 | Wait this many seconds before retrying a failed OCSP request. |
---|
708 | |
---|
709 | GnuTLSOCSPFailureTimeout SECONDS |
---|
710 | |
---|
711 | Default: *300*\ |
---|
712 | Context: server config, virtual host |
---|
713 | |
---|
714 | Retries of failed OCSP requests must be rate limited to avoid |
---|
715 | overloading both the server using mod_gnutls and the CA's OCSP |
---|
716 | responder. A shorter value increases the load on both sides, a longer |
---|
717 | one means that stapling will remain disabled for longer after a failed |
---|
718 | request. The auto-refresh mechanism updates OCSP responses before they |
---|
719 | expire and can cover short unavailability of OCSP responders, see |
---|
720 | [`GnuTLSOCSPAutoRefresh`](#gnutlsocspautorefresh) for details. |
---|
721 | |
---|
722 | ### GnuTLSOCSPFuzzTime |
---|
723 | |
---|
724 | Update the cached OCSP response up to this time before the cache expires |
---|
725 | |
---|
726 | GnuTLSOCSPFuzzTime SECONDS |
---|
727 | |
---|
728 | Default: *larger of GnuTLSOCSPCacheTimeout / 8 and GnuTLSOCSPFailureTimeout \* 2*\ |
---|
729 | Context: server config, virtual host |
---|
730 | |
---|
731 | Refreshing the cached response before it expires hides short OCSP |
---|
732 | responder unavailability. See `GnuTLSOCSPAutoRefresh` for how this |
---|
733 | value is used, using at least twice `GnuTLSOCSPFailureTimeout` is |
---|
734 | recommended. |
---|
735 | |
---|
736 | ### GnuTLSOCSPSocketTimeout |
---|
737 | |
---|
738 | Timeout for TCP sockets used to send OCSP requests |
---|
739 | |
---|
740 | GnuTLSOCSPFailureTimeout SECONDS |
---|
741 | |
---|
742 | Default: *6*\ |
---|
743 | Context: server config, virtual host |
---|
744 | |
---|
745 | Stalled OCSP requests must time out after a while to prevent stalling |
---|
746 | the server too much. However, if the timeout is too short requests may |
---|
747 | fail with a slow OCSP responder or high latency network |
---|
748 | connection. This parameter allows you to adjust the timeout if |
---|
749 | necessary. |
---|
750 | |
---|
751 | Note that this is not an upper limit for the completion of an OCSP |
---|
752 | request but a socket timeout. The connection will time out if there is |
---|
753 | no activity (successful send or receive) at all for the configured |
---|
754 | time. |
---|
755 | |
---|
756 | * * * * * |
---|
757 | |
---|
758 | Configuration Examples |
---|
759 | ====================== |
---|
760 | |
---|
761 | Minimal Example |
---|
762 | --------------- |
---|
763 | |
---|
764 | A minimal server configuration using mod_gnutls might look like this |
---|
765 | (other than the default setup): |
---|
766 | |
---|
767 | ```apache |
---|
768 | # Load mod_gnutls into Apache. |
---|
769 | LoadModule gnutls_module modules/mod_gnutls.so |
---|
770 | |
---|
771 | Listen 192.0.2.1:443 |
---|
772 | |
---|
773 | <VirtualHost _default_:443> |
---|
774 | # Standard virtual host stuff |
---|
775 | DocumentRoot /www/site1.example.com/html |
---|
776 | ServerName site1.example.com:443 |
---|
777 | |
---|
778 | # Minimal mod_gnutls setup: enable, and set credentials |
---|
779 | GnuTLSEnable on |
---|
780 | GnuTLSCertificateFile conf/tls/site1_cert_chain.pem |
---|
781 | GnuTLSKeyFile conf/tls/site1_key.pem |
---|
782 | </VirtualHost> |
---|
783 | ``` |
---|
784 | |
---|
785 | This gives you an HTTPS site using the GnuTLS `NORMAL` set of |
---|
786 | ciphersuites. OCSP stapling will be enabled if the server certificate |
---|
787 | contains an OCSP URI, `conf/tls/site1_cert_chain.pem` contains the |
---|
788 | issuer certificate in addition to the server's, and |
---|
789 | [mod\_socache\_shmcb](http://httpd.apache.org/docs/current/en/mod/mod_socache_shmcb.html) |
---|
790 | is loaded. With Gnutls 3.6.4 or newer session tickets are enabled, |
---|
791 | too. |
---|
792 | |
---|
793 | Virtual Hosts with Server Name Indication |
---|
794 | ----------------------------------------- |
---|
795 | |
---|
796 | `mod_gnutls` supports Server Name Indication (SNI), as specified in |
---|
797 | [RFC 6066, Section 3](https://tools.ietf.org/html/rfc6066#section-3). |
---|
798 | This allows hosting many TLS websites with a single IP address, you |
---|
799 | can just add virtual host configurations. All recent browsers support |
---|
800 | this standard. Here is an example using SNI: |
---|
801 | |
---|
802 | ```apache |
---|
803 | # Load the module into Apache. |
---|
804 | LoadModule gnutls_module modules/mod_gnutls.so |
---|
805 | # This example server uses session tickets, no cache. |
---|
806 | GnuTLSSessionTickets on |
---|
807 | |
---|
808 | # SNI allows hosting multiple sites using one IP address. This |
---|
809 | # could also be 'Listen *:443', just like '*:80' is common for |
---|
810 | # non-HTTPS |
---|
811 | Listen 198.51.100.1:443 |
---|
812 | |
---|
813 | <VirtualHost _default_:443> |
---|
814 | GnuTLSEnable on |
---|
815 | DocumentRoot /www/site1.example.com/html |
---|
816 | ServerName site1.example.com:443 |
---|
817 | GnuTLSCertificateFile conf/tls/site1.crt |
---|
818 | GnuTLSKeyFile conf/tls/site1.key |
---|
819 | </VirtualHost> |
---|
820 | |
---|
821 | <VirtualHost _default_:443> |
---|
822 | GnuTLSEnable on |
---|
823 | DocumentRoot /www/site2.example.com/html |
---|
824 | ServerName site2.example.com:443 |
---|
825 | GnuTLSCertificateFile conf/tls/site2.crt |
---|
826 | GnuTLSKeyFile conf/tls/site2.key |
---|
827 | </VirtualHost> |
---|
828 | |
---|
829 | <VirtualHost _default_:443> |
---|
830 | GnuTLSEnable on |
---|
831 | DocumentRoot /www/site3.example.com/html |
---|
832 | ServerName site3.example.com:443 |
---|
833 | GnuTLSCertificateFile conf/tls/site3.crt |
---|
834 | GnuTLSKeyFile conf/tls/site3.key |
---|
835 | # Enable HTTP/2 |
---|
836 | Protocols h2 http/1.1 |
---|
837 | </VirtualHost> |
---|
838 | ``` |
---|
839 | |
---|
840 | Virtual Hosts without SNI |
---|
841 | ------------------------- |
---|
842 | |
---|
843 | If you need to support clients that do not use SNI, you have to use a |
---|
844 | unique IP address/port combination for each virtual host. In this |
---|
845 | example all virtual hosts use the default port for HTTPS (443) and |
---|
846 | different IP addresses. |
---|
847 | |
---|
848 | ```apache |
---|
849 | # Load the module into Apache. |
---|
850 | LoadModule gnutls_module modules/mod_gnutls.so |
---|
851 | # This example server uses a session cache. |
---|
852 | GnuTLSCache dbm:/var/cache/www-tls-cache |
---|
853 | GnuTLSCacheTimeout 1200 |
---|
854 | |
---|
855 | # Without SNI you need one IP Address per site. The IP addresses |
---|
856 | # are listed separately for clarity, you could also use "Listen 443" |
---|
857 | # to use that port on all available IP addresses. |
---|
858 | Listen 192.0.2.1:443 |
---|
859 | Listen 192.0.2.2:443 |
---|
860 | Listen 192.0.2.3:443 |
---|
861 | |
---|
862 | <VirtualHost 192.0.2.1:443> |
---|
863 | GnuTLSEnable on |
---|
864 | GnuTLSPriorities SECURE128 |
---|
865 | DocumentRoot /www/site1.example.com/html |
---|
866 | ServerName site1.example.com:443 |
---|
867 | GnuTLSCertificateFile conf/tls/site1.crt |
---|
868 | GnuTLSKeyFile conf/tls/site1.key |
---|
869 | </VirtualHost> |
---|
870 | |
---|
871 | <VirtualHost 192.0.2.2:443> |
---|
872 | # This virtual host enables SRP authentication |
---|
873 | GnuTLSEnable on |
---|
874 | GnuTLSPriorities NORMAL:+SRP |
---|
875 | DocumentRoot /www/site2.example.com/html |
---|
876 | ServerName site2.example.com:443 |
---|
877 | GnuTLSSRPPasswdFile conf/tls/tpasswd.site2 |
---|
878 | GnuTLSSRPPasswdConfFile conf/tls/tpasswd.site2.conf |
---|
879 | </VirtualHost> |
---|
880 | |
---|
881 | <VirtualHost 192.0.2.3:443> |
---|
882 | # This server enables SRP and X.509 authentication. |
---|
883 | GnuTLSEnable on |
---|
884 | GnuTLSPriorities NORMAL:+SRP:+SRP-RSA:+SRP-DSS |
---|
885 | DocumentRoot /www/site3.example.com/html |
---|
886 | ServerName site3.example.com:443 |
---|
887 | GnuTLSCertificateFile conf/tls/site3.crt |
---|
888 | GnuTLSKeyFile conf/tls/site3.key |
---|
889 | GnuTLSSRPPasswdFile conf/tls/tpasswd.site3 |
---|
890 | GnuTLSSRPPasswdConfFile conf/tls/tpasswd.site3.conf |
---|
891 | </VirtualHost> |
---|
892 | ``` |
---|
893 | |
---|
894 | OCSP Stapling Example |
---|
895 | --------------------- |
---|
896 | |
---|
897 | This is an example with a customized OCSP stapling configuration. What |
---|
898 | is a resonable cache timeout varies depending on how long your CA's |
---|
899 | OCSP responses are valid. Some CAs provide responses that are valid |
---|
900 | for multiple days, in that case timeout and fuzz time could be |
---|
901 | significantly larger. |
---|
902 | |
---|
903 | ```apache |
---|
904 | # Load the module into Apache. |
---|
905 | LoadModule gnutls_module modules/mod_gnutls.so |
---|
906 | # A 64K cache is more than enough for one response |
---|
907 | GnuTLSOCSPCache shmcb:ocsp_cache(65536) |
---|
908 | |
---|
909 | Listen 192.0.2.1:443 |
---|
910 | |
---|
911 | <VirtualHost _default_:443> |
---|
912 | GnuTLSEnable On |
---|
913 | DocumentRoot /www/site1.example.com/html |
---|
914 | ServerName site1.example.com:443 |
---|
915 | GnuTLSCertificateFile conf/tls/site1_cert_chain.pem |
---|
916 | GnuTLSKeyFile conf/tls/site1_key.pem |
---|
917 | GnuTLSOCSPStapling On |
---|
918 | # The cached OCSP response is kept for up to 4 hours, |
---|
919 | # with updates scheduled every 3 to 3.5 hours. |
---|
920 | GnuTLSOCSPCacheTimeout 21600 |
---|
921 | GnuTLSOCSPFuzzTime 3600 |
---|
922 | </VirtualHost> |
---|
923 | ``` |
---|
924 | |
---|
925 | * * * * * |
---|
926 | |
---|
927 | Environment Variables |
---|
928 | ===================== |
---|
929 | |
---|
930 | `mod_gnutls` exports the following environment variables to scripts. |
---|
931 | These are compatible with `mod_ssl`. |
---|
932 | |
---|
933 | `HTTPS` |
---|
934 | ------- |
---|
935 | |
---|
936 | Can be `on` or `off` |
---|
937 | |
---|
938 | `SSL_VERSION_LIBRARY` |
---|
939 | --------------------- |
---|
940 | |
---|
941 | The version of the GnuTLS library |
---|
942 | |
---|
943 | `SSL_VERSION_INTERFACE` |
---|
944 | ----------------------- |
---|
945 | |
---|
946 | The version of this module |
---|
947 | |
---|
948 | `SSL_PROTOCOL` |
---|
949 | -------------- |
---|
950 | |
---|
951 | The SSL or TLS protocol name (such as `TLS 1.0` etc.) |
---|
952 | |
---|
953 | `SSL_CIPHER` |
---|
954 | ------------ |
---|
955 | |
---|
956 | The SSL or TLS cipher suite name |
---|
957 | |
---|
958 | `SSL_COMPRESS_METHOD` |
---|
959 | --------------------- |
---|
960 | |
---|
961 | The negotiated compression method (`NULL` or `DEFLATE`) |
---|
962 | |
---|
963 | `SSL_SRP_USER` |
---|
964 | -------------- |
---|
965 | |
---|
966 | The SRP username used for authentication (only set when |
---|
967 | `GnuTLSSRPPasswdFile` and `GnuTLSSRPPasswdConfFile` are configured). |
---|
968 | |
---|
969 | `SSL_CIPHER_USEKEYSIZE` & `SSL_CIPHER_ALGKEYSIZE` |
---|
970 | ------------------------------------------------- |
---|
971 | |
---|
972 | The number if bits used in the used cipher algorithm. |
---|
973 | |
---|
974 | This does not fully reflect the security level since the size of |
---|
975 | RSA or DHE key exchange parameters affect the security level too. |
---|
976 | |
---|
977 | `SSL_DH_PRIME_BITS` |
---|
978 | ------------------- |
---|
979 | |
---|
980 | The number if bits in the modulus for the DH group, if DHE or static |
---|
981 | DH is used. |
---|
982 | |
---|
983 | This will not be set if DH is not used. |
---|
984 | |
---|
985 | `SSL_CIPHER_EXPORT` |
---|
986 | ------------------- |
---|
987 | |
---|
988 | `True` or `False`. Whether the cipher suite negotiated is an export one. |
---|
989 | |
---|
990 | `SSL_SESSION_ID` |
---|
991 | ---------------- |
---|
992 | |
---|
993 | The session ID negotiated in this session. Can be the same during client |
---|
994 | reloads. |
---|
995 | |
---|
996 | `SSL_CLIENT_VERIFY` |
---|
997 | ------------------- |
---|
998 | |
---|
999 | Verification status of the client's certificate, if any. May be |
---|
1000 | `SUCCESS`, `FAILED` or `NONE`. See |
---|
1001 | [`GnuTLSClientVerify`](#gnutlsclientverify). |
---|
1002 | |
---|
1003 | `SSL_CLIENT_V_REMAIN` |
---|
1004 | --------------------- |
---|
1005 | |
---|
1006 | The number of days until the client's certificate is expired. |
---|
1007 | |
---|
1008 | `SSL_CLIENT_V_START` |
---|
1009 | -------------------- |
---|
1010 | |
---|
1011 | The activation time of client's certificate. |
---|
1012 | |
---|
1013 | `SSL_CLIENT_V_END` |
---|
1014 | ------------------ |
---|
1015 | |
---|
1016 | The expiration time of client's certificate. |
---|
1017 | |
---|
1018 | `SSL_CLIENT_S_DN` |
---|
1019 | ----------------- |
---|
1020 | |
---|
1021 | The distinguished name of client's certificate in RFC2253 format. |
---|
1022 | |
---|
1023 | `SSL_CLIENT_I_DN` |
---|
1024 | ----------------- |
---|
1025 | |
---|
1026 | The distinguished name of the issuer of the client's certificate in |
---|
1027 | RFC2253 format. |
---|
1028 | |
---|
1029 | `SSL_CLIENT_S_AN%` |
---|
1030 | ------------------ |
---|
1031 | |
---|
1032 | These will contain the alternative names of the client certificate (`%` is |
---|
1033 | a number starting from zero). |
---|
1034 | |
---|
1035 | The values will be prepended by `DNSNAME:`, `RFC822NAME:` or `URI:` |
---|
1036 | depending on the type. |
---|
1037 | |
---|
1038 | If it is not supported the value `UNSUPPORTED` will be set. |
---|
1039 | |
---|
1040 | `SSL_SERVER_M_SERIAL` |
---|
1041 | --------------------- |
---|
1042 | |
---|
1043 | The serial number of the server's certificate. |
---|
1044 | |
---|
1045 | `SSL_SERVER_M_VERSION` |
---|
1046 | ---------------------- |
---|
1047 | |
---|
1048 | The version of the server's certificate. |
---|
1049 | |
---|
1050 | `SSL_SERVER_A_SIG` |
---|
1051 | ------------------ |
---|
1052 | |
---|
1053 | The algorithm used for the signature in server's certificate. |
---|
1054 | |
---|
1055 | `SSL_SERVER_A_KEY` |
---|
1056 | ------------------ |
---|
1057 | |
---|
1058 | The public key algorithm in server's certificate. |
---|
1059 | |
---|
1060 | `SSL_SERVER_CERT` |
---|
1061 | ------------------ |
---|
1062 | |
---|
1063 | The PEM-encoded (X.509) server certificate (see the |
---|
1064 | `GnuTLSExportCertificates` directive). |
---|
1065 | |
---|
1066 | `SSL_SERVER_CERT_TYPE` |
---|
1067 | ---------------------- |
---|
1068 | |
---|
1069 | The certificate type will be `X.509`. |
---|
1070 | |
---|
1071 | `SSL_CLIENT_CERT` |
---|
1072 | ------------------ |
---|
1073 | |
---|
1074 | PEM-encoded (X.509) client certificate, if any (see the |
---|
1075 | `GnuTLSExportCertificates` directive). |
---|
1076 | |
---|
1077 | `SSL_CLIENT_CERT_TYPE` |
---|
1078 | ---------------------- |
---|
1079 | |
---|
1080 | The certificate type will be `X.509`, if any. |
---|