From: Stefan Sperling Date: Fri, 1 May 2015 14:03:04 +0000 (+0000) Subject: mod_ssl namespacing: Rename SSL_init_app_data2_idx, SSL_get_app_data2, X-Git-Tag: 2.5.0-alpha~3202 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c3f41f5e13f4674401b7ac77d9816709a6c6bc48;p=apache mod_ssl namespacing: Rename SSL_init_app_data2_idx, SSL_get_app_data2, and SSL_set_app_data2 from SSL_* to modssl_*. Update references in README.dsov.* files. Rename static variable SSL_app_data2_idx to just app_data2_idx since the symbol is internal to ssl_util_ssl.c. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1677143 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ssl/README.dsov.fig b/modules/ssl/README.dsov.fig index d8d03db247..77cd2ca277 100644 --- a/modules/ssl/README.dsov.fig +++ b/modules/ssl/README.dsov.fig @@ -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 diff --git a/modules/ssl/README.dsov.ps b/modules/ssl/README.dsov.ps index def19dbecf..bcbf268713 100644 --- a/modules/ssl/README.dsov.ps +++ b/modules/ssl/README.dsov.ps @@ -1002,7 +1002,7 @@ gs 1 -1 sc (X509_STORE_CTX_get_app_data\(\)) col0 sh gr 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 diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c index adb76e79e5..188d3cb7b6 100644 --- a/modules/ssl/mod_ssl.c +++ b/modules/ssl/mod_ssl.c @@ -539,7 +539,7 @@ int ssl_init_ssl_connection(conn_rec *c, request_rec *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; diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c index 04c244ad9a..b543cb2d44 100644 --- a/modules/ssl/ssl_engine_init.c +++ b/modules/ssl/ssl_engine_init.c @@ -348,7 +348,7 @@ apr_status_t ssl_init_Module(apr_pool_t *p, apr_pool_t *plog, */ 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(); diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c index bdae6c38d1..76df04698e 100644 --- a/modules/ssl/ssl_engine_kernel.c +++ b/modules/ssl/ssl_engine_kernel.c @@ -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 *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); diff --git a/modules/ssl/ssl_util_ssl.c b/modules/ssl/ssl_util_ssl.c index a1fca36202..7d8e73df6c 100644 --- a/modules/ssl/ssl_util_ssl.c +++ b/modules/ssl/ssl_util_ssl.c @@ -38,33 +38,33 @@ * 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); } } -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; } diff --git a/modules/ssl/ssl_util_ssl.h b/modules/ssl/ssl_util_ssl.h index 1b7ae54406..b03bd7160d 100644 --- a/modules/ssl/ssl_util_ssl.h +++ b/modules/ssl/ssl_util_ssl.h @@ -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 *);