You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2004/03/04 14:06:55 UTC
cvs commit: httpd-2.0/modules/ssl mod_ssl.h ssl_engine_vars.c
jorton 2004/03/04 05:06:55
Modified: modules/ssl mod_ssl.h ssl_engine_vars.c
Log:
* modules/ssl/mod_ssl.h: Declare ssl_is_https optional function.
* modules/ssl/ssl_engine_vars (ssl_is_https): New function.
(ssl_var_register): Register it.
Revision Changes Path
1.150 +4 -0 httpd-2.0/modules/ssl/mod_ssl.h
Index: mod_ssl.h
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ssl/mod_ssl.h,v
retrieving revision 1.149
retrieving revision 1.150
diff -w -d -u -r1.149 -r1.150
--- mod_ssl.h 28 Feb 2004 18:06:34 -0000 1.149
+++ mod_ssl.h 4 Mar 2004 13:06:54 -0000 1.150
@@ -26,6 +26,10 @@
conn_rec *, request_rec *,
char *));
+/* An optional function which returns non-zero if the given connection
+ * is using SSL/TLS. */
+APR_DECLARE_OPTIONAL_FN(int, ssl_is_https, (conn_rec *));
+
/* The ssl_proxy_enable() and ssl_engine_disable() optional functions
* are used by mod_proxy to enable use of SSL for outgoing
* connections. */
1.38 +7 -0 httpd-2.0/modules/ssl/ssl_engine_vars.c
Index: ssl_engine_vars.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_vars.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -w -d -u -r1.37 -r1.38
--- ssl_engine_vars.c 4 Mar 2004 07:59:30 -0000 1.37
+++ ssl_engine_vars.c 4 Mar 2004 13:06:54 -0000 1.38
@@ -48,8 +48,15 @@
static void ssl_var_lookup_ssl_cipher_bits(SSL *ssl, int *usekeysize, int *algkeysize);
static char *ssl_var_lookup_ssl_version(apr_pool_t *p, char *var);
+static int ssl_is_https(conn_rec *c)
+{
+ SSLConnRec *sslconn = myConnConfig(c);
+ return sslconn && sslconn->ssl;
+}
+
void ssl_var_register(void)
{
+ APR_REGISTER_OPTIONAL_FN(ssl_is_https);
APR_REGISTER_OPTIONAL_FN(ssl_var_lookup);
return;
}