Apache HTTPD
ssl_private.h
Go to the documentation of this file.
1/* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements. See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef SSL_PRIVATE_H
18#define SSL_PRIVATE_H
19
30#include "ap_config.h"
31#include "httpd.h"
32#include "http_config.h"
33#include "http_core.h"
34#include "http_log.h"
35#include "http_main.h"
36#include "http_connection.h"
37#include "http_request.h"
38#include "http_protocol.h"
39#include "http_ssl.h"
40#include "http_vhost.h"
41#include "util_script.h"
42#include "util_filter.h"
43#include "util_ebcdic.h"
44#include "util_mutex.h"
45#include "apr.h"
46#include "apr_strings.h"
47#define APR_WANT_STRFUNC
48#define APR_WANT_MEMFUNC
49#include "apr_want.h"
50#include "apr_tables.h"
51#include "apr_lib.h"
52#include "apr_fnmatch.h"
53#include "apr_strings.h"
54#include "apr_global_mutex.h"
55#include "apr_optional.h"
56#include "ap_socache.h"
57#include "mod_auth.h"
58
59/* The #ifdef macros are only defined AFTER including the above
60 * therefore we cannot include these system files at the top :-(
61 */
62#if APR_HAVE_STDLIB_H
63#include <stdlib.h>
64#endif
65#if APR_HAVE_SYS_TIME_H
66#include <sys/time.h>
67#endif
68#if APR_HAVE_UNISTD_H
69#include <unistd.h> /* needed for STDIN_FILENO et.al., at least on FreeBSD */
70#endif
71
72#ifndef FALSE
73#define FALSE 0
74#endif
75
76#ifndef TRUE
77#define TRUE !FALSE
78#endif
79
80#ifndef BOOL
81#define BOOL unsigned int
82#endif
83
84#include "ap_expr.h"
85
86/* keep first for compat API */
87#ifndef OPENSSL_API_COMPAT
88#define OPENSSL_API_COMPAT 0x10101000 /* for ENGINE_ API */
89#endif
90#include "mod_ssl_openssl.h"
91
92/* OpenSSL headers */
93#include <openssl/err.h>
94#include <openssl/x509.h>
95#include <openssl/pem.h>
96#include <openssl/crypto.h>
97#include <openssl/evp.h>
98#include <openssl/rand.h>
99#include <openssl/x509v3.h>
100#include <openssl/x509_vfy.h>
101#include <openssl/ocsp.h>
102#include <openssl/dh.h>
103#if OPENSSL_VERSION_NUMBER >= 0x30000000
104#include <openssl/core_names.h>
105#endif
106
107/* Avoid tripping over an engine build installed globally and detected
108 * when the user points at an explicit non-engine flavor of OpenSSL
109 */
110#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ENGINE_INIT) \
111 && (OPENSSL_VERSION_NUMBER < 0x30000000 \
112 || (defined(OPENSSL_API_LEVEL) && OPENSSL_API_LEVEL < 30000)) \
113 && !defined(OPENSSL_NO_ENGINE)
114#include <openssl/engine.h>
115#define MODSSL_HAVE_ENGINE_API 1
116#endif
117#ifndef MODSSL_HAVE_ENGINE_API
118#define MODSSL_HAVE_ENGINE_API 0
119#endif
120
121/* Use OpenSSL 3.x STORE for loading URI keys and certificates starting with
122 * OpenSSL 3.0
123 */
124#if OPENSSL_VERSION_NUMBER >= 0x30000000
125#define MODSSL_HAVE_OPENSSL_STORE 1
126#else
127#define MODSSL_HAVE_OPENSSL_STORE 0
128#endif
129
130#if (OPENSSL_VERSION_NUMBER < 0x0090801f)
131#error mod_ssl requires OpenSSL 0.9.8a or later
132#endif
133
140#if (OPENSSL_VERSION_NUMBER >= 0x10000000)
141#define MODSSL_SSL_CIPHER_CONST const
142#define MODSSL_SSL_METHOD_CONST const
143#else
144#define MODSSL_SSL_CIPHER_CONST
145#define MODSSL_SSL_METHOD_CONST
146#endif
147
148#if defined(LIBRESSL_VERSION_NUMBER)
149/* Missing from LibreSSL */
150#if LIBRESSL_VERSION_NUMBER < 0x2060000f
151#define SSL_CTRL_SET_MIN_PROTO_VERSION 123
152#define SSL_CTRL_SET_MAX_PROTO_VERSION 124
153#define SSL_CTX_set_min_proto_version(ctx, version) \
154 SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL)
155#define SSL_CTX_set_max_proto_version(ctx, version) \
156 SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MAX_PROTO_VERSION, version, NULL)
157#endif /* LIBRESSL_VERSION_NUMBER < 0x2060000f */
158/* LibreSSL before 2.7 declares OPENSSL_VERSION_NUMBER == 2.0 but does not
159 * include most changes from OpenSSL >= 1.1 (new functions, macros,
160 * deprecations, ...), so we have to work around this...
161 */
162#if LIBRESSL_VERSION_NUMBER < 0x2070000f
163#define MODSSL_USE_OPENSSL_PRE_1_1_API 1
164#else
165#define MODSSL_USE_OPENSSL_PRE_1_1_API 0
166#endif
167#else /* defined(LIBRESSL_VERSION_NUMBER) */
168#if OPENSSL_VERSION_NUMBER < 0x10100000L
169#define MODSSL_USE_OPENSSL_PRE_1_1_API 1
170#else
171#define MODSSL_USE_OPENSSL_PRE_1_1_API 0
172#endif
173#endif /* defined(LIBRESSL_VERSION_NUMBER) */
174
175#if defined(OPENSSL_FIPS) || OPENSSL_VERSION_NUMBER >= 0x30000000L
176#define HAVE_FIPS
177#endif
178
179#if defined(SSL_OP_NO_TLSv1_2)
180#define HAVE_TLSV1_X
181#endif
182
183#if defined(SSL_CONF_FLAG_FILE)
184#define HAVE_SSL_CONF_CMD
185#endif
186
187/* session id constness */
188#if MODSSL_USE_OPENSSL_PRE_1_1_API
189#define IDCONST
190#else
191#define IDCONST const
192#endif
193
198#if !defined(OPENSSL_NO_TLSEXT) && defined(SSL_set_tlsext_host_name)
199
200#define HAVE_TLSEXT
201
202/* ECC: make sure we have at least 1.0.0 */
203#if !defined(OPENSSL_NO_EC) && defined(TLSEXT_ECPOINTFORMAT_uncompressed)
204#define HAVE_ECC
205#endif
206
207/* OCSP stapling */
208#if !defined(OPENSSL_NO_OCSP) && defined(SSL_CTX_set_tlsext_status_cb)
209#define HAVE_OCSP_STAPLING
210/* All exist but are no longer macros since OpenSSL 1.1.0 */
211#if OPENSSL_VERSION_NUMBER < 0x10100000L
212/* backward compatibility with OpenSSL < 1.0 */
213#ifndef sk_OPENSSL_STRING_num
214#define sk_OPENSSL_STRING_num sk_num
215#endif
216#ifndef sk_OPENSSL_STRING_value
217#define sk_OPENSSL_STRING_value sk_value
218#endif
219#ifndef sk_OPENSSL_STRING_pop
220#define sk_OPENSSL_STRING_pop sk_pop
221#endif
222#endif /* if OPENSSL_VERSION_NUMBER < 0x10100000L */
223#endif /* if !defined(OPENSSL_NO_OCSP) && defined(SSL_CTX_set_tlsext_status_cb) */
224
225/* TLS session tickets */
226#if defined(SSL_CTX_set_tlsext_ticket_key_cb)
227#define HAVE_TLS_SESSION_TICKETS
228#define TLSEXT_TICKET_KEY_LEN 48
229#ifndef tlsext_tick_md
230#ifdef OPENSSL_NO_SHA256
231#define tlsext_tick_md EVP_sha1
232#else
233#define tlsext_tick_md EVP_sha256
234#endif
235#endif
236#endif
237
238/* Secure Remote Password */
239#if !defined(OPENSSL_NO_SRP) \
240 && (OPENSSL_VERSION_NUMBER < 0x30000000L \
241 || (defined(OPENSSL_API_LEVEL) && OPENSSL_API_LEVEL < 30000)) \
242 && defined(SSL_CTRL_SET_TLS_EXT_SRP_USERNAME_CB)
243#define HAVE_SRP
244#include <openssl/srp.h>
245#endif
246
247/* ALPN Protocol Negotiation */
248#if defined(TLSEXT_TYPE_application_layer_protocol_negotiation)
249#define HAVE_TLS_ALPN
250#endif
251
252#endif /* !defined(OPENSSL_NO_TLSEXT) && defined(SSL_set_tlsext_host_name) */
253
254#if MODSSL_USE_OPENSSL_PRE_1_1_API
255#define BN_get_rfc2409_prime_768 get_rfc2409_prime_768
256#define BN_get_rfc2409_prime_1024 get_rfc2409_prime_1024
257#define BN_get_rfc3526_prime_1536 get_rfc3526_prime_1536
258#define BN_get_rfc3526_prime_2048 get_rfc3526_prime_2048
259#define BN_get_rfc3526_prime_3072 get_rfc3526_prime_3072
260#define BN_get_rfc3526_prime_4096 get_rfc3526_prime_4096
261#define BN_get_rfc3526_prime_6144 get_rfc3526_prime_6144
262#define BN_get_rfc3526_prime_8192 get_rfc3526_prime_8192
263#define BIO_set_init(x,v) (x->init=v)
264#define BIO_get_data(x) (x->ptr)
265#define BIO_set_data(x,v) (x->ptr=v)
266#define BIO_get_shutdown(x) (x->shutdown)
267#define BIO_set_shutdown(x,v) (x->shutdown=v)
268#define DH_bits(x) (BN_num_bits(x->p))
269#else
270void init_bio_methods(void);
271void free_bio_methods(void);
272#endif
273
274#if OPENSSL_VERSION_NUMBER < 0x10002000L || \
275 (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000f)
276#define X509_STORE_CTX_get0_store(x) (x->ctx)
277#endif
278
279#if OPENSSL_VERSION_NUMBER < 0x10000000L
280#ifndef X509_STORE_CTX_get0_current_issuer
281#define X509_STORE_CTX_get0_current_issuer(x) (x->current_issuer)
282#endif
283#endif
284
285/* those may be deprecated */
286#ifndef X509_get_notBefore
287#define X509_get_notBefore X509_getm_notBefore
288#endif
289#ifndef X509_get_notAfter
290#define X509_get_notAfter X509_getm_notAfter
291#endif
292
293#if OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined(LIBRESSL_VERSION_NUMBER)
294#define HAVE_OPENSSL_KEYLOG
295#endif
296
297#ifdef HAVE_FIPS
298#if OPENSSL_VERSION_NUMBER >= 0x30000000L
299#define modssl_fips_is_enabled() EVP_default_properties_is_fips_enabled(NULL)
300#define modssl_fips_enable(to) EVP_default_properties_enable_fips(NULL, (to))
301#else
302#define modssl_fips_is_enabled() FIPS_mode()
303#define modssl_fips_enable(to) FIPS_mode_set((to))
304#endif
305#endif /* HAVE_FIPS */
306
307/* mod_ssl headers */
308#include "ssl_util_ssl.h"
309
311
312/*
313 * Provide reasonable default for some defines
314 */
315#ifndef PFALSE
316#define PFALSE ((void *)FALSE)
317#endif
318#ifndef PTRUE
319#define PTRUE ((void *)TRUE)
320#endif
321#ifndef UNSET
322#define UNSET (-1)
323#endif
324#ifndef NUL
325#define NUL '\0'
326#endif
327#ifndef RAND_MAX
328#include <limits.h>
329#define RAND_MAX INT_MAX
330#endif
331
335#ifndef UCHAR
336#define UCHAR unsigned char
337#endif
338
342#define strEQ(s1,s2) (strcmp(s1,s2) == 0)
343#define strNE(s1,s2) (strcmp(s1,s2) != 0)
344#define strEQn(s1,s2,n) (strncmp(s1,s2,n) == 0)
345#define strNEn(s1,s2,n) (strncmp(s1,s2,n) != 0)
346
347#define strcEQ(s1,s2) (strcasecmp(s1,s2) == 0)
348#define strcNE(s1,s2) (strcasecmp(s1,s2) != 0)
349#define strcEQn(s1,s2,n) (strncasecmp(s1,s2,n) == 0)
350#define strcNEn(s1,s2,n) (strncasecmp(s1,s2,n) != 0)
351
352#define strIsEmpty(s) (s == NULL || s[0] == NUL)
353
354#define myConnConfig(c) \
355 ((SSLConnRec *)ap_get_module_config(c->conn_config, &ssl_module))
356#define myConnConfigSet(c, val) \
357 ap_set_module_config(c->conn_config, &ssl_module, val)
358#define mySrvConfig(srv) \
359 ((SSLSrvConfigRec *)ap_get_module_config(srv->module_config, &ssl_module))
360#define myDirConfig(req) \
361 ((SSLDirConfigRec *)ap_get_module_config(req->per_dir_config, &ssl_module))
362#define myConnCtxConfig(c, sc) \
363 (c->outgoing ? myConnConfig(c)->dc->proxy : sc->server)
364#define myModConfig(srv) mySrvConfig((srv))->mc
365#define mySrvFromConn(c) myConnConfig(c)->server
366#define myDirConfigFromConn(c) myConnConfig(c)->dc
367#define mySrvConfigFromConn(c) mySrvConfig(mySrvFromConn(c))
368#define myModConfigFromConn(c) myModConfig(mySrvFromConn(c))
369
373#ifndef SSL_SESSION_CACHE_TIMEOUT
374#define SSL_SESSION_CACHE_TIMEOUT 300
375#endif
376
377/* Default setting for per-dir reneg buffer. */
378#ifndef DEFAULT_RENEG_BUFFER_SIZE
379#define DEFAULT_RENEG_BUFFER_SIZE (128 * 1024)
380#endif
381
382/* Default for OCSP response validity */
383#ifndef DEFAULT_OCSP_MAX_SKEW
384#define DEFAULT_OCSP_MAX_SKEW (60 * 5)
385#endif
386
387/* Default timeout for OCSP queries */
388#ifndef DEFAULT_OCSP_TIMEOUT
389#define DEFAULT_OCSP_TIMEOUT 10
390#endif
391
392/*
393 * For better backwards compatibility with the SSLCertificate[Key]File
394 * and SSLPassPhraseDialog ("exec" type) directives in 2.4.7 and earlier
395 */
396#ifdef HAVE_ECC
397#define CERTKEYS_IDX_MAX 2
398#else
399#define CERTKEYS_IDX_MAX 1
400#endif
401
405#define SSL_OPT_NONE (0)
406#define SSL_OPT_RELSET (1<<0)
407#define SSL_OPT_STDENVVARS (1<<1)
408#define SSL_OPT_EXPORTCERTDATA (1<<3)
409#define SSL_OPT_FAKEBASICAUTH (1<<4)
410#define SSL_OPT_STRICTREQUIRE (1<<5)
411#define SSL_OPT_OPTRENEGOTIATE (1<<6)
412#define SSL_OPT_LEGACYDNFORMAT (1<<7)
413typedef int ssl_opt_t;
414
418#define SSL_PROTOCOL_NONE (0)
419#ifndef OPENSSL_NO_SSL3
420#define SSL_PROTOCOL_SSLV3 (1<<1)
421#endif
422#define SSL_PROTOCOL_TLSV1 (1<<2)
423#ifndef OPENSSL_NO_SSL3
424#define SSL_PROTOCOL_BASIC (SSL_PROTOCOL_SSLV3|SSL_PROTOCOL_TLSV1)
425#else
426#define SSL_PROTOCOL_BASIC (SSL_PROTOCOL_TLSV1)
427#endif
428#ifdef HAVE_TLSV1_X
429#define SSL_PROTOCOL_TLSV1_1 (1<<3)
430#define SSL_PROTOCOL_TLSV1_2 (1<<4)
431#define SSL_PROTOCOL_TLSV1_3 (1<<5)
432
433#ifdef SSL_OP_NO_TLSv1_3
434#define SSL_HAVE_PROTOCOL_TLSV1_3 (1)
435#define SSL_PROTOCOL_ALL (SSL_PROTOCOL_BASIC| \
436 SSL_PROTOCOL_TLSV1_1|SSL_PROTOCOL_TLSV1_2|SSL_PROTOCOL_TLSV1_3)
437#else
438#define SSL_HAVE_PROTOCOL_TLSV1_3 (0)
439#define SSL_PROTOCOL_ALL (SSL_PROTOCOL_BASIC| \
440 SSL_PROTOCOL_TLSV1_1|SSL_PROTOCOL_TLSV1_2)
441#endif
442#else
443#define SSL_PROTOCOL_ALL (SSL_PROTOCOL_BASIC)
444#endif
445#ifndef OPENSSL_NO_SSL3
446#define SSL_PROTOCOL_DEFAULT (SSL_PROTOCOL_ALL & ~SSL_PROTOCOL_SSLV3)
447#else
448#define SSL_PROTOCOL_DEFAULT (SSL_PROTOCOL_ALL)
449#endif
450typedef int ssl_proto_t;
451
462
463#define SSL_VERIFY_PEER_STRICT \
464 (SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT)
465
466#define ssl_verify_error_is_optional(errnum) \
467 ((errnum == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT) \
468 || (errnum == X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN) \
469 || (errnum == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY) \
470 || (errnum == X509_V_ERR_CERT_UNTRUSTED) \
471 || (errnum == X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE))
472
484
494
504
508#define SSL_PCM_EXISTS 1
509#define SSL_PCM_ISREG 2
510#define SSL_PCM_ISDIR 4
511#define SSL_PCM_ISNONZERO 8
512typedef unsigned int ssl_pathcheck_t;
513
523
527typedef struct {
528 const char *cpExpr;
531
551
555typedef struct {
556 long int nData;
557 unsigned char *cpData;
559} ssl_asn1_t;
560
561typedef enum {
562 RENEG_INIT = 0, /* Before initial handshake */
563 RENEG_REJECT, /* After initial handshake; any client-initiated
564 * renegotiation should be rejected */
565 RENEG_ALLOW, /* A server-initiated renegotiation is taking
566 * place (as dictated by configuration) */
567 RENEG_ABORT /* Renegotiation initiated by client, abort the
568 * connection */
570
578
585
586typedef struct {
588 const char *client_dn;
591 const char *verify_info;
592 const char *verify_error;
595 enum {
596 NON_SSL_OK = 0, /* is SSL request, or error handling completed */
597 NON_SSL_SEND_REQLINE, /* Need to send the fake request line */
598 NON_SSL_SEND_HDR_SEP, /* Need to send the header separator */
599 NON_SSL_SET_ERROR_MSG /* Need to set the error message */
600 } non_ssl_request;
601
602#ifndef SSL_OP_NO_RENEGOTIATION
603 /* For OpenSSL < 1.1.1, track the handshake/renegotiation state
604 * for the connection to block client-initiated renegotiations.
605 * For OpenSSL >=1.1.1, the SSL_OP_NO_RENEGOTIATION flag is used in
606 * the SSL * options state with equivalent effect. */
608#endif
609
612
613 const char *cipher_suite; /* cipher suite used in last reneg */
614 int service_unavailable; /* thouugh we negotiate SSL, no requests will be served */
615 int vhost_found; /* whether we found vhost from SNI already */
616} SSLConnRec;
617
618/* BIG FAT WARNING: SSLModConfigRec has unusual memory lifetime: it is
619 * allocated out of the "process" pool and only a single such
620 * structure is created and used for the lifetime of the process.
621 * (The process pool is s->process->pool and is stored in the .pPool
622 * field.) Most members of this structure are likewise allocated out
623 * of the process pool, but notably sesscache and sesscache_context
624 * are not.
625 *
626 * The structure is treated as mostly immutable after a single config
627 * parse has completed; the post_config hook (ssl_init_Module) flips
628 * the bFixed flag to true and subsequent invocations of the config
629 * callbacks hence do nothing.
630 *
631 * This odd lifetime strategy is used so that encrypted private keys
632 * can be decrypted once at startup and continue to be used across
633 * subsequent server reloads where the interactive password prompt is
634 * not possible.
635
636 * It is really an ABI nightmare waiting to happen since DSOs are
637 * reloaded across restarts, and nothing prevents the struct type
638 * changing across such reloads, yet the cached structure will be
639 * assumed to match regardless.
640 *
641 * This should really be fixed using a smaller structure which only
642 * stores that which is absolutely necessary (the private keys, maybe
643 * the random seed), and have that structure be strictly ABI-versioned
644 * for safety.
645 */
646typedef struct {
650
651 /* OpenSSL SSL_SESS_CACHE_* flags: */
653
654 /* The configured provider, and associated private data
655 * structure. */
658
662
663 /* A hash table of pointers to ssl_asn1_t structures. The structures
664 * are used to store private keys in raw DER format (serialized OpenSSL
665 * PrivateKey structures). The table is indexed by (vhost-id,
666 * index), for example the string "vhost.example.com:443:0". */
668
669 const char *szCryptoDevice; /* ENGINE device (if available) */
670
671#ifdef HAVE_OCSP_STAPLING
676#endif
677#ifdef HAVE_OPENSSL_KEYLOG
678 /* Used for logging if SSLKEYLOGFILE is set at startup. */
680#endif
681
682#ifdef HAVE_FIPS
683 BOOL fips;
684#endif
686
689typedef struct {
690 /* Lists of configured certs and keys for this server */
693
696 const char *ca_name_path;
697 const char *ca_name_file;
698
699 /* TLS service for this server is suspended */
702
703typedef struct {
705 const char *cert_file;
706 const char *cert_path;
707 const char *ca_cert_file;
708 /* certs is a stack of configured cert, key pairs. */
710 /* ca_certs contains ONLY chain certs for each item in certs.
711 * ca_certs[n] is a pointer to the (STACK_OF(X509) *) stack which
712 * holds the cert chain for the 'n'th cert in the certs stack, or
713 * NULL if no chain is configured. */
714 STACK_OF(X509) **ca_certs;
716
718typedef struct {
720 const char *ca_cert_path;
721 const char *ca_cert_file;
722
723 const char *cipher_suite;
724
728
732 const char *tls13_ciphers;
734
735#ifdef HAVE_TLS_SESSION_TICKETS
736typedef struct {
737 const char *file_path;
738 unsigned char key_name[16];
739#if OPENSSL_VERSION_NUMBER < 0x30000000L
740 unsigned char hmac_secret[16];
741#else
743#endif
744 unsigned char aes_key[16];
746#endif
747
748#ifdef HAVE_SSL_CONF_CMD
749typedef struct {
750 const char *name;
751 const char *value;
753#endif
754
755typedef struct {
758
762
763#ifdef HAVE_TLS_SESSION_TICKETS
765#endif
766
769
773
774 const char *cert_chain;
775
777 const char *crl_path;
778 const char *crl_file;
780
781#ifdef HAVE_OCSP_STAPLING
791 const char *stapling_force_url;
792#endif
793
794#ifdef HAVE_SRP
795 char *srp_vfile;
798#endif
799
801
803 BOOL ocsp_force_default; /* true if the default responder URL is
804 * used regardless of per-cert URL */
805 const char *ocsp_responder; /* default responder URL */
811
812 BOOL ocsp_noverify; /* true if skipping OCSP certification verification like openssl -noverify */
813 /* Declare variables for using OCSP Responder Certs for OCSP verification */
814 int ocsp_verify_flags; /* Flags to use when verifying OCSP response */
815 const char *ocsp_certs_file; /* OCSP other certificates filename */
816 STACK_OF(X509) *ocsp_certs; /* OCSP other certificates */
817
818#ifdef HAVE_SSL_CONF_CMD
819 SSL_CONF_CTX *ssl_ctx_config; /* Configuration context */
820 apr_array_header_t *ssl_ctx_param; /* parameters to pass to SSL_CTX */
821#endif
822
827
845
867
873extern module AP_MODULE_DECLARE_DATA ssl_module;
874
880void *ssl_config_server_merge(apr_pool_t *, void *, void *);
881void *ssl_config_perdir_create(apr_pool_t *, char *);
882void *ssl_config_perdir_merge(apr_pool_t *, void *, void *);
885const char *ssl_cmd_SSLPassPhraseDialog(cmd_parms *, void *, const char *);
886const char *ssl_cmd_SSLCryptoDevice(cmd_parms *, void *, const char *);
887const char *ssl_cmd_SSLRandomSeed(cmd_parms *, void *, const char *, const char *, const char *);
888const char *ssl_cmd_SSLEngine(cmd_parms *, void *, const char *);
889const char *ssl_cmd_SSLCipherSuite(cmd_parms *, void *, const char *, const char *);
890const char *ssl_cmd_SSLCertificateFile(cmd_parms *, void *, const char *);
891const char *ssl_cmd_SSLCertificateKeyFile(cmd_parms *, void *, const char *);
892const char *ssl_cmd_SSLCertificateChainFile(cmd_parms *, void *, const char *);
893const char *ssl_cmd_SSLCACertificatePath(cmd_parms *, void *, const char *);
894const char *ssl_cmd_SSLCACertificateFile(cmd_parms *, void *, const char *);
895const char *ssl_cmd_SSLCADNRequestPath(cmd_parms *, void *, const char *);
896const char *ssl_cmd_SSLCADNRequestFile(cmd_parms *, void *, const char *);
897const char *ssl_cmd_SSLCARevocationPath(cmd_parms *, void *, const char *);
898const char *ssl_cmd_SSLCARevocationFile(cmd_parms *, void *, const char *);
899const char *ssl_cmd_SSLCARevocationCheck(cmd_parms *, void *, const char *);
900const char *ssl_cmd_SSLHonorCipherOrder(cmd_parms *cmd, void *dcfg, int flag);
901const char *ssl_cmd_SSLCompression(cmd_parms *, void *, int flag);
902const char *ssl_cmd_SSLSessionTickets(cmd_parms *, void *, int flag);
903const char *ssl_cmd_SSLVerifyClient(cmd_parms *, void *, const char *);
904const char *ssl_cmd_SSLVerifyDepth(cmd_parms *, void *, const char *);
905const char *ssl_cmd_SSLSessionCache(cmd_parms *, void *, const char *);
906const char *ssl_cmd_SSLSessionCacheTimeout(cmd_parms *, void *, const char *);
907const char *ssl_cmd_SSLProtocol(cmd_parms *, void *, const char *);
908const char *ssl_cmd_SSLOptions(cmd_parms *, void *, const char *);
909const char *ssl_cmd_SSLRequireSSL(cmd_parms *, void *);
910const char *ssl_cmd_SSLRequire(cmd_parms *, void *, const char *);
911const char *ssl_cmd_SSLUserName(cmd_parms *, void *, const char *);
912const char *ssl_cmd_SSLRenegBufferSize(cmd_parms *cmd, void *dcfg, const char *arg);
913const char *ssl_cmd_SSLStrictSNIVHostCheck(cmd_parms *cmd, void *dcfg, int flag);
914const char *ssl_cmd_SSLInsecureRenegotiation(cmd_parms *cmd, void *dcfg, int flag);
915
916const char *ssl_cmd_SSLProxyEngine(cmd_parms *cmd, void *dcfg, int flag);
917const char *ssl_cmd_SSLProxyProtocol(cmd_parms *, void *, const char *);
918const char *ssl_cmd_SSLProxyCipherSuite(cmd_parms *, void *, const char *, const char *);
919const char *ssl_cmd_SSLProxyVerify(cmd_parms *, void *, const char *);
920const char *ssl_cmd_SSLProxyVerifyDepth(cmd_parms *, void *, const char *);
921const char *ssl_cmd_SSLProxyCACertificatePath(cmd_parms *, void *, const char *);
922const char *ssl_cmd_SSLProxyCACertificateFile(cmd_parms *, void *, const char *);
923const char *ssl_cmd_SSLProxyCARevocationPath(cmd_parms *, void *, const char *);
924const char *ssl_cmd_SSLProxyCARevocationFile(cmd_parms *, void *, const char *);
925const char *ssl_cmd_SSLProxyCARevocationCheck(cmd_parms *, void *, const char *);
926const char *ssl_cmd_SSLProxyMachineCertificatePath(cmd_parms *, void *, const char *);
927const char *ssl_cmd_SSLProxyMachineCertificateFile(cmd_parms *, void *, const char *);
928const char *ssl_cmd_SSLProxyMachineCertificateChainFile(cmd_parms *, void *, const char *);
929#ifdef HAVE_TLS_SESSION_TICKETS
930const char *ssl_cmd_SSLSessionTicketKeyFile(cmd_parms *cmd, void *dcfg, const char *arg);
931#endif
932const char *ssl_cmd_SSLProxyCheckPeerExpire(cmd_parms *cmd, void *dcfg, int flag);
933const char *ssl_cmd_SSLProxyCheckPeerCN(cmd_parms *cmd, void *dcfg, int flag);
934const char *ssl_cmd_SSLProxyCheckPeerName(cmd_parms *cmd, void *dcfg, int flag);
935
936const char *ssl_cmd_SSLOCSPOverrideResponder(cmd_parms *cmd, void *dcfg, int flag);
937const char *ssl_cmd_SSLOCSPDefaultResponder(cmd_parms *cmd, void *dcfg, const char *arg);
938const char *ssl_cmd_SSLOCSPResponseTimeSkew(cmd_parms *cmd, void *dcfg, const char *arg);
939const char *ssl_cmd_SSLOCSPResponseMaxAge(cmd_parms *cmd, void *dcfg, const char *arg);
940const char *ssl_cmd_SSLOCSPResponderTimeout(cmd_parms *cmd, void *dcfg, const char *arg);
941const char *ssl_cmd_SSLOCSPUseRequestNonce(cmd_parms *cmd, void *dcfg, int flag);
942const char *ssl_cmd_SSLOCSPEnable(cmd_parms *cmd, void *dcfg, const char *arg);
943const char *ssl_cmd_SSLOCSPProxyURL(cmd_parms *cmd, void *dcfg, const char *arg);
944
945/* Declare OCSP Responder Certificate Verification Directive */
946const char *ssl_cmd_SSLOCSPNoVerify(cmd_parms *cmd, void *dcfg, int flag);
947/* Declare OCSP Responder Certificate File Directive */
948const char *ssl_cmd_SSLOCSPResponderCertificateFile(cmd_parms *cmd, void *dcfg, const char *arg);
949
950#ifdef HAVE_SSL_CONF_CMD
951const char *ssl_cmd_SSLOpenSSLConfCmd(cmd_parms *cmd, void *dcfg, const char *arg1, const char *arg2);
952#endif
953
954#ifdef HAVE_SRP
955const char *ssl_cmd_SSLSRPVerifierFile(cmd_parms *cmd, void *dcfg, const char *arg);
956const char *ssl_cmd_SSLSRPUnknownUserSeed(cmd_parms *cmd, void *dcfg, const char *arg);
957#endif
958
959const char *ssl_cmd_SSLFIPS(cmd_parms *cmd, void *dcfg, int flag);
960
968 apr_pool_t *ptemp, server_rec *s,
969 ap_conf_vector_t *section_config);
971 *ssl_init_FindCAList(server_rec *, apr_pool_t *, const char *, const char *);
974
983
987
989DH *ssl_callback_TmpDH(SSL *, int, int);
992int ssl_callback_proxy_cert(SSL *ssl, X509 **x509, EVP_PKEY **pkey);
994SSL_SESSION *ssl_callback_GetSessionCacheEntry(SSL *, IDCONST unsigned char *, int, int *);
996void ssl_callback_Info(const SSL *, int, int);
997#ifdef HAVE_TLSEXT
999#endif
1000#if OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined(LIBRESSL_VERSION_NUMBER)
1001int ssl_callback_ClientHello(SSL *, int *, void *);
1002#endif
1003#ifdef HAVE_TLS_SESSION_TICKETS
1005 unsigned char *keyname,
1006 unsigned char *iv,
1008#if OPENSSL_VERSION_NUMBER < 0x30000000L
1010#else
1012#endif
1013 int mode);
1014#endif
1015
1016#ifdef HAVE_TLS_ALPN
1017int ssl_callback_alpn_select(SSL *ssl, const unsigned char **out,
1018 unsigned char *outlen, const unsigned char *in,
1019 unsigned int inlen, void *arg);
1020#endif
1021
1030 apr_pool_t *);
1031
1033#ifdef HAVE_OCSP_STAPLING
1034const char *ssl_cmd_SSLStaplingCache(cmd_parms *, void *, const char *);
1035const char *ssl_cmd_SSLUseStapling(cmd_parms *, void *, int);
1036const char *ssl_cmd_SSLStaplingResponseTimeSkew(cmd_parms *, void *, const char *);
1037const char *ssl_cmd_SSLStaplingResponseMaxAge(cmd_parms *, void *, const char *);
1038const char *ssl_cmd_SSLStaplingStandardCacheTimeout(cmd_parms *, void *, const char *);
1039const char *ssl_cmd_SSLStaplingErrorCacheTimeout(cmd_parms *, void *, const char *);
1040const char *ssl_cmd_SSLStaplingReturnResponderErrors(cmd_parms *, void *, int);
1041const char *ssl_cmd_SSLStaplingFakeTryLater(cmd_parms *, void *, int);
1042const char *ssl_cmd_SSLStaplingResponderTimeout(cmd_parms *, void *, const char *);
1043const char *ssl_cmd_SSLStaplingForceURL(cmd_parms *, void *, const char *);
1047 modssl_ctx_t *, X509 *);
1048#endif
1049#ifdef HAVE_SRP
1050int ssl_callback_SRPServerParams(SSL *, int *, void *);
1051#endif
1052
1053#ifdef HAVE_OPENSSL_KEYLOG
1054/* Callback used with SSL_CTX_set_keylog_callback. */
1055void modssl_callback_keylog(const SSL *ssl, const char *line);
1056#endif
1057
1062
1063/* ssl_io_buffer_fill fills the setaside buffering of the HTTP request
1064 * to allow an SSL renegotiation to take place. */
1066
1069
1073 const char * const *);
1075char *ssl_util_readfilter(server_rec *, apr_pool_t *, const char *,
1076 const char * const *);
1078#if APR_HAS_THREADS && MODSSL_USE_OPENSSL_PRE_1_1_API
1081#endif
1083
1085
1088 const char *, apr_array_header_t **);
1089
1090/* Load public and/or private key from the configured ENGINE. Private
1091 * key returned as *pkey. certid can be NULL, in which case *pubkey
1092 * is not altered. Errors logged on failure. */
1094 apr_pool_t *pconf, apr_pool_t *ptemp,
1095 const char *vhostid,
1096 const char *certid, const char *keyid,
1098
1100#if OPENSSL_VERSION_NUMBER < 0x30000000L
1101DH *modssl_dh_from_file(const char *);
1102#else
1103EVP_PKEY *modssl_dh_pkey_from_file(const char *);
1104#endif
1105#ifdef HAVE_ECC
1106EC_GROUP *modssl_ec_group_from_file(const char *);
1107#endif
1108
1109/* Store the EVP_PKEY key (serialized into DER) in the hash table with
1110 * key, returning the ssl_asn1_t structure pointer. */
1111ssl_asn1_t *ssl_asn1_table_set(apr_hash_t *table, const char *key,
1112 EVP_PKEY *pkey);
1113/* Retrieve the ssl_asn1_t structure with given key from the hash. */
1114ssl_asn1_t *ssl_asn1_table_get(apr_hash_t *table, const char *key);
1115/* Remove and free the ssl_asn1_t structure with given key. */
1116void ssl_asn1_table_unset(apr_hash_t *table, const char *key);
1117
1123
1125
1126/* mutex type names for Mutex directive */
1127#define SSL_CACHE_MUTEX_TYPE "ssl-cache"
1128#define SSL_STAPLING_CACHE_MUTEX_TYPE "ssl-stapling"
1129#define SSL_STAPLING_REFRESH_MUTEX_TYPE "ssl-stapling-refresh"
1130
1132
1134void ssl_log_ssl_error(const char *, int, int, server_rec *);
1135
1136/* ssl_log_xerror, ssl_log_cxerror and ssl_log_rxerror are wrappers for the
1137 * respective ap_log_*error functions and take a certificate as an
1138 * additional argument (whose details are appended to the log message).
1139 * The other arguments are interpreted exactly as with their ap_log_*error
1140 * counterparts. */
1141void ssl_log_xerror(const char *file, int line, int level,
1143 X509 *cert, const char *format, ...)
1144 __attribute__((format(printf,8,9)));
1145
1146void ssl_log_cxerror(const char *file, int line, int level,
1148 const char *format, ...)
1149 __attribute__((format(printf,7,8)));
1150
1151void ssl_log_rxerror(const char *file, int line, int level,
1153 const char *format, ...)
1154 __attribute__((format(printf,7,8)));
1155
1156#define SSLLOG_MARK __FILE__,__LINE__
1157
1160/* Register variables for the lifetime of the process pool 'p'. */
1162char *ssl_var_lookup(apr_pool_t *, server_rec *, conn_rec *, request_rec *, char *);
1164
1166
1167/* Extract SSL_*_DN_* variables into table 't' from SSL object 'ssl',
1168 * allocating from 'p': */
1170
1171/* Extract SSL_*_SAN_* variables (subjectAltName entries) into table 't'
1172 * from SSL object 'ssl', allocating from 'p'. */
1174
1175#ifndef OPENSSL_NO_OCSP
1176/* Perform OCSP validation of the current cert in the given context.
1177 * Returns non-zero on success or zero on failure. On failure, the
1178 * context error code is set. */
1181
1182/* OCSP helper interface; dispatches the given OCSP request to the
1183 * responder at the given URI. Returns the decoded OCSP response
1184 * object, or NULL on error (in which case, errors will have been
1185 * logged). Pool 'p' is used for temporary allocations. */
1188 OCSP_REQUEST *request,
1189 conn_rec *c, apr_pool_t *p);
1190
1191/* Initialize OCSP trusted certificate list */
1193
1194#endif
1195
1196#if MODSSL_USE_OPENSSL_PRE_1_1_API
1197/* Retrieve DH parameters for given key length. Return value should
1198 * be treated as unmutable, since it is stored in process-global
1199 * memory. */
1200DH *modssl_get_dh_params(unsigned keylen);
1201#endif
1202
1203/* Returns non-zero if the request was made over SSL/TLS. If sslconn
1204 * is non-NULL and the request is using SSL/TLS, sets *sslconn to the
1205 * corresponding SSLConnRec structure for the connection. */
1207
1208int ssl_is_challenge(conn_rec *c, const char *servername,
1209 X509 **pcert, EVP_PKEY **pkey,
1210 const char **pcert_file, const char **pkey_file);
1211
1212/* Returns non-zero if the cert/key filename should be handled through
1213 * the configured ENGINE. */
1214int modssl_is_engine_id(const char *name);
1215
1216/* Set the renegotation state for connection. */
1218
1219#endif /* SSL_PRIVATE_H */
Symbol export macros and hook functions.
Expression parser.
Small object cache provider interface.
APR FNMatch Functions.
APR Global Locking Routines.
APR general purpose library routines.
APR-UTIL registration of functions exported by modules.
APR Strings library.
APR Table library.
APR Standard Headers Support.
static apr_pool_t * pconf
Definition event.c:441
#define APLOG_USE_MODULE(foo)
struct ap_conf_vector_t ap_conf_vector_t
request_rec * r
void const char * arg
Definition http_vhost.h:63
apr_brigade_flush void * ctx
apr_dbd_transaction_t int mode
Definition apr_dbd.h:261
apr_datum_t * pkey
Definition apr_dbm.h:158
const char * uri
Definition apr_uri.h:159
modssl_reneg_state
const char * ssl_cmd_SSLCADNRequestFile(cmd_parms *, void *, const char *)
const authz_provider ssl_authz_provider_require_ssl
int ssl_callback_NewSessionCacheEntry(SSL *, SSL_SESSION *)
const char * ssl_cmd_SSLProxyVerify(cmd_parms *, void *, const char *)
const char * ssl_cmd_SSLCACertificateFile(cmd_parms *, void *, const char *)
apr_status_t ssl_die(server_rec *)
DH * modssl_get_dh_params(unsigned keylen)
int modssl_request_is_tls(const request_rec *r, SSLConnRec **sslconn)
Definition ssl_util.c:103
void ssl_scache_kill(server_rec *)
Definition ssl_scache.c:97
int modssl_is_engine_id(const char *name)
Definition ssl_util.c:477
char * ssl_util_readfilter(server_rec *, apr_pool_t *, const char *, const char *const *)
Definition ssl_util.c:151
void ssl_log_xerror(const char *file, int line, int level, apr_status_t rv, apr_pool_t *p, server_rec *s, X509 *cert, const char *format,...) __attribute__((format(printf
apr_status_t ssl_init_CheckServers(server_rec *, apr_pool_t *)
const char * ssl_cmd_SSLOCSPResponseMaxAge(cmd_parms *cmd, void *dcfg, const char *arg)
const char * ssl_cmd_SSLCertificateFile(cmd_parms *, void *, const char *)
const char * ssl_cmd_SSLOCSPUseRequestNonce(cmd_parms *cmd, void *dcfg, int flag)
const char * ssl_cmd_SSLVerifyDepth(cmd_parms *, void *, const char *)
unsigned int ssl_util_path_check(ssl_pathcheck_t, const char *, apr_pool_t *)
Definition ssl_util.c:175
const char * ssl_cmd_SSLProxyCARevocationPath(cmd_parms *, void *, const char *)
ssl_ocspcheck_t
int ssl_hook_Fixup(request_rec *)
apr_status_t modssl_load_engine_keypair(server_rec *s, apr_pool_t *pconf, apr_pool_t *ptemp, const char *vhostid, const char *certid, const char *keyid, X509 **pubkey, EVP_PKEY **privkey)
const char * ssl_cmd_SSLInsecureRenegotiation(cmd_parms *cmd, void *dcfg, int flag)
ssl_enabled_t
SSLModConfigRec * ssl_config_global_create(server_rec *)
void * ssl_config_perdir_merge(apr_pool_t *, void *, void *)
const char * ssl_cmd_SSLProxyCipherSuite(cmd_parms *, void *, const char *, const char *)
int ssl_hook_Auth(request_rec *)
const char * ssl_cmd_SSLSessionCache(cmd_parms *, void *, const char *)
const char * ssl_cmd_SSLVerifyClient(cmd_parms *, void *, const char *)
ssl_rsctx_t
* ssl_init_FindCAList(server_rec *, apr_pool_t *, const char *, const char *)
void modssl_set_io_callbacks(SSL *ssl, conn_rec *c, server_rec *s)
const char * ssl_cmd_SSLRandomSeed(cmd_parms *, void *, const char *, const char *, const char *)
const char * ssl_cmd_SSLCARevocationFile(cmd_parms *, void *, const char *)
const char * ssl_cmd_SSLOCSPResponseTimeSkew(cmd_parms *cmd, void *dcfg, const char *arg)
const char * ssl_cmd_SSLProxyMachineCertificateFile(cmd_parms *, void *, const char *)
int ssl_init_ssl_connection(conn_rec *c, request_rec *r)
Definition mod_ssl.c:575
const char * ssl_cmd_SSLCARevocationCheck(cmd_parms *, void *, const char *)
const char * ssl_cmd_SSLCertificateChainFile(cmd_parms *, void *, const char *)
apr_status_t ssl_init_Module(apr_pool_t *, apr_pool_t *, apr_pool_t *, server_rec *)
char * ssl_util_vhostid(apr_pool_t *, server_rec *)
Definition ssl_util.c:42
int ssl_proto_t
apr_status_t ssl_scache_init(server_rec *, apr_pool_t *)
Definition ssl_scache.c:40
int ssl_callback_SSLVerify_CRL(int, X509_STORE_CTX *, conn_rec *)
const char * ssl_cmd_SSLRequire(cmd_parms *, void *, const char *)
ssl_verify_t
const char * ssl_cmd_SSLOCSPOverrideResponder(cmd_parms *cmd, void *dcfg, int flag)
unsigned int ssl_util_vhost_matches(const char *servername, server_rec *s)
Definition ssl_util.c:61
int modssl_verify_ocsp(X509_STORE_CTX *ctx, SSLSrvConfigRec *sc, server_rec *s, conn_rec *c, apr_pool_t *pool)
ssl_crlcheck_t
apr_status_t ssl_load_encrypted_pkey(server_rec *, apr_pool_t *, int, const char *, apr_array_header_t **)
apr_status_t ssl_init_ModuleKill(void *data)
void * ssl_config_server_create(apr_pool_t *, server_rec *)
DH * modssl_dh_from_file(const char *)
DH * ssl_callback_TmpDH(SSL *, int, int)
const char * ssl_cmd_SSLProxyMachineCertificateChainFile(cmd_parms *, void *, const char *)
void void ssl_log_cxerror(const char *file, int line, int level, apr_status_t rv, conn_rec *c, X509 *cert, const char *format,...) __attribute__((format(printf
void modssl_set_reneg_state(SSLConnRec *sslconn, modssl_reneg_state state)
apr_file_t * ssl_util_ppopen(server_rec *, apr_pool_t *, const char *, const char *const *)
Definition ssl_util.c:120
void ssl_var_log_config_register(apr_pool_t *p)
char * ssl_var_lookup(apr_pool_t *, server_rec *, conn_rec *, request_rec *, char *)
Definition mod_nw_ssl.c:956
const char * ssl_cmd_SSLProxyCheckPeerCN(cmd_parms *cmd, void *dcfg, int flag)
const char * ssl_cmd_SSLProxyCACertificateFile(cmd_parms *, void *, const char *)
void ssl_io_filter_register(apr_pool_t *)
const char * ssl_cmd_SSLProxyMachineCertificatePath(cmd_parms *, void *, const char *)
const char * ssl_cmd_SSLProxyCheckPeerExpire(cmd_parms *cmd, void *dcfg, int flag)
const char * ssl_cmd_SSLSessionCacheTimeout(cmd_parms *, void *, const char *)
#define IDCONST
OCSP_RESPONSE * modssl_dispatch_ocsp_request(const apr_uri_t *uri, apr_interval_time_t timeout, OCSP_REQUEST *request, conn_rec *c, apr_pool_t *p)
const char * ssl_cmd_SSLOCSPResponderTimeout(cmd_parms *cmd, void *dcfg, const char *arg)
ssl_asn1_t * ssl_asn1_table_set(apr_hash_t *table, const char *key, EVP_PKEY *pkey)
Definition ssl_util.c:199
const char * ssl_cmd_SSLProxyCACertificatePath(cmd_parms *, void *, const char *)
int ssl_proxy_section_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s, ap_conf_vector_t *section_config)
const char * ssl_cmd_SSLSessionTickets(cmd_parms *, void *, int flag)
const char * ssl_cmd_SSLProxyCARevocationCheck(cmd_parms *, void *, const char *)
void ssl_config_proxy_merge(apr_pool_t *, SSLDirConfigRec *, SSLDirConfigRec *)
void ssl_scache_status_register(apr_pool_t *p)
Definition ssl_scache.c:234
void ssl_scache_remove(server_rec *, unsigned char *, int, apr_pool_t *)
Definition ssl_scache.c:176
const char * ssl_cmd_SSLRenegBufferSize(cmd_parms *cmd, void *dcfg, const char *arg)
SSL_SESSION * ssl_scache_retrieve(server_rec *, unsigned char *, int, apr_pool_t *)
Definition ssl_scache.c:147
const char * ssl_cmd_SSLProxyEngine(cmd_parms *cmd, void *dcfg, int flag)
const char * ssl_cmd_SSLOCSPNoVerify(cmd_parms *cmd, void *dcfg, int flag)
int ssl_opt_t
ssl_rssrc_t
int ssl_mutex_off(server_rec *)
const char * ssl_cmd_SSLHonorCipherOrder(cmd_parms *cmd, void *dcfg, int flag)
int ssl_hook_Upgrade(request_rec *)
const char * ssl_cmd_SSLOCSPDefaultResponder(cmd_parms *cmd, void *dcfg, const char *arg)
void ssl_asn1_table_unset(apr_hash_t *table, const char *key)
Definition ssl_util.c:234
const char * ssl_cmd_SSLCertificateKeyFile(cmd_parms *, void *, const char *)
const char * ssl_cmd_SSLRequireSSL(cmd_parms *, void *)
const char * ssl_cmd_SSLCompression(cmd_parms *, void *, int flag)
#define UCHAR
void ssl_log_ssl_error(const char *, int, int, server_rec *)
void * ssl_config_perdir_create(apr_pool_t *, char *)
unsigned int ssl_pathcheck_t
const char * ssl_cmd_SSLCARevocationPath(cmd_parms *, void *, const char *)
const char * ssl_cmd_SSLPassPhraseDialog(cmd_parms *, void *, const char *)
const char * ssl_cmd_SSLProxyVerifyDepth(cmd_parms *, void *, const char *)
const char * ssl_cmd_SSLProxyProtocol(cmd_parms *, void *, const char *)
const char * ssl_cmd_SSLOCSPEnable(cmd_parms *cmd, void *dcfg, const char *arg)
int ssl_is_challenge(conn_rec *c, const char *servername, X509 **pcert, EVP_PKEY **pkey, const char **pcert_file, const char **pkey_file)
const char * ssl_cmd_SSLProtocol(cmd_parms *, void *, const char *)
const char * ssl_cmd_SSLCACertificatePath(cmd_parms *, void *, const char *)
int ssl_stapling_mutex_reinit(server_rec *, apr_pool_t *)
void ssl_callback_Info(const SSL *, int, int)
apr_array_header_t * ssl_ext_list(apr_pool_t *p, conn_rec *c, int peer, const char *extension)
void ssl_io_filter_init(conn_rec *, request_rec *r, SSL *)
#define UNSET
unsigned int ssl_scache_store(server_rec *, unsigned char *, int, apr_time_t, SSL_SESSION *, apr_pool_t *)
Definition ssl_scache.c:113
int ssl_hook_ReadReq(request_rec *)
const char * ssl_cmd_SSLProxyCheckPeerName(cmd_parms *cmd, void *dcfg, int flag)
const char * ssl_cmd_SSLFIPS(cmd_parms *cmd, void *dcfg, int flag)
void void void ssl_log_rxerror(const char *file, int line, int level, apr_status_t rv, request_rec *r, X509 *cert, const char *format,...) __attribute__((format(printf
void ssl_callback_DelSessionCacheEntry(SSL_CTX *, SSL_SESSION *)
apr_status_t ssl_init_Engine(server_rec *, apr_pool_t *)
const char * ssl_cmd_SSLUserName(cmd_parms *, void *, const char *)
const char * ssl_cmd_SSLEngine(cmd_parms *, void *, const char *)
const char * ssl_cmd_SSLCADNRequestPath(cmd_parms *, void *, const char *)
const char * ssl_cmd_SSLCryptoDevice(cmd_parms *, void *, const char *)
const authz_provider ssl_authz_provider_verify_client
ssl_asn1_t * ssl_asn1_table_get(apr_hash_t *table, const char *key)
Definition ssl_util.c:228
apr_status_t ssl_init_ConfigureServer(server_rec *, apr_pool_t *, apr_pool_t *, SSLSrvConfigRec *, apr_array_header_t *)
const char * ssl_cmd_SSLOptions(cmd_parms *, void *, const char *)
int ssl_hook_UserCheck(request_rec *)
const char * ssl_cmd_SSLOCSPProxyURL(cmd_parms *cmd, void *dcfg, const char *arg)
int ssl_hook_Access(request_rec *)
ssl_pphrase_t
int ssl_mutex_init(server_rec *, apr_pool_t *)
const char * ssl_cmd_SSLCipherSuite(cmd_parms *, void *, const char *, const char *)
void modssl_var_extract_dns(apr_table_t *t, SSL *ssl, apr_pool_t *p)
const char * ssl_cmd_SSLOCSPResponderCertificateFile(cmd_parms *cmd, void *dcfg, const char *arg)
const char * ssl_cmd_SSLStrictSNIVHostCheck(cmd_parms *cmd, void *dcfg, int flag)
SSL_SESSION * ssl_callback_GetSessionCacheEntry(SSL *, unsigned char *, int, int *)
const char * ssl_cmd_SSLProxyCARevocationFile(cmd_parms *, void *, const char *)
void ssl_init_Child(apr_pool_t *, server_rec *)
#define BOOL
Definition ssl_private.h:81
int ssl_io_buffer_fill(request_rec *r, apr_size_t maxlen)
void * ssl_config_server_merge(apr_pool_t *, void *, void *)
int ssl_rand_seed(server_rec *, apr_pool_t *, ssl_rsctx_t, char *)
int ssl_mutex_reinit(server_rec *, apr_pool_t *)
int ssl_callback_proxy_cert(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
unsigned int ssl_config_global_isfixed(SSLModConfigRec *)
int ssl_mutex_on(server_rec *)
ssl_shutdown_type_e
void ssl_var_register(apr_pool_t *p)
void ssl_init_ocsp_certificates(server_rec *s, modssl_ctx_t *mctx)
void ssl_hook_ConfigTest(apr_pool_t *pconf, server_rec *s)
void modssl_var_extract_san_entries(apr_table_t *t, SSL *ssl, apr_pool_t *p)
void ssl_config_global_fix(SSLModConfigRec *)
void ssl_util_ppclose(server_rec *, apr_pool_t *, apr_file_t *)
Definition ssl_util.c:142
int ssl_callback_SSLVerify(int, X509_STORE_CTX *)
@ RENEG_INIT
@ RENEG_ALLOW
@ RENEG_ABORT
@ RENEG_REJECT
@ SSL_OCSPCHECK_CHAIN
@ SSL_OCSPCHECK_LEAF
@ SSL_OCSPCHECK_NONE
@ SSL_OCSPCHECK_NO_OCSP_FOR_CERT_OK
@ SSL_ENABLED_TRUE
@ SSL_ENABLED_UNSET
@ SSL_ENABLED_FALSE
@ SSL_ENABLED_OPTIONAL
@ SSL_RSCTX_CONNECT
@ SSL_RSCTX_STARTUP
@ SSL_CVERIFY_OPTIONAL
@ SSL_CVERIFY_OPTIONAL_NO_CA
@ SSL_CVERIFY_UNSET
@ SSL_CVERIFY_NONE
@ SSL_CVERIFY_REQUIRE
@ SSL_CRLCHECK_NO_CRL_FOR_CERT_OK
@ SSL_CRLCHECK_LEAF
@ SSL_CRLCHECK_NONE
@ SSL_CRLCHECK_CHAIN
@ SSL_RSSRC_EGD
@ SSL_RSSRC_BUILTIN
@ SSL_RSSRC_FILE
@ SSL_RSSRC_EXEC
@ SSL_PPTYPE_PIPE
@ SSL_PPTYPE_BUILTIN
@ SSL_PPTYPE_FILTER
@ SSL_PPTYPE_UNSET
@ SSL_SHUTDOWN_TYPE_STANDARD
@ SSL_SHUTDOWN_TYPE_UNCLEAN
@ SSL_SHUTDOWN_TYPE_ACCURATE
@ SSL_SHUTDOWN_TYPE_UNSET
apr_size_t size
const char int apr_pool_t * pool
Definition apr_cstr.h:84
const char * value
Definition apr_env.h:51
int apr_status_t
Definition apr_errno.h:44
const char * key
const char apr_int32_t flag
const char * format
void * data
const char apr_file_t * file
apr_vformatter_buff_t * c
Definition apr_lib.h:175
apr_interval_time_t t
const char apr_status_t(*) apr_pool_t *poo __attribute__)((nonnull(2, 4)))
Definition apr_pools.h:567
const char * s
Definition apr_strings.h:95
apr_int32_t in
apr_cmdtype_e cmd
apr_int64_t apr_interval_time_t
Definition apr_time.h:55
apr_int64_t apr_time_t
Definition apr_time.h:45
Apache Configuration.
Apache connection library.
CORE HTTP Daemon.
Apache Logging library.
Command line options.
HTTP protocol handling.
Apache Request library.
SSL protocol handling.
Virtual Host package.
HTTP Daemon routines.
apr_pool_t * p
Definition md_event.c:32
Authentication and Authorization Extension for Apache.
static apr_file_t * out
Definition mod_info.c:85
Interface to OpenSSL-specific APIs provided by mod_ssl.
STACK_OF(X509_NAME)
char * name
#define SSL_CRLCHECK_FLAGS
Additional Utility Functions for OpenSSL.
int service_unavailable
modssl_reneg_state reneg_state
const char * verify_error
const char * verify_info
const char * client_dn
ssl_shutdown_type_e shutdown_type
SSLDirConfigRec * dc
X509 * client_cert
server_rec * server
@ NON_SSL_SEND_REQLINE
@ NON_SSL_SEND_HDR_SEP
const char * cipher_suite
unsigned int proxy_enabled
unsigned int bSSLRequired
ssl_verify_t nVerifyClient
ssl_opt_t nOptionsAdd
unsigned int proxy_post_config
const char * szCipherSuite
ssl_opt_t nOptions
apr_size_t nRenegBufferSize
apr_array_header_t * aRequirement
ssl_opt_t nOptionsDel
modssl_ctx_t * proxy
const char * szUserName
apr_array_header_t * aRandSeed
const char * szCryptoDevice
apr_hash_t * tPrivateKey
ap_socache_instance_t * sesscache_context
apr_pool_t * pPool
apr_global_mutex_t * pMutex
apr_hash_t * tVHostKeys
const ap_socache_provider_t * sesscache
unsigned int bFixed
unsigned int cipher_server_pref
const char * vhost_id
SSLModConfigRec * mc
unsigned int session_tickets
modssl_ctx_t * server
ssl_enabled_t enabled
unsigned int compression
unsigned int insecure_reneg
Structure to store things which are per connection.
Definition httpd.h:1152
ssl_verify_t verify_mode
const char * cipher_suite
const char * ca_cert_file
const char * ca_cert_path
const char * tls13_ciphers
long ocsp_resp_maxage
ssl_pphrase_t pphrase_dialog_type
const char * ocsp_responder
ssl_proto_t protocol
SSLSrvConfigRec * sc
modssl_auth_ctx_t auth
SSL_CTX * ssl_ctx
long ocsp_resptime_skew
unsigned int ocsp_noverify
const char * crl_path
STACK_OF(X509) *ocsp_certs
unsigned int ocsp_use_request_nonce
unsigned int ssl_check_peer_cn
int ocsp_verify_flags
const char * pphrase_dialog_path
unsigned int ssl_check_peer_expire
const char * ocsp_certs_file
unsigned int ocsp_force_default
modssl_pk_proxy_t * pkp
modssl_pk_server_t * pks
const char * crl_file
unsigned int ssl_check_peer_name
const char * cert_chain
apr_interval_time_t ocsp_responder_timeout
apr_uri_t * proxy_uri
const char * cert_file
const char * ca_cert_file
STACK_OF(X509_INFO) *certs
const char * cert_path
STACK_OF(X509) **ca_certs
apr_array_header_t * key_files
apr_array_header_t * cert_files
const char * ca_name_path
const char * ca_name_file
A structure that represents the current request.
Definition httpd.h:845
A structure to store information for each virtual server.
Definition httpd.h:1322
apr_time_t source_mtime
long int nData
unsigned char * cpData
ssl_rssrc_t nSrc
ssl_rsctx_t nCtx
const char * cpExpr
ap_expr_info_t * mpExpr
Utilities for EBCDIC conversion.
Apache filter library.
Apache Mutex support library.
Apache script tools.
IN ULONG IN INT timeout
static size_t keylen(KEY s)
Definition xmlparse.c:7166