Apache2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 "httpd.h"
31 #include "http_config.h"
32 #include "http_core.h"
33 #include "http_log.h"
34 #include "http_main.h"
35 #include "http_connection.h"
36 #include "http_request.h"
37 #include "http_protocol.h"
38 #include "http_vhost.h"
39 #include "util_script.h"
40 #include "util_filter.h"
41 #include "util_ebcdic.h"
42 #include "util_mutex.h"
43 #include "apr.h"
44 #include "apr_strings.h"
45 #define APR_WANT_STRFUNC
46 #define APR_WANT_MEMFUNC
47 #include "apr_want.h"
48 #include "apr_tables.h"
49 #include "apr_lib.h"
50 #include "apr_fnmatch.h"
51 #include "apr_strings.h"
52 #include "apr_global_mutex.h"
53 #include "apr_optional.h"
54 #include "ap_socache.h"
55 #include "mod_auth.h"
56 
57 /* The #ifdef macros are only defined AFTER including the above
58  * therefore we cannot include these system files at the top :-(
59  */
60 #if APR_HAVE_STDLIB_H
61 #include <stdlib.h>
62 #endif
63 #if APR_HAVE_SYS_TIME_H
64 #include <sys/time.h>
65 #endif
66 #if APR_HAVE_UNISTD_H
67 #include <unistd.h> /* needed for STDIN_FILENO et.al., at least on FreeBSD */
68 #endif
69 
70 #ifndef FALSE
71 #define FALSE 0
72 #endif
73 
74 #ifndef TRUE
75 #define TRUE !FALSE
76 #endif
77 
78 #ifndef BOOL
79 #define BOOL unsigned int
80 #endif
81 
82 #include "ap_expr.h"
83 
84 /* OpenSSL headers */
85 #include <openssl/opensslv.h>
86 #if (OPENSSL_VERSION_NUMBER >= 0x10001000)
87 /* must be defined before including ssl.h */
88 #define OPENSSL_NO_SSL_INTERN
89 #endif
90 #include <openssl/ssl.h>
91 #include <openssl/err.h>
92 #include <openssl/x509.h>
93 #include <openssl/pem.h>
94 #include <openssl/crypto.h>
95 #include <openssl/evp.h>
96 #include <openssl/rand.h>
97 #include <openssl/x509v3.h>
98 #include <openssl/x509_vfy.h>
99 #include <openssl/ocsp.h>
100 
101 /* Avoid tripping over an engine build installed globally and detected
102  * when the user points at an explicit non-engine flavor of OpenSSL
103  */
104 #if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ENGINE_INIT)
105 #include <openssl/engine.h>
106 #endif
107 
108 #if (OPENSSL_VERSION_NUMBER < 0x0090801f)
109 #error mod_ssl requires OpenSSL 0.9.8a or later
110 #endif
111 
118 #if (OPENSSL_VERSION_NUMBER >= 0x10000000)
119 #define MODSSL_SSL_CIPHER_CONST const
120 #define MODSSL_SSL_METHOD_CONST const
121 #else
122 #define MODSSL_SSL_CIPHER_CONST
123 #define MODSSL_SSL_METHOD_CONST
124 #endif
125 
126 #if defined(OPENSSL_FIPS)
127 #define HAVE_FIPS
128 #endif
129 
130 #if defined(SSL_OP_NO_TLSv1_2)
131 #define HAVE_TLSV1_X
132 #endif
133 
134 #if defined(SSL_CONF_FLAG_FILE)
135 #define HAVE_SSL_CONF_CMD
136 #endif
137 
138 /* session id constness */
139 #if OPENSSL_VERSION_NUMBER < 0x10100000L
140 #define IDCONST
141 #else
142 #define IDCONST const
143 #endif
144 
149 #if !defined(OPENSSL_NO_TLSEXT) && defined(SSL_set_tlsext_host_name)
150 
151 #define HAVE_TLSEXT
152 
153 /* ECC: make sure we have at least 1.0.0 */
154 #if !defined(OPENSSL_NO_EC) && defined(TLSEXT_ECPOINTFORMAT_uncompressed)
155 #define HAVE_ECC
156 #endif
157 
158 /* OCSP stapling */
159 #if !defined(OPENSSL_NO_OCSP) && defined(SSL_CTX_set_tlsext_status_cb)
160 #define HAVE_OCSP_STAPLING
161 /* All exist but are no longer macros since OpenSSL 1.1.0 */
162 #if OPENSSL_VERSION_NUMBER < 0x10100000L
163 /* backward compatibility with OpenSSL < 1.0 */
164 #ifndef sk_OPENSSL_STRING_num
165 #define sk_OPENSSL_STRING_num sk_num
166 #endif
167 #ifndef sk_OPENSSL_STRING_value
168 #define sk_OPENSSL_STRING_value sk_value
169 #endif
170 #ifndef sk_OPENSSL_STRING_pop
171 #define sk_OPENSSL_STRING_pop sk_pop
172 #endif
173 #endif /* if OPENSSL_VERSION_NUMBER < 0x10100000L */
174 #endif /* if !defined(OPENSSL_NO_OCSP) && defined(SSL_CTX_set_tlsext_status_cb) */
175 
176 /* TLS session tickets */
177 #if defined(SSL_CTX_set_tlsext_ticket_key_cb)
178 #define HAVE_TLS_SESSION_TICKETS
179 #define TLSEXT_TICKET_KEY_LEN 48
180 #ifndef tlsext_tick_md
181 #ifdef OPENSSL_NO_SHA256
182 #define tlsext_tick_md EVP_sha1
183 #else
184 #define tlsext_tick_md EVP_sha256
185 #endif
186 #endif
187 #endif
188 
189 /* Secure Remote Password */
190 #if !defined(OPENSSL_NO_SRP) && defined(SSL_CTRL_SET_TLS_EXT_SRP_USERNAME_CB)
191 #define HAVE_SRP
192 #include <openssl/srp.h>
193 #endif
194 
195 /* ALPN Protocol Negotiation */
196 #if defined(TLSEXT_TYPE_application_layer_protocol_negotiation)
197 #define HAVE_TLS_ALPN
198 #endif
199 
200 #endif /* !defined(OPENSSL_NO_TLSEXT) && defined(SSL_set_tlsext_host_name) */
201 
202 #if OPENSSL_VERSION_NUMBER < 0x10100000L
203 #define BN_get_rfc2409_prime_768 get_rfc2409_prime_768
204 #define BN_get_rfc2409_prime_1024 get_rfc2409_prime_1024
205 #define BN_get_rfc3526_prime_1536 get_rfc3526_prime_1536
206 #define BN_get_rfc3526_prime_2048 get_rfc3526_prime_2048
207 #define BN_get_rfc3526_prime_3072 get_rfc3526_prime_3072
208 #define BN_get_rfc3526_prime_4096 get_rfc3526_prime_4096
209 #define BN_get_rfc3526_prime_6144 get_rfc3526_prime_6144
210 #define BN_get_rfc3526_prime_8192 get_rfc3526_prime_8192
211 #define BIO_set_init(x,v) (x->init=v)
212 #define BIO_get_data(x) (x->ptr)
213 #define BIO_set_data(x,v) (x->ptr=v)
214 #define BIO_get_shutdown(x) (x->shutdown)
215 #define BIO_set_shutdown(x,v) (x->shutdown=v)
216 #define DH_bits(x) (BN_num_bits(x->p))
217 #else
218 void init_bio_methods(void);
219 void free_bio_methods(void);
220 #endif
221 
222 #if OPENSSL_VERSION_NUMBER < 0x10002000L
223 #define X509_STORE_CTX_get0_store(x) (x->ctx)
224 #endif
225 
226 #if OPENSSL_VERSION_NUMBER < 0x10000000L
227 #ifndef X509_STORE_CTX_get0_current_issuer
228 #define X509_STORE_CTX_get0_current_issuer(x) (x->current_issuer)
229 #endif
230 #endif
231 
232 /* mod_ssl headers */
233 #include "ssl_util_ssl.h"
234 
235 APLOG_USE_MODULE(ssl);
236 
237 /*
238  * Provide reasonable default for some defines
239  */
240 #ifndef PFALSE
241 #define PFALSE ((void *)FALSE)
242 #endif
243 #ifndef PTRUE
244 #define PTRUE ((void *)TRUE)
245 #endif
246 #ifndef UNSET
247 #define UNSET (-1)
248 #endif
249 #ifndef NUL
250 #define NUL '\0'
251 #endif
252 #ifndef RAND_MAX
253 #include <limits.h>
254 #define RAND_MAX INT_MAX
255 #endif
256 
260 #ifndef UCHAR
261 #define UCHAR unsigned char
262 #endif
263 
267 #define strEQ(s1,s2) (strcmp(s1,s2) == 0)
268 #define strNE(s1,s2) (strcmp(s1,s2) != 0)
269 #define strEQn(s1,s2,n) (strncmp(s1,s2,n) == 0)
270 #define strNEn(s1,s2,n) (strncmp(s1,s2,n) != 0)
271 
272 #define strcEQ(s1,s2) (strcasecmp(s1,s2) == 0)
273 #define strcNE(s1,s2) (strcasecmp(s1,s2) != 0)
274 #define strcEQn(s1,s2,n) (strncasecmp(s1,s2,n) == 0)
275 #define strcNEn(s1,s2,n) (strncasecmp(s1,s2,n) != 0)
276 
277 #define strIsEmpty(s) (s == NULL || s[0] == NUL)
278 
279 #define myConnConfig(c) \
280  ((SSLConnRec *)ap_get_module_config(c->conn_config, &ssl_module))
281 #define myConnConfigSet(c, val) \
282  ap_set_module_config(c->conn_config, &ssl_module, val)
283 #define mySrvConfig(srv) \
284  ((SSLSrvConfigRec *)ap_get_module_config(srv->module_config, &ssl_module))
285 #define myDirConfig(req) \
286  ((SSLDirConfigRec *)ap_get_module_config(req->per_dir_config, &ssl_module))
287 #define myCtxConfig(sslconn, sc) \
288  (sslconn->is_proxy ? sslconn->dc->proxy : sc->server)
289 #define myModConfig(srv) mySrvConfig((srv))->mc
290 #define mySrvFromConn(c) myConnConfig(c)->server
291 #define myDirConfigFromConn(c) myConnConfig(c)->dc
292 #define mySrvConfigFromConn(c) mySrvConfig(mySrvFromConn(c))
293 #define myModConfigFromConn(c) myModConfig(mySrvFromConn(c))
294 
298 #ifndef SSL_SESSION_CACHE_TIMEOUT
299 #define SSL_SESSION_CACHE_TIMEOUT 300
300 #endif
301 
302 /* Default setting for per-dir reneg buffer. */
303 #ifndef DEFAULT_RENEG_BUFFER_SIZE
304 #define DEFAULT_RENEG_BUFFER_SIZE (128 * 1024)
305 #endif
306 
307 /* Default for OCSP response validity */
308 #ifndef DEFAULT_OCSP_MAX_SKEW
309 #define DEFAULT_OCSP_MAX_SKEW (60 * 5)
310 #endif
311 
312 /* Default timeout for OCSP queries */
313 #ifndef DEFAULT_OCSP_TIMEOUT
314 #define DEFAULT_OCSP_TIMEOUT 10
315 #endif
316 
320 #define SSL_OPT_NONE (0)
321 #define SSL_OPT_RELSET (1<<0)
322 #define SSL_OPT_STDENVVARS (1<<1)
323 #define SSL_OPT_EXPORTCERTDATA (1<<3)
324 #define SSL_OPT_FAKEBASICAUTH (1<<4)
325 #define SSL_OPT_STRICTREQUIRE (1<<5)
326 #define SSL_OPT_OPTRENEGOTIATE (1<<6)
327 #define SSL_OPT_LEGACYDNFORMAT (1<<7)
328 typedef int ssl_opt_t;
329 
333 #define SSL_PROTOCOL_NONE (0)
334 #ifndef OPENSSL_NO_SSL3
335 #define SSL_PROTOCOL_SSLV3 (1<<1)
336 #endif
337 #define SSL_PROTOCOL_TLSV1 (1<<2)
338 #ifndef OPENSSL_NO_SSL3
339 #define SSL_PROTOCOL_BASIC (SSL_PROTOCOL_SSLV3|SSL_PROTOCOL_TLSV1)
340 #else
341 #define SSL_PROTOCOL_BASIC (SSL_PROTOCOL_TLSV1)
342 #endif
343 #ifdef HAVE_TLSV1_X
344 #define SSL_PROTOCOL_TLSV1_1 (1<<3)
345 #define SSL_PROTOCOL_TLSV1_2 (1<<4)
346 #define SSL_PROTOCOL_ALL (SSL_PROTOCOL_BASIC| \
347  SSL_PROTOCOL_TLSV1_1|SSL_PROTOCOL_TLSV1_2)
348 #else
349 #define SSL_PROTOCOL_ALL (SSL_PROTOCOL_BASIC)
350 #endif
351 #ifndef OPENSSL_NO_SSL3
352 #define SSL_PROTOCOL_DEFAULT (SSL_PROTOCOL_ALL & ~SSL_PROTOCOL_SSLV3)
353 #else
354 #define SSL_PROTOCOL_DEFAULT (SSL_PROTOCOL_ALL)
355 #endif
356 typedef int ssl_proto_t;
357 
361 typedef enum {
367 } ssl_verify_t;
368 
369 #define SSL_VERIFY_PEER_STRICT \
370  (SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT)
371 
372 #define ssl_verify_error_is_optional(errnum) \
373  ((errnum == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT) \
374  || (errnum == X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN) \
375  || (errnum == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY) \
376  || (errnum == X509_V_ERR_CERT_UNTRUSTED) \
377  || (errnum == X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE))
378 
382 typedef enum {
384  SSL_CRLCHECK_LEAF = (1 << 0),
385  SSL_CRLCHECK_CHAIN = (1 << 1),
386 
387 #define SSL_CRLCHECK_FLAGS (~0x3)
390 
394 typedef enum {
399 } ssl_pphrase_t;
400 
404 #define SSL_PCM_EXISTS 1
405 #define SSL_PCM_ISREG 2
406 #define SSL_PCM_ISDIR 4
407 #define SSL_PCM_ISNONZERO 8
408 typedef unsigned int ssl_pathcheck_t;
409 
413 typedef enum {
418 } ssl_enabled_t;
419 
423 typedef struct {
424  const char *cpExpr;
426 } ssl_require_t;
427 
431 typedef enum {
434 } ssl_rsctx_t;
435 typedef enum {
440 } ssl_rssrc_t;
441 typedef struct {
444  char *cpPath;
445  int nBytes;
447 
451 typedef struct {
452  long int nData;
453  unsigned char *cpData;
455 } ssl_asn1_t;
456 
464 
465 typedef enum {
471 
472 typedef struct {
473  SSL *ssl;
474  const char *client_dn;
475  X509 *client_cert;
477  const char *verify_info;
478  const char *verify_error;
480  int is_proxy;
481  int disabled;
482  enum {
483  NON_SSL_OK = 0, /* is SSL request, or error handling completed */
484  NON_SSL_SEND_REQLINE, /* Need to send the fake request line */
485  NON_SSL_SEND_HDR_SEP, /* Need to send the header separator */
486  NON_SSL_SET_ERROR_MSG /* Need to set the error message */
487  } non_ssl_request;
488 
489  /* Track the handshake/renegotiation state for the connection so
490  * that all client-initiated renegotiations can be rejected, as a
491  * partial fix for CVE-2009-3555. */
492  enum {
493  RENEG_INIT = 0, /* Before initial handshake */
494  RENEG_REJECT, /* After initial handshake; any client-initiated
495  * renegotiation should be rejected */
496  RENEG_ALLOW, /* A server-initiated renegotiation is taking
497  * place (as dictated by configuration) */
498  RENEG_ABORT /* Renegotiation initiated by client, abort the
499  * connection */
500  } reneg_state;
501 
504 
505  const char *cipher_suite; /* cipher suite used in last reneg */
506 } SSLConnRec;
507 
508 /* BIG FAT WARNING: SSLModConfigRec has unusual memory lifetime: it is
509  * allocated out of the "process" pool and only a single such
510  * structure is created and used for the lifetime of the process.
511  * (The process pool is s->process->pool and is stored in the .pPool
512  * field.) Most members of this structure are likewise allocated out
513  * of the process pool, but notably sesscache and sesscache_context
514  * are not.
515  *
516  * The structure is treated as mostly immutable after a single config
517  * parse has completed; the post_config hook (ssl_init_Module) flips
518  * the bFixed flag to true and subsequent invocations of the config
519  * callbacks hence do nothing.
520  *
521  * This odd lifetime strategy is used so that encrypted private keys
522  * can be decrypted once at startup and continue to be used across
523  * subsequent server reloads where the interactive password prompt is
524  * not possible.
525 
526  * It is really an ABI nightmare waiting to happen since DSOs are
527  * reloaded across restarts, and nothing prevents the struct type
528  * changing across such reloads, yet the cached structure will be
529  * assumed to match regardless.
530  *
531  * This should really be fixed using a smaller structure which only
532  * stores that which is absolutely necessary (the private keys, maybe
533  * the random seed), and have that structure be strictly ABI-versioned
534  * for safety.
535  */
536 typedef struct {
537  pid_t pid;
540 
541  /* OpenSSL SSL_SESS_CACHE_* flags: */
543 
544  /* The configured provider, and associated private data
545  * structure. */
548 
552 
553  /* A hash table of pointers to ssl_asn1_t structures. The structures
554  * are used to store private keys in raw DER format (serialized OpenSSL
555  * PrivateKey structures). The table is indexed by (vhost-id,
556  * index), for example the string "vhost.example.com:443:0". */
558 
559 #if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ENGINE_INIT)
560  const char *szCryptoDevice;
561 #endif
562 
563 #ifdef HAVE_OCSP_STAPLING
564  const ap_socache_provider_t *stapling_cache;
565  ap_socache_instance_t *stapling_cache_context;
566  apr_global_mutex_t *stapling_cache_mutex;
567  apr_global_mutex_t *stapling_refresh_mutex;
568 #endif
570 
573 typedef struct {
574  /* Lists of configured certs and keys for this server */
577 
580  const char *ca_name_path;
581  const char *ca_name_file;
583 
584 typedef struct {
586  const char *cert_file;
587  const char *cert_path;
588  const char *ca_cert_file;
589  STACK_OF(X509_INFO) *certs; /* Contains End Entity certs */
590  STACK_OF(X509) **ca_certs; /* Contains ONLY chain certs for
591  * each item in certs.
592  * (ptr to array of ptrs) */
594 
596 typedef struct {
598  const char *ca_cert_path;
599  const char *ca_cert_file;
600 
601  const char *cipher_suite;
602 
607 
608 #ifdef HAVE_TLS_SESSION_TICKETS
609 typedef struct {
610  const char *file_path;
611  unsigned char key_name[16];
612  unsigned char hmac_secret[16];
613  unsigned char aes_key[16];
614 } modssl_ticket_key_t;
615 #endif
616 
617 #ifdef HAVE_SSL_CONF_CMD
618 typedef struct {
619  const char *name;
620  const char *value;
621 } ssl_ctx_param_t;
622 #endif
623 
624 typedef struct {
626  SSL_CTX *ssl_ctx;
627 
631 
632 #ifdef HAVE_TLS_SESSION_TICKETS
633  modssl_ticket_key_t *ticket_key;
634 #endif
635 
638 
641  const char *pphrase_dialog_path;
642 
643  const char *cert_chain;
644 
646  const char *crl_path;
647  const char *crl_file;
649 
650 #ifdef HAVE_OCSP_STAPLING
651 
652  BOOL stapling_enabled;
653  long stapling_resptime_skew;
654  long stapling_resp_maxage;
655  int stapling_cache_timeout;
656  BOOL stapling_return_errors;
657  BOOL stapling_fake_trylater;
658  int stapling_errcache_timeout;
659  apr_interval_time_t stapling_responder_timeout;
660  const char *stapling_force_url;
661 #endif
662 
663 #ifdef HAVE_SRP
664  char *srp_vfile;
665  char *srp_unknown_user_seed;
666  SRP_VBASE *srp_vbase;
667 #endif
668 
670 
671  BOOL ocsp_enabled; /* true if OCSP verification enabled */
672  BOOL ocsp_force_default; /* true if the default responder URL is
673  * used regardless of per-cert URL */
674  const char *ocsp_responder; /* default responder URL */
680 
681 #ifdef HAVE_SSL_CONF_CMD
682  SSL_CONF_CTX *ssl_ctx_config; /* Configuration context */
683  apr_array_header_t *ssl_ctx_param; /* parameters to pass to SSL_CTX */
684 #endif
685 
689 } modssl_ctx_t;
690 
694  const char *vhost_id;
700 #ifdef HAVE_TLSEXT
701  ssl_enabled_t strict_sni_vhost_check;
702 #endif
703 #ifdef HAVE_FIPS
704  BOOL fips;
705 #endif
706 #ifndef OPENSSL_NO_COMP
708 #endif
710 };
711 
723  const char *szCipherSuite;
726  const char *szUserName;
728 
732 };
733 
740 
746 void *ssl_config_server_merge(apr_pool_t *, void *, void *);
747 void *ssl_config_perdir_create(apr_pool_t *, char *);
748 void *ssl_config_perdir_merge(apr_pool_t *, void *, void *);
751 const char *ssl_cmd_SSLPassPhraseDialog(cmd_parms *, void *, const char *);
752 const char *ssl_cmd_SSLCryptoDevice(cmd_parms *, void *, const char *);
753 const char *ssl_cmd_SSLRandomSeed(cmd_parms *, void *, const char *, const char *, const char *);
754 const char *ssl_cmd_SSLEngine(cmd_parms *, void *, const char *);
755 const char *ssl_cmd_SSLCipherSuite(cmd_parms *, void *, const char *);
756 const char *ssl_cmd_SSLCertificateFile(cmd_parms *, void *, const char *);
757 const char *ssl_cmd_SSLCertificateKeyFile(cmd_parms *, void *, const char *);
758 const char *ssl_cmd_SSLCertificateChainFile(cmd_parms *, void *, const char *);
759 const char *ssl_cmd_SSLCACertificatePath(cmd_parms *, void *, const char *);
760 const char *ssl_cmd_SSLCACertificateFile(cmd_parms *, void *, const char *);
761 const char *ssl_cmd_SSLCADNRequestPath(cmd_parms *, void *, const char *);
762 const char *ssl_cmd_SSLCADNRequestFile(cmd_parms *, void *, const char *);
763 const char *ssl_cmd_SSLCARevocationPath(cmd_parms *, void *, const char *);
764 const char *ssl_cmd_SSLCARevocationFile(cmd_parms *, void *, const char *);
765 const char *ssl_cmd_SSLCARevocationCheck(cmd_parms *, void *, const char *);
766 const char *ssl_cmd_SSLHonorCipherOrder(cmd_parms *cmd, void *dcfg, int flag);
767 const char *ssl_cmd_SSLCompression(cmd_parms *, void *, int flag);
768 const char *ssl_cmd_SSLSessionTickets(cmd_parms *, void *, int flag);
769 const char *ssl_cmd_SSLVerifyClient(cmd_parms *, void *, const char *);
770 const char *ssl_cmd_SSLVerifyDepth(cmd_parms *, void *, const char *);
771 const char *ssl_cmd_SSLSessionCache(cmd_parms *, void *, const char *);
772 const char *ssl_cmd_SSLSessionCacheTimeout(cmd_parms *, void *, const char *);
773 const char *ssl_cmd_SSLProtocol(cmd_parms *, void *, const char *);
774 const char *ssl_cmd_SSLOptions(cmd_parms *, void *, const char *);
775 const char *ssl_cmd_SSLRequireSSL(cmd_parms *, void *);
776 const char *ssl_cmd_SSLRequire(cmd_parms *, void *, const char *);
777 const char *ssl_cmd_SSLUserName(cmd_parms *, void *, const char *);
778 const char *ssl_cmd_SSLRenegBufferSize(cmd_parms *cmd, void *dcfg, const char *arg);
779 const char *ssl_cmd_SSLStrictSNIVHostCheck(cmd_parms *cmd, void *dcfg, int flag);
780 const char *ssl_cmd_SSLInsecureRenegotiation(cmd_parms *cmd, void *dcfg, int flag);
781 
782 const char *ssl_cmd_SSLProxyEngine(cmd_parms *cmd, void *dcfg, int flag);
783 const char *ssl_cmd_SSLProxyProtocol(cmd_parms *, void *, const char *);
784 const char *ssl_cmd_SSLProxyCipherSuite(cmd_parms *, void *, const char *);
785 const char *ssl_cmd_SSLProxyVerify(cmd_parms *, void *, const char *);
786 const char *ssl_cmd_SSLProxyVerifyDepth(cmd_parms *, void *, const char *);
787 const char *ssl_cmd_SSLProxyCACertificatePath(cmd_parms *, void *, const char *);
788 const char *ssl_cmd_SSLProxyCACertificateFile(cmd_parms *, void *, const char *);
789 const char *ssl_cmd_SSLProxyCARevocationPath(cmd_parms *, void *, const char *);
790 const char *ssl_cmd_SSLProxyCARevocationFile(cmd_parms *, void *, const char *);
791 const char *ssl_cmd_SSLProxyCARevocationCheck(cmd_parms *, void *, const char *);
792 const char *ssl_cmd_SSLProxyMachineCertificatePath(cmd_parms *, void *, const char *);
793 const char *ssl_cmd_SSLProxyMachineCertificateFile(cmd_parms *, void *, const char *);
794 const char *ssl_cmd_SSLProxyMachineCertificateChainFile(cmd_parms *, void *, const char *);
795 #ifdef HAVE_TLS_SESSION_TICKETS
796 const char *ssl_cmd_SSLSessionTicketKeyFile(cmd_parms *cmd, void *dcfg, const char *arg);
797 #endif
798 const char *ssl_cmd_SSLProxyCheckPeerExpire(cmd_parms *cmd, void *dcfg, int flag);
799 const char *ssl_cmd_SSLProxyCheckPeerCN(cmd_parms *cmd, void *dcfg, int flag);
800 const char *ssl_cmd_SSLProxyCheckPeerName(cmd_parms *cmd, void *dcfg, int flag);
801 
802 const char *ssl_cmd_SSLOCSPOverrideResponder(cmd_parms *cmd, void *dcfg, int flag);
803 const char *ssl_cmd_SSLOCSPDefaultResponder(cmd_parms *cmd, void *dcfg, const char *arg);
804 const char *ssl_cmd_SSLOCSPResponseTimeSkew(cmd_parms *cmd, void *dcfg, const char *arg);
805 const char *ssl_cmd_SSLOCSPResponseMaxAge(cmd_parms *cmd, void *dcfg, const char *arg);
806 const char *ssl_cmd_SSLOCSPResponderTimeout(cmd_parms *cmd, void *dcfg, const char *arg);
807 const char *ssl_cmd_SSLOCSPUseRequestNonce(cmd_parms *cmd, void *dcfg, int flag);
808 const char *ssl_cmd_SSLOCSPEnable(cmd_parms *cmd, void *dcfg, int flag);
809 const char *ssl_cmd_SSLOCSPProxyURL(cmd_parms *cmd, void *dcfg, const char *arg);
810 
811 #ifdef HAVE_SSL_CONF_CMD
812 const char *ssl_cmd_SSLOpenSSLConfCmd(cmd_parms *cmd, void *dcfg, const char *arg1, const char *arg2);
813 #endif
814 
815 #ifdef HAVE_SRP
816 const char *ssl_cmd_SSLSRPVerifierFile(cmd_parms *cmd, void *dcfg, const char *arg);
817 const char *ssl_cmd_SSLSRPUnknownUserSeed(cmd_parms *cmd, void *dcfg, const char *arg);
818 #endif
819 
820 const char *ssl_cmd_SSLFIPS(cmd_parms *cmd, void *dcfg, int flag);
821 
829  apr_pool_t *ptemp, server_rec *s,
830  ap_conf_vector_t *section_config);
831 STACK_OF(X509_NAME)
832  *ssl_init_FindCAList(server_rec *, apr_pool_t *, const char *, const char *);
835 
843 void ssl_hook_ConfigTest(apr_pool_t *pconf, server_rec *s);
844 
848 
850 DH *ssl_callback_TmpDH(SSL *, int, int);
851 int ssl_callback_SSLVerify(int, X509_STORE_CTX *);
852 int ssl_callback_SSLVerify_CRL(int, X509_STORE_CTX *, conn_rec *);
853 int ssl_callback_proxy_cert(SSL *ssl, X509 **x509, EVP_PKEY **pkey);
854 int ssl_callback_NewSessionCacheEntry(SSL *, SSL_SESSION *);
855 SSL_SESSION *ssl_callback_GetSessionCacheEntry(SSL *, IDCONST unsigned char *, int, int *);
856 void ssl_callback_DelSessionCacheEntry(SSL_CTX *, SSL_SESSION *);
857 void ssl_callback_Info(const SSL *, int, int);
858 #ifdef HAVE_TLSEXT
859 int ssl_callback_ServerNameIndication(SSL *, int *, modssl_ctx_t *);
860 #endif
861 #ifdef HAVE_TLS_SESSION_TICKETS
862 int ssl_callback_SessionTicket(SSL *, unsigned char *, unsigned char *,
863  EVP_CIPHER_CTX *, HMAC_CTX *, int);
864 #endif
865 
866 #ifdef HAVE_TLS_ALPN
867 int ssl_callback_alpn_select(SSL *ssl, const unsigned char **out,
868  unsigned char *outlen, const unsigned char *in,
869  unsigned int inlen, void *arg);
870 #endif
871 
877  apr_time_t, SSL_SESSION *, apr_pool_t *);
878 SSL_SESSION *ssl_scache_retrieve(server_rec *, IDCONST UCHAR *, int, apr_pool_t *);
880  apr_pool_t *);
881 
883 #ifdef HAVE_OCSP_STAPLING
884 const char *ssl_cmd_SSLStaplingCache(cmd_parms *, void *, const char *);
885 const char *ssl_cmd_SSLUseStapling(cmd_parms *, void *, int);
886 const char *ssl_cmd_SSLStaplingResponseTimeSkew(cmd_parms *, void *, const char *);
887 const char *ssl_cmd_SSLStaplingResponseMaxAge(cmd_parms *, void *, const char *);
888 const char *ssl_cmd_SSLStaplingStandardCacheTimeout(cmd_parms *, void *, const char *);
889 const char *ssl_cmd_SSLStaplingErrorCacheTimeout(cmd_parms *, void *, const char *);
890 const char *ssl_cmd_SSLStaplingReturnResponderErrors(cmd_parms *, void *, int);
891 const char *ssl_cmd_SSLStaplingFakeTryLater(cmd_parms *, void *, int);
892 const char *ssl_cmd_SSLStaplingResponderTimeout(cmd_parms *, void *, const char *);
893 const char *ssl_cmd_SSLStaplingForceURL(cmd_parms *, void *, const char *);
894 apr_status_t modssl_init_stapling(server_rec *, apr_pool_t *, apr_pool_t *, modssl_ctx_t *);
895 void ssl_stapling_certinfo_hash_init(apr_pool_t *);
896 int ssl_stapling_init_cert(server_rec *, apr_pool_t *, apr_pool_t *,
897  modssl_ctx_t *, X509 *);
898 #endif
899 #ifdef HAVE_SRP
900 int ssl_callback_SRPServerParams(SSL *, int *, void *);
901 #endif
902 
904 void ssl_io_filter_init(conn_rec *, request_rec *r, SSL *);
906 long ssl_io_data_cb(BIO *, int, const char *, int, long, long);
907 
908 /* ssl_io_buffer_fill fills the setaside buffering of the HTTP request
909  * to allow an SSL renegotiation to take place. */
911 
914 
917 apr_file_t *ssl_util_ppopen(server_rec *, apr_pool_t *, const char *,
918  const char * const *);
920 char *ssl_util_readfilter(server_rec *, apr_pool_t *, const char *,
921  const char * const *);
922 BOOL ssl_util_path_check(ssl_pathcheck_t, const char *, apr_pool_t *);
923 #if OPENSSL_VERSION_NUMBER < 0x10100000L
925 #endif
927 
928 BOOL ssl_util_vhost_matches(const char *servername, server_rec *s);
929 
932  const char *, apr_array_header_t **);
933 
935 DH *ssl_dh_GetParamFromFile(const char *);
936 #ifdef HAVE_ECC
937 EC_GROUP *ssl_ec_GetParamFromFile(const char *);
938 #endif
939 
940 unsigned char *ssl_asn1_table_set(apr_hash_t *table,
941  const char *key,
942  long int length);
943 
945  const char *key);
946 
947 void ssl_asn1_table_unset(apr_hash_t *table,
948  const char *key);
949 
953 int ssl_mutex_on(server_rec *);
955 
957 
958 /* mutex type names for Mutex directive */
959 #define SSL_CACHE_MUTEX_TYPE "ssl-cache"
960 #define SSL_STAPLING_CACHE_MUTEX_TYPE "ssl-stapling"
961 #define SSL_STAPLING_REFRESH_MUTEX_TYPE "ssl-stapling-refresh"
962 
964 
966 void ssl_log_ssl_error(const char *, int, int, server_rec *);
967 
968 /* ssl_log_xerror, ssl_log_cxerror and ssl_log_rxerror are wrappers for the
969  * respective ap_log_*error functions and take a certificate as an
970  * additional argument (whose details are appended to the log message).
971  * The other arguments are interpreted exactly as with their ap_log_*error
972  * counterparts. */
973 void ssl_log_xerror(const char *file, int line, int level,
975  X509 *cert, const char *format, ...)
976  __attribute__((format(printf,8,9)));
977 
978 void ssl_log_cxerror(const char *file, int line, int level,
979  apr_status_t rv, conn_rec *c, X509 *cert,
980  const char *format, ...)
981  __attribute__((format(printf,7,8)));
982 
983 void ssl_log_rxerror(const char *file, int line, int level,
984  apr_status_t rv, request_rec *r, X509 *cert,
985  const char *format, ...)
986  __attribute__((format(printf,7,8)));
987 
988 #define SSLLOG_MARK __FILE__,__LINE__
989 
992 /* Register variables for the lifetime of the process pool 'p'. */
994 char *ssl_var_lookup(apr_pool_t *, server_rec *, conn_rec *, request_rec *, char *);
995 apr_array_header_t *ssl_ext_list(apr_pool_t *p, conn_rec *c, int peer, const char *extension);
996 
998 
999 /* Extract SSL_*_DN_* variables into table 't' from SSL object 'ssl',
1000  * allocating from 'p': */
1001 void modssl_var_extract_dns(apr_table_t *t, SSL *ssl, apr_pool_t *p);
1002 
1003 /* Extract SSL_*_SAN_* variables (subjectAltName entries) into table 't'
1004  * from SSL object 'ssl', allocating from 'p'. */
1006 
1007 #ifndef OPENSSL_NO_OCSP
1008 /* Perform OCSP validation of the current cert in the given context.
1009  * Returns non-zero on success or zero on failure. On failure, the
1010  * context error code is set. */
1011 int modssl_verify_ocsp(X509_STORE_CTX *ctx, SSLSrvConfigRec *sc,
1012  server_rec *s, conn_rec *c, apr_pool_t *pool);
1013 
1014 /* OCSP helper interface; dispatches the given OCSP request to the
1015  * responder at the given URI. Returns the decoded OCSP response
1016  * object, or NULL on error (in which case, errors will have been
1017  * logged). Pool 'p' is used for temporary allocations. */
1018 OCSP_RESPONSE *modssl_dispatch_ocsp_request(const apr_uri_t *uri,
1019  apr_interval_time_t timeout,
1020  OCSP_REQUEST *request,
1021  conn_rec *c, apr_pool_t *p);
1022 #endif
1023 
1024 /* Retrieve DH parameters for given key length. Return value should
1025  * be treated as unmutable, since it is stored in process-global
1026  * memory. */
1027 DH *modssl_get_dh_params(unsigned keylen);
1028 
1029 #if HAVE_VALGRIND
1030 extern int ssl_running_on_valgrind;
1031 #endif
1032 
1033 #endif /* SSL_PRIVATE_H */
1034 
apr_pool_t * pPool
Definition: ssl_private.h:538
Definition: ssl_private.h:436
const char * ssl_cmd_SSLRequire(cmd_parms *, void *, const char *)
Definition: ap_socache.h:89
ssl_rsctx_t nCtx
Definition: ssl_private.h:442
Definition: ssl_private.h:366
Definition: ssl_private.h:388
ssl_proto_t protocol
Definition: ssl_private.h:636
size_t apr_size_t
Definition: apr.h:375
const char * ca_name_path
Definition: ssl_private.h:580
Definition: ssl_private.h:396
const char * ssl_cmd_SSLOCSPEnable(cmd_parms *cmd, void *dcfg, int flag)
const char * cpExpr
Definition: ssl_private.h:424
Definition: ssl_private.h:364
Definition: ssl_private.h:385
const char * ssl_cmd_SSLSessionCache(cmd_parms *, void *, const char *)
void ssl_init_Child(apr_pool_t *, server_rec *)
Definition: ssl_private.h:584
server_rec * server
Definition: ssl_private.h:502
apr_array_header_t * aRandSeed
Definition: ssl_private.h:550
SSL_SESSION * ssl_scache_retrieve(server_rec *, IDCONST UCHAR *, int, apr_pool_t *)
int ssl_hook_Upgrade(request_rec *)
int verify_depth
Definition: ssl_private.h:479
int is_proxy
Definition: ssl_private.h:480
DH * ssl_dh_GetParamFromFile(const char *)
Apache Configuration.
const char * ssl_cmd_SSLProxyProtocol(cmd_parms *, void *, const char *)
const char * ocsp_responder
Definition: ssl_private.h:674
int ssl_callback_SSLVerify(int, X509_STORE_CTX *)
const char * ssl_cmd_SSLCADNRequestFile(cmd_parms *, void *, const char *)
modssl_ctx_t * proxy
Definition: ssl_private.h:729
#define IDCONST
Definition: ssl_private.h:140
Definition: ssl_private.h:384
const char * ssl_cmd_SSLProxyCACertificatePath(cmd_parms *, void *, const char *)
ssl_opt_t nOptions
Definition: ssl_private.h:720
const char * ssl_cmd_SSLProxyMachineCertificateFile(cmd_parms *, void *, const char *)
Definition: apr_arch_file_io.h:107
const char * ssl_cmd_SSLProxyCheckPeerCN(cmd_parms *cmd, void *dcfg, int flag)
Definition: apr_tables.h:62
const char * ssl_cmd_SSLCipherSuite(cmd_parms *, void *, const char *)
module AP_MODULE_DECLARE_DATA ssl_module
const char * ca_cert_file
Definition: ssl_private.h:588
ssl_enabled_t enabled
Definition: ssl_private.h:693
const ap_socache_provider_t * sesscache
Definition: ssl_private.h:546
Definition: ap_expr.h:41
Definition: ssl_private.h:414
const char * ssl_cmd_SSLFIPS(cmd_parms *cmd, void *dcfg, int flag)
int ssl_rand_seed(server_rec *, apr_pool_t *, ssl_rsctx_t, char *)
void * ssl_config_perdir_merge(apr_pool_t *, void *, void *)
apr_size_t nRenegBufferSize
Definition: ssl_private.h:727
Definition: ssl_private.h:398
apr_status_t __attribute__((nonnull(1)))
Definition: ssl_private.h:484
ap_socache_instance_t * sesscache_context
Definition: ssl_private.h:547
const char * ssl_cmd_SSLCryptoDevice(cmd_parms *, void *, const char *)
const char * cert_chain
Definition: ssl_private.h:643
apr_bucket_brigade request_rec apr_pool_t * pool
Definition: mod_dav.h:556
ssl_verify_t nVerifyClient
Definition: ssl_private.h:724
long ssl_io_data_cb(BIO *, int, const char *, int, long, long)
void ssl_config_global_fix(SSLModConfigRec *)
long ocsp_resp_maxage
Definition: ssl_private.h:676
BOOL insecure_reneg
Definition: ssl_private.h:698
ssl_verify_t verify_mode
Definition: ssl_private.h:605
const char * ssl_cmd_SSLCertificateChainFile(cmd_parms *, void *, const char *)
long int nData
Definition: ssl_private.h:452
const dav_resource dav_lockdb dav_lock * request
Definition: mod_dav.h:1336
const char * ssl_cmd_SSLSessionTickets(cmd_parms *, void *, int flag)
const char * ssl_cmd_SSLOCSPResponseTimeSkew(cmd_parms *cmd, void *dcfg, const char *arg)
BOOL compression
Definition: ssl_private.h:707
BOOL proxy_post_config
Definition: ssl_private.h:731
const char * ssl_cmd_SSLHonorCipherOrder(cmd_parms *cmd, void *dcfg, int flag)
const char * verify_info
Definition: ssl_private.h:477
SSLSrvConfigRec * sc
Definition: ssl_private.h:625
apr_status_t ssl_die(server_rec *)
Definition: ssl_private.h:395
void ssl_var_register(apr_pool_t *p)
apr_status_t ssl_init_Engine(server_rec *, apr_pool_t *)
SSL * ssl
Definition: ssl_private.h:473
void ssl_util_ppclose(server_rec *, apr_pool_t *, apr_file_t *)
const char * ssl_cmd_SSLOCSPResponderTimeout(cmd_parms *cmd, void *dcfg, const char *arg)
APR Standard Headers Support.
apr_status_t ssl_init_ConfigureServer(server_rec *, apr_pool_t *, apr_pool_t *, SSLSrvConfigRec *, apr_array_header_t *)
const char * crl_path
Definition: ssl_private.h:646
modssl_ctx_t * server
Definition: ssl_private.h:699
CORE HTTP Daemon.
ssl_asn1_t * ssl_asn1_table_get(apr_hash_t *table, const char *key)
ssl_shutdown_type_e shutdown_type
Definition: ssl_private.h:476
int nVerifyDepth
Definition: ssl_private.h:725
Apache connection library.
int ssl_hook_Auth(request_rec *)
Utilities for EBCDIC conversion.
const char * ssl_cmd_SSLProxyVerify(cmd_parms *, void *, const char *)
const char * szCipherSuite
Definition: ssl_private.h:723
apr_array_header_t * key_files
Definition: ssl_private.h:576
const char const char * uri
Definition: mod_dav.h:618
Definition: mod_auth.h:104
Definition: ssl_private.h:439
void ssl_callback_DelSessionCacheEntry(SSL_CTX *, SSL_SESSION *)
int vhost_id_len
Definition: ssl_private.h:695
const char * ssl_cmd_SSLSessionCacheTimeout(cmd_parms *, void *, const char *)
const char * ca_name_file
Definition: ssl_private.h:581
Definition: ssl_private.h:717
apr_int64_t apr_interval_time_t
Definition: apr_time.h:55
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_var_extract_dns(apr_table_t *t, SSL *ssl, apr_pool_t *p)
Structure to store things which are per connection.
Definition: httpd.h:1110
Definition: ssl_private.h:437
int modssl_verify_ocsp(X509_STORE_CTX *ctx, SSLSrvConfigRec *sc, server_rec *s, conn_rec *c, apr_pool_t *pool)
APLOG_USE_MODULE(ssl)
const char * ssl_cmd_SSLInsecureRenegotiation(cmd_parms *cmd, void *dcfg, int flag)
Virtual Host package.
APR-UTIL registration of functions exported by modules.
const char * ssl_cmd_SSLCertificateFile(cmd_parms *, void *, const char *)
modssl_pk_proxy_t * pkp
Definition: ssl_private.h:630
const char * cert_file
Definition: ssl_private.h:586
int verify_depth
Definition: ssl_private.h:604
const char * ssl_cmd_SSLOptions(cmd_parms *, void *, const char *)
Definition: ssl_private.h:365
ssl_rssrc_t
Definition: ssl_private.h:435
void ssl_io_filter_init(conn_rec *, request_rec *r, SSL *)
apr_file_t * ssl_util_ppopen(server_rec *, apr_pool_t *, const char *, const char *const *)
Definition: ssl_private.h:363
BOOL ssl_util_vhost_matches(const char *servername, server_rec *s)
apr_global_mutex_t * pMutex
Definition: ssl_private.h:549
Definition: ssl_private.h:433
Definition: apr_arch_global_mutex.h:23
Definition: ssl_private.h:467
const char * ssl_cmd_SSLProxyCARevocationPath(cmd_parms *, void *, const char *)
void * ssl_config_perdir_create(apr_pool_t *, char *)
const char * ssl_cmd_SSLCARevocationFile(cmd_parms *, void *, const char *)
BOOL proxy_enabled
Definition: ssl_private.h:730
Apache Logging library.
const char * ssl_cmd_SSLCADNRequestPath(cmd_parms *, void *, const char *)
Definition: http_config.h:295
Apache script tools.
apr_status_t ssl_load_encrypted_pkey(server_rec *, apr_pool_t *, int, const char *, apr_array_header_t **)
apr_int64_t apr_time_t
Definition: apr_time.h:45
const char * ssl_cmd_SSLProtocol(cmd_parms *, void *, const char *)
Expression parser.
Command line options.
void ssl_util_thread_setup(apr_pool_t *)
ssl_enabled_t
Definition: ssl_private.h:413
APR Global Locking Routines.
Definition: ssl_private.h:466
ssl_rssrc_t nSrc
Definition: ssl_private.h:443
void ssl_config_proxy_merge(apr_pool_t *, SSLDirConfigRec *, SSLDirConfigRec *)
apr_array_header_t * aRequirement
Definition: ssl_private.h:719
HTTP Daemon routines.
const char * cipher_suite
Definition: ssl_private.h:505
modssl_auth_ctx_t auth
Definition: ssl_private.h:669
Definition: ssl_private.h:415
int ssl_opt_t
Definition: ssl_private.h:328
Definition: ssl_private.h:596
const char * ssl_cmd_SSLCARevocationPath(cmd_parms *, void *, const char *)
ssl_shutdown_type_e
Definition: ssl_private.h:465
modssl_pk_server_t * pks
Definition: ssl_private.h:629
SSLModConfigRec * mc
Definition: ssl_private.h:692
A structure to store information for each virtual server.
Definition: httpd.h:1302
const char * ssl_cmd_SSLOCSPDefaultResponder(cmd_parms *cmd, void *dcfg, const char *arg)
const char * ssl_cmd_SSLOCSPResponseMaxAge(cmd_parms *cmd, void *dcfg, const char *arg)
const char * ca_cert_file
Definition: ssl_private.h:599
const char * ssl_cmd_SSLRandomSeed(cmd_parms *, void *, const char *, const char *, const char *)
int protocol_set
Definition: ssl_private.h:637
const char * ssl_cmd_SSLProxyCipherSuite(cmd_parms *, void *, const char *)
Definition: ssl_private.h:469
const char * ssl_cmd_SSLStrictSNIVHostCheck(cmd_parms *cmd, void *dcfg, int flag)
Definition: ssl_private.h:573
BOOL session_tickets
Definition: ssl_private.h:709
void ssl_var_log_config_register(apr_pool_t *p)
const char * ssl_cmd_SSLEngine(cmd_parms *, void *, const char *)
int nBytes
Definition: ssl_private.h:445
const char * verify_error
Definition: ssl_private.h:478
const char * ssl_cmd_SSLProxyCARevocationFile(cmd_parms *, void *, const char *)
const char * ssl_cmd_SSLVerifyClient(cmd_parms *, void *, const char *)
int ssl_hook_Access(request_rec *)
BOOL bFixed
Definition: ssl_private.h:539
int ssl_hook_Fixup(request_rec *)
APR Table library.
char * ssl_var_lookup(apr_pool_t *, server_rec *, conn_rec *, request_rec *, char *)
pid_t pid
Definition: ssl_private.h:537
Small object cache provider interface.
char * cpPath
Definition: ssl_private.h:444
const char * ssl_cmd_SSLRenegBufferSize(cmd_parms *cmd, void *dcfg, const char *arg)
Definition: ssl_private.h:432
ssl_verify_t
Definition: ssl_private.h:361
DH * ssl_callback_TmpDH(SSL *, int, int)
APR FNMatch Functions.
const char * ssl_cmd_SSLPassPhraseDialog(cmd_parms *, void *, const char *)
BOOL ssl_util_path_check(ssl_pathcheck_t, const char *, apr_pool_t *)
Definition: ssl_private.h:438
X509 * client_cert
Definition: ssl_private.h:475
APR Platform Definitions.
Definition: ssl_private.h:624
const authz_provider ssl_authz_provider_verify_client
void ssl_callback_Info(const SSL *, int, int)
apr_uri_t * proxy_uri
Definition: ssl_private.h:679
APR general purpose library routines.
const char * ssl_cmd_SSLCARevocationCheck(cmd_parms *, void *, const char *)
SSLDirConfigRec * dc
Definition: ssl_private.h:503
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_SSLRequireSSL(cmd_parms *, void *)
#define BOOL
Definition: ssl_private.h:79
int ssl_stapling_mutex_reinit(server_rec *, apr_pool_t *)
Authentication and Authorization Extension for Apache.
const char * ssl_cmd_SSLProxyVerifyDepth(cmd_parms *, void *, const char *)
BOOL cipher_server_pref
Definition: ssl_private.h:697
apr_hash_t * tPrivateKey
Definition: ssl_private.h:557
char * ssl_util_vhostid(apr_pool_t *, server_rec *)
const char * pphrase_dialog_path
Definition: ssl_private.h:641
struct apr_hash_t apr_hash_t
Definition: apr_hash.h:52
Definition: ssl_private.h:496
HTTP protocol handling.
BOOL ssl_config_global_isfixed(SSLModConfigRec *)
int disabled
Definition: ssl_private.h:481
const char * szUserName
Definition: ssl_private.h:726
apr_time_t source_mtime
Definition: ssl_private.h:454
Definition: apr_uri.h:85
const char * ssl_cmd_SSLProxyCARevocationCheck(cmd_parms *, void *, const char *)
char * ssl_util_readfilter(server_rec *, apr_pool_t *, const char *, const char *const *)
const char * ssl_cmd_SSLProxyCheckPeerExpire(cmd_parms *cmd, void *dcfg, int flag)
Definition: ssl_private.h:485
apr_pool_t * p
apr_status_t ssl_init_CheckServers(server_rec *, apr_pool_t *)
int ssl_proto_t
Definition: ssl_private.h:356
const char * ssl_cmd_SSLOCSPUseRequestNonce(cmd_parms *cmd, void *dcfg, int flag)
ssl_opt_t nOptionsDel
Definition: ssl_private.h:722
* ssl_init_FindCAList(server_rec *, apr_pool_t *, const char *, const char *)
ssl_crlcheck_t
Definition: ssl_private.h:382
Apache Mutex support library.
const char * ssl_cmd_SSLOCSPOverrideResponder(cmd_parms *cmd, void *dcfg, int flag)
long ocsp_resptime_skew
Definition: ssl_private.h:675
void ssl_io_filter_register(apr_pool_t *)
void * ssl_config_server_create(apr_pool_t *, server_rec *)
const char * ssl_cmd_SSLOCSPProxyURL(cmd_parms *cmd, void *dcfg, const char *arg)
#define SSL_CRLCHECK_FLAGS
Definition: ssl_private.h:387
Definition: ssl_private.h:494
#define AP_MODULE_DECLARE_DATA
Definition: macros.h:16
Definition: ssl_private.h:468
Definition: ssl_private.h:451
int ssl_mutex_init(server_rec *, apr_pool_t *)
const char * client_dn
Definition: ssl_private.h:474
apr_status_t ssl_init_Module(apr_pool_t *, apr_pool_t *, apr_pool_t *, server_rec *)
const char * ssl_cmd_SSLCompression(cmd_parms *, void *, int flag)
unsigned char * cpData
Definition: ssl_private.h:453
const char * ssl_cmd_SSLCACertificatePath(cmd_parms *, void *, const char *)
#define UCHAR
Definition: ssl_private.h:261
Apache Request library.
A structure that represents the current request.
Definition: httpd.h:805
apr_array_header_t * cert_files
Definition: ssl_private.h:575
void modssl_var_extract_san_entries(apr_table_t *t, SSL *ssl, apr_pool_t *p)
Definition: ssl_private.h:416
const char * cert_path
Definition: ssl_private.h:587
Apache filter library.
long sesscache_mode
Definition: ssl_private.h:542
apr_interval_time_t ocsp_responder_timeout
Definition: ssl_private.h:677
Definition: ssl_private.h:691
APR Strings library.
int ssl_mutex_off(server_rec *)
apr_status_t ssl_init_ModuleKill(void *data)
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)
ap_expr_info_t * mpExpr
Definition: ssl_private.h:425
BOOL ocsp_force_default
Definition: ssl_private.h:672
BOOL ssl_check_peer_name
Definition: ssl_private.h:687
int ssl_callback_proxy_cert(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
Definition: ssl_private.h:536
const char * ssl_cmd_SSLCACertificateFile(cmd_parms *, void *, const char *)
void ssl_scache_status_register(apr_pool_t *p)
apr_array_header_t * ssl_ext_list(apr_pool_t *p, conn_rec *c, int peer, const char *extension)
struct apr_table_t apr_table_t
Definition: apr_tables.h:56
BOOL ssl_check_peer_expire
Definition: ssl_private.h:688
const char * name
Definition: mod_dav.h:730
Definition: ssl_private.h:383
void ssl_hook_ConfigTest(apr_pool_t *pconf, server_rec *s)
const char * vhost_id
Definition: ssl_private.h:694
void ssl_asn1_table_unset(apr_hash_t *table, const char *key)
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
const char * ca_cert_path
Definition: ssl_private.h:598
Definition: http_config.h:349
apr_status_t ssl_scache_init(server_rec *, apr_pool_t *)
int ssl_callback_NewSessionCacheEntry(SSL *, SSL_SESSION *)
const char * ssl_cmd_SSLCertificateKeyFile(cmd_parms *, void *, const char *)
BOOL ssl_check_peer_cn
Definition: ssl_private.h:686
int apr_status_t
Definition: apr_errno.h:44
ssl_opt_t nOptionsAdd
Definition: ssl_private.h:721
const authz_provider ssl_authz_provider_require_ssl
request_rec * r
Definition: mod_dav.h:519
BOOL ssl_scache_store(server_rec *, IDCONST UCHAR *, int, apr_time_t, SSL_SESSION *, apr_pool_t *)
int ssl_hook_ReadReq(request_rec *)
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
const char * ssl_cmd_SSLVerifyDepth(cmd_parms *, void *, const char *)
const char * ssl_cmd_SSLProxyCACertificateFile(cmd_parms *, void *, const char *)
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_scache_remove(server_rec *, IDCONST UCHAR *, int, apr_pool_t *)
SSL_CTX * ssl_ctx
Definition: ssl_private.h:626
SSL_SESSION * ssl_callback_GetSessionCacheEntry(SSL *, IDCONST unsigned char *, int, int *)
int crl_check_mask
Definition: ssl_private.h:648
const char * ssl_cmd_SSLProxyMachineCertificateChainFile(cmd_parms *, void *, const char *)
Additional Utility Functions for OpenSSL.
void ssl_scache_kill(server_rec *)
const char * ssl_cmd_SSLProxyMachineCertificatePath(cmd_parms *, void *, const char *)
Definition: ssl_private.h:397
struct ap_conf_vector_t ap_conf_vector_t
Definition: http_config.h:510
Definition: ssl_private.h:417
const char * crl_file
Definition: ssl_private.h:647
const char * ssl_cmd_SSLUserName(cmd_parms *, void *, const char *)
void ssl_log_ssl_error(const char *, int, int, server_rec *)
const char * cipher_suite
Definition: ssl_private.h:601
SSLModConfigRec * ssl_config_global_create(server_rec *)
int ssl_hook_UserCheck(request_rec *)
void * ssl_config_server_merge(apr_pool_t *, void *, void *)
int ssl_mutex_on(server_rec *)
unsigned int ssl_pathcheck_t
Definition: ssl_private.h:408
int ssl_mutex_reinit(server_rec *, apr_pool_t *)
BOOL ocsp_enabled
Definition: ssl_private.h:671
int ssl_init_ssl_connection(conn_rec *c, request_rec *r)
DH * modssl_get_dh_params(unsigned keylen)
ssl_pphrase_t
Definition: ssl_private.h:394
apr_hash_t * tVHostKeys
Definition: ssl_private.h:551
int session_cache_timeout
Definition: ssl_private.h:696
Definition: ssl_private.h:423
BOOL ocsp_use_request_nonce
Definition: ssl_private.h:678
int ssl_callback_SSLVerify_CRL(int, X509_STORE_CTX *, conn_rec *)
Definition: ssl_private.h:441
ssl_rsctx_t
Definition: ssl_private.h:431
const char * ssl_cmd_SSLProxyEngine(cmd_parms *cmd, void *dcfg, int flag)
#define UNSET
Definition: ssl_private.h:247
BOOL bSSLRequired
Definition: ssl_private.h:718
ssl_pphrase_t pphrase_dialog_type
Definition: ssl_private.h:640
unsigned char * ssl_asn1_table_set(apr_hash_t *table, const char *key, long int length)
int ssl_io_buffer_fill(request_rec *r, apr_size_t maxlen)
Definition: ssl_private.h:362
#define STACK_OF(x)
Definition: macros.h:26
struct ap_socache_instance_t ap_socache_instance_t
Definition: ap_socache.h:49
Definition: ssl_private.h:472
const char * ssl_cmd_SSLProxyCheckPeerName(cmd_parms *cmd, void *dcfg, int flag)