ssl_engine_vars.c revision bc8fd1b0b1afdf89b8d28eefa8cd74e26ba97986
2a693c01b154f1e25931ff6c754d2d02096e2662Till Mossakowski** _ __ ___ ___ __| | ___ ___| | mod_ssl
4c7f058cdd19ce67b2b5d4b7f69703d0f8a21e38Christian Maeder** | '_ ` _ \ / _ \ / _` | / __/ __| | Apache Interface to OpenSSL
2a693c01b154f1e25931ff6c754d2d02096e2662Till Mossakowski** | | | | | | (_) | (_| | \__ \__ \ | www.modssl.org
97018cf5fa25b494adffd7e9b4e87320dae6bf47Christian Maeder** |_| |_| |_|\___/ \__,_|___|___/___/_| ftp.modssl.org
2a693c01b154f1e25931ff6c754d2d02096e2662Till Mossakowski** Variable Lookup Facility
f3a94a197960e548ecd6520bb768cb0d547457bbChristian Maeder/* ====================================================================
684ada8af5c3e6da5c1a69edb6f233c9f2db4ebdWiebke Herding * The Apache Software License, Version 1.1
e4e1509ff358e739fddf1483ad39467e0e1becc2Christian Maeder * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
a10ff6125d62484ec5961c8a5d9d1c5a3e14fa66Christian Maeder * Redistribution and use in source and binary forms, with or without
e4e1509ff358e739fddf1483ad39467e0e1becc2Christian Maeder * modification, are permitted provided that the following conditions
76647324ed70f33b95a881b536d883daccf9568dChristian Maeder * 1. Redistributions of source code must retain the above copyright
a10ff6125d62484ec5961c8a5d9d1c5a3e14fa66Christian Maeder * notice, this list of conditions and the following disclaimer.
a10ff6125d62484ec5961c8a5d9d1c5a3e14fa66Christian Maeder * 2. Redistributions in binary form must reproduce the above copyright
2a693c01b154f1e25931ff6c754d2d02096e2662Till Mossakowski * notice, this list of conditions and the following disclaimer in
2a693c01b154f1e25931ff6c754d2d02096e2662Till Mossakowski * the documentation and/or other materials provided with the
2a693c01b154f1e25931ff6c754d2d02096e2662Till Mossakowski * distribution.
50dce6b011347f92377adb8bbabaeeb80975e86dChristian Maeder * 3. The end-user documentation included with the redistribution,
3a761fd74f4f3c5587a199553c0ee7383e5d8ff3Christian Maeder * if any, must include the following acknowledgment:
4c7f058cdd19ce67b2b5d4b7f69703d0f8a21e38Christian Maeder * "This product includes software developed by the
50dce6b011347f92377adb8bbabaeeb80975e86dChristian Maeder * Apache Software Foundation (http://www.apache.org/)."
c74040e2ca9d0534d0c4244f69a3e76a01341f05Klaus Luettich * Alternately, this acknowledgment may appear in the software itself,
81101b83a042f5a1bdeeef93b1b49aff05817e44Christian Maeder * if and wherever such third-party acknowledgments normally appear.
2a693c01b154f1e25931ff6c754d2d02096e2662Till Mossakowski * 4. The names "Apache" and "Apache Software Foundation" must
2a693c01b154f1e25931ff6c754d2d02096e2662Till Mossakowski * not be used to endorse or promote products derived from this
05ca76b03b6d16bcfb3e7654c31e41a220e85663Till Mossakowski * software without prior written permission. For written
7c757dd5b0b027dfc0cd0b9535758c8992cdde2fChristian Maeder * permission, please contact apache@apache.org.
7c757dd5b0b027dfc0cd0b9535758c8992cdde2fChristian Maeder * 5. Products derived from this software may not be called "Apache",
7c757dd5b0b027dfc0cd0b9535758c8992cdde2fChristian Maeder * nor may "Apache" appear in their name, without prior written
7c757dd5b0b027dfc0cd0b9535758c8992cdde2fChristian Maeder * permission of the Apache Software Foundation.
2a693c01b154f1e25931ff6c754d2d02096e2662Till Mossakowski * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
3a761fd74f4f3c5587a199553c0ee7383e5d8ff3Christian Maeder * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
9eb39c7a0e7a1ddad1eec1d23c6d4e3a99c54023Christian Maeder * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3a761fd74f4f3c5587a199553c0ee7383e5d8ff3Christian Maeder * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
2a693c01b154f1e25931ff6c754d2d02096e2662Till Mossakowski * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
86b1d0c80abdd4ca36491cf7025b718a5fea5080Christian Maeder * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
86b1d0c80abdd4ca36491cf7025b718a5fea5080Christian Maeder * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
86b1d0c80abdd4ca36491cf7025b718a5fea5080Christian Maeder * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
4c7f058cdd19ce67b2b5d4b7f69703d0f8a21e38Christian Maeder * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
4c7f058cdd19ce67b2b5d4b7f69703d0f8a21e38Christian Maeder * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
4c7f058cdd19ce67b2b5d4b7f69703d0f8a21e38Christian Maeder * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
4c7f058cdd19ce67b2b5d4b7f69703d0f8a21e38Christian Maeder * SUCH DAMAGE.
c2db39a683438b0f3d484519f4c93db26eec9d2eWiebke Herding * ====================================================================
c2db39a683438b0f3d484519f4c93db26eec9d2eWiebke Herding /* ``Those of you who think they
9eb39c7a0e7a1ddad1eec1d23c6d4e3a99c54023Christian Maeder know everything are very annoying
f7d2e793728bbb7fd185e027eb9dfd7b9dd11c21Christian Maeder to those of us who do.''
e85b224577b78d08ba5c39fe9dcc2e53995454a2Christian Maeder -- Unknown */
f7d2e793728bbb7fd185e027eb9dfd7b9dd11c21Christian Maeder/* _________________________________________________________________
e85b224577b78d08ba5c39fe9dcc2e53995454a2Christian Maeder** Variable Lookup
f7d2e793728bbb7fd185e027eb9dfd7b9dd11c21Christian Maeder** _________________________________________________________________
2a693c01b154f1e25931ff6c754d2d02096e2662Till Mossakowskistatic char *ssl_var_lookup_header(apr_pool_t *p, request_rec *r, const char *name);
2a693c01b154f1e25931ff6c754d2d02096e2662Till Mossakowskistatic char *ssl_var_lookup_ssl(apr_pool_t *p, conn_rec *c, char *var);
2a693c01b154f1e25931ff6c754d2d02096e2662Till Mossakowskistatic char *ssl_var_lookup_ssl_cert(apr_pool_t *p, X509 *xs, char *var);
2a693c01b154f1e25931ff6c754d2d02096e2662Till Mossakowskistatic char *ssl_var_lookup_ssl_cert_dn(apr_pool_t *p, X509_NAME *xsname, char *var);
bec7e681b0ba4d085638ec7af0cf7ae5068840caChristian Maederstatic char *ssl_var_lookup_ssl_cert_valid(apr_pool_t *p, ASN1_UTCTIME *tm);
5824312cc0cfccce61f195fbe92307a21a467049Christian Maederstatic char *ssl_var_lookup_ssl_cert_serial(apr_pool_t *p, X509 *xs);
a10ff6125d62484ec5961c8a5d9d1c5a3e14fa66Christian Maederstatic char *ssl_var_lookup_ssl_cert_chain(apr_pool_t *p, STACK_OF(X509) *sk, char *var);
7b27b67b1c8516d7ccf1610a17fec93662d6a93fChristian Maederstatic char *ssl_var_lookup_ssl_cert_PEM(apr_pool_t *p, X509 *xs);
e85b224577b78d08ba5c39fe9dcc2e53995454a2Christian Maederstatic char *ssl_var_lookup_ssl_cert_verify(apr_pool_t *p, conn_rec *c);
0d9160e906743b226d4768707f84151ab6c66253Heng Jiangstatic char *ssl_var_lookup_ssl_cipher(apr_pool_t *p, conn_rec *c, char *var);
f7d2e793728bbb7fd185e027eb9dfd7b9dd11c21Christian Maederstatic void ssl_var_lookup_ssl_cipher_bits(SSL *ssl, int *usekeysize, int *algkeysize);
f7d2e793728bbb7fd185e027eb9dfd7b9dd11c21Christian Maederstatic char *ssl_var_lookup_ssl_version(apr_pool_t *p, char *var);
f6c04b8534762854072795add026d4551156a410Heng Jiangchar *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r, char *var)
3a761fd74f4f3c5587a199553c0ee7383e5d8ff3Christian Maeder * When no pool is given try to find one
0e2ae85e2453466d03c1fc5884a3d693235bb9d9Christian Maeder else if (c != NULL)
e85b224577b78d08ba5c39fe9dcc2e53995454a2Christian Maeder * Request dependent stuff
3a761fd74f4f3c5587a199553c0ee7383e5d8ff3Christian Maeder result = ssl_var_lookup_header(p, r, "User-Agent");
e85b224577b78d08ba5c39fe9dcc2e53995454a2Christian Maeder result = ssl_var_lookup_header(p, r, "Referer");
2a693c01b154f1e25931ff6c754d2d02096e2662Till Mossakowski result = ssl_var_lookup_header(p, r, "Cookie");
cd6e5706893519bfcf24539afa252fcbed5097ddKlaus Luettich result = ssl_var_lookup_header(p, r, "Forwarded");
return result;
return hdr;
char *result;
return result;
char *result;
int nid;
char *cp;
return result;
char *name;
int nid;
} ssl_var_lookup_ssl_cert_dn_rec[] = {
{ NULL, 0 }
char *result;
unsigned char *data_ptr;
int data_len;
#ifdef CHARSET_EBCDIC
return result;
char *result;
return NULL;
return result;
char *result;
return NULL;
return result;
char *result;
return result;
char *result;
return NULL;
return result;
char *result;
long vrc;
const char *verr;
const char *vinfo;
return result;
char *result;
return result;
*usekeysize = 0;
*algkeysize = 0;
char *result;
return result;
#include "../../modules/loggers/mod_log_config.h"
if (log_pfn_register) {
char *result;
return NULL;
return result;
char *result;
return result;