You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Stefan Sperling <st...@apache.org> on 2015/05/01 15:33:15 UTC
Re: mod_ssl namespacing: app_data2
On Sat, Apr 18, 2015 at 07:22:06PM +0200, Stefan Sperling wrote:
> This moves symbols related to '2nd application data' into the ssl_ namespace.
> File-level static symbols have no external linkage so don't need a namespace.
Same patch as before, but moving into modssl_ function namespace,
instead of ssl_ which is used for private functions within OpenSSL.
Index: modules/ssl/README.dsov.fig
===================================================================
--- modules/ssl/README.dsov.fig (revision 1677132)
+++ modules/ssl/README.dsov.fig (working copy)
@@ -339,7 +339,7 @@ Single
4 0 0 200 0 20 8 0.0000 4 90 465 11745 4770 ->method\001
4 0 0 200 0 20 8 0.0000 4 120 1665 9945 6480 X509_STORE_CTX_get_app_data()\001
4 0 0 200 0 20 8 0.0000 4 120 1215 10980 6705 SSL_CTX_get_cert_store()\001
-4 0 0 200 0 20 8 0.0000 4 120 1020 8280 5130 SSL_get_app_data2()\001
+4 0 0 200 0 20 8 0.0000 4 120 1020 8280 5130 modssl_get_app_data2()\001
4 0 0 100 0 18 20 0.0000 4 270 1290 10710 7605 OpenSSL\001
4 0 0 100 0 18 12 0.0000 4 180 720 10710 7785 [Crypto]\001
4 0 0 100 0 18 20 0.0000 4 270 1290 10935 3645 OpenSSL\001
Index: modules/ssl/README.dsov.ps
===================================================================
--- modules/ssl/README.dsov.ps (revision 1677132)
+++ modules/ssl/README.dsov.ps (working copy)
@@ -1002,7 +1002,7 @@ gs 1 -1 sc (X509_STORE_CTX_get_app_data\(\)) col0
gs 1 -1 sc (SSL_CTX_get_cert_store\(\)) col0 sh gr
/Helvetica-Narrow-iso ff 120.00 scf sf
8280 5130 m
-gs 1 -1 sc (SSL_get_app_data2\(\)) col0 sh gr
+gs 1 -1 sc (modssl_get_app_data2\(\)) col0 sh gr
/Helvetica-Bold-iso ff 180.00 scf sf
3645 1620 m
gs 1 -1 sc (SSLDirConfig) col0 sh gr
Index: modules/ssl/mod_ssl.c
===================================================================
--- modules/ssl/mod_ssl.c (revision 1677132)
+++ modules/ssl/mod_ssl.c (working copy)
@@ -539,7 +539,7 @@ int ssl_init_ssl_connection(conn_rec *c, request_r
}
SSL_set_app_data(ssl, c);
- SSL_set_app_data2(ssl, NULL); /* will be request_rec */
+ modssl_set_app_data2(ssl, NULL); /* will be request_rec */
sslconn->ssl = ssl;
Index: modules/ssl/ssl_engine_init.c
===================================================================
--- modules/ssl/ssl_engine_init.c (revision 1677132)
+++ modules/ssl/ssl_engine_init.c (working copy)
@@ -348,7 +348,7 @@ apr_status_t ssl_init_Module(apr_pool_t *p, apr_po
*/
ssl_add_version_components(p, base_server);
- SSL_init_app_data2_idx(); /* for SSL_get_app_data2() at request time */
+ modssl_init_app_data2_idx(); /* for modssl_get_app_data2() at request time */
init_dh_params();
Index: modules/ssl/ssl_engine_kernel.c
===================================================================
--- modules/ssl/ssl_engine_kernel.c (revision 1677132)
+++ modules/ssl/ssl_engine_kernel.c (working copy)
@@ -229,7 +229,7 @@ int ssl_hook_ReadReq(request_rec *r)
}
}
#endif
- SSL_set_app_data2(ssl, r);
+ modssl_set_app_data2(ssl, r);
/*
* Log information about incoming HTTPS requests
@@ -1385,7 +1385,7 @@ int ssl_callback_SSLVerify(int ok, X509_STORE_CTX
SSL *ssl = X509_STORE_CTX_get_ex_data(ctx,
SSL_get_ex_data_X509_STORE_CTX_idx());
conn_rec *conn = (conn_rec *)SSL_get_app_data(ssl);
- request_rec *r = (request_rec *)SSL_get_app_data2(ssl);
+ request_rec *r = (request_rec *)modssl_get_app_data2(ssl);
server_rec *s = r ? r->server : mySrvFromConn(conn);
SSLSrvConfigRec *sc = mySrvConfig(s);
Index: modules/ssl/ssl_util_ssl.c
===================================================================
--- modules/ssl/ssl_util_ssl.c (revision 1677132)
+++ modules/ssl/ssl_util_ssl.c (working copy)
@@ -38,19 +38,19 @@
* also note that OpenSSL increments at static variable when
* SSL_get_ex_new_index() is called, so we _must_ do this at startup.
*/
-static int SSL_app_data2_idx = -1;
+static int app_data2_idx = -1;
-void SSL_init_app_data2_idx(void)
+void modssl_init_app_data2_idx(void)
{
int i;
- if (SSL_app_data2_idx > -1) {
+ if (app_data2_idx > -1) {
return;
}
/* we _do_ need to call this twice */
- for (i=0; i<=1; i++) {
- SSL_app_data2_idx =
+ for (i = 0; i <= 1; i++) {
+ app_data2_idx =
SSL_get_ex_new_index(0,
"Second Application Data for SSL",
NULL, NULL, NULL);
@@ -57,14 +57,14 @@
}
}
-void *SSL_get_app_data2(SSL *ssl)
+void *modssl_get_app_data2(SSL *ssl)
{
- return (void *)SSL_get_ex_data(ssl, SSL_app_data2_idx);
+ return (void *)SSL_get_ex_data(ssl, app_data2_idx);
}
-void SSL_set_app_data2(SSL *ssl, void *arg)
+void modssl_set_app_data2(SSL *ssl, void *arg)
{
- SSL_set_ex_data(ssl, SSL_app_data2_idx, (char *)arg);
+ SSL_set_ex_data(ssl, app_data2_idx, (char *)arg);
return;
}
Index: modules/ssl/ssl_util_ssl.h
===================================================================
--- modules/ssl/ssl_util_ssl.h (revision 1677132)
+++ modules/ssl/ssl_util_ssl.h (working copy)
@@ -57,9 +57,9 @@
/**
* Additional Functions
*/
-void SSL_init_app_data2_idx(void);
-void *SSL_get_app_data2(SSL *);
-void SSL_set_app_data2(SSL *, void *);
+void modssl_init_app_data2_idx(void);
+void *modssl_get_app_data2(SSL *);
+void modssl_set_app_data2(SSL *, void *);
EVP_PKEY *SSL_read_PrivateKey(const char *, EVP_PKEY **, pem_password_cb *, void *);
int SSL_smart_shutdown(SSL *ssl);
BOOL SSL_X509_getBC(X509 *, int *, int *);
Re: mod_ssl namespacing: app_data2
Posted by Greg Stein <gs...@gmail.com>.
On Fri, May 1, 2015 at 8:58 AM, Stefan Sperling <st...@apache.org> wrote:
>...
> So modssl_ has been agreed on? :)
>
It hasn't been agreed. Just not denied. Yet.
:-P
Re: mod_ssl namespacing: app_data2
Posted by Stefan Sperling <st...@apache.org>.
On Fri, May 01, 2015 at 09:39:14AM -0400, Eric Covener wrote:
> On Fri, May 1, 2015 at 9:33 AM, Stefan Sperling <st...@apache.org> wrote:
> >> This moves symbols related to '2nd application data' into the ssl_ namespace.
> >> File-level static symbols have no external linkage so don't need a namespace.
> >
> > Same patch as before, but moving into modssl_ function namespace,
> > instead of ssl_ which is used for private functions within OpenSSL.
>
>
> Hi Stefan -- I think CTR should be fine on these refactorings.
So modssl_ has been agreed on? :)
I'll go ahead. Thanks.
Re: mod_ssl namespacing: app_data2
Posted by Eric Covener <co...@gmail.com>.
On Fri, May 1, 2015 at 9:33 AM, Stefan Sperling <st...@apache.org> wrote:
>> This moves symbols related to '2nd application data' into the ssl_ namespace.
>> File-level static symbols have no external linkage so don't need a namespace.
>
> Same patch as before, but moving into modssl_ function namespace,
> instead of ssl_ which is used for private functions within OpenSSL.
Hi Stefan -- I think CTR should be fine on these refactorings.
--
Eric Covener
covener@gmail.com