Skip to content

Commit 6e4857f

Browse files
committed
de-hungarian-ize server config member names which are going to stay
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94264 13f79535-47bb-0310-9956-ffa450edef68
1 parent f60af32 commit 6e4857f

11 files changed

Lines changed: 91 additions & 90 deletions

modules/ssl/mod_ssl.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ static int ssl_hook_pre_connection(conn_rec *c, void *csd)
226226
/*
227227
* Immediately stop processing if SSL is disabled for this connection
228228
*/
229-
if (!(sc && sc->bEnabled)) {
229+
if (!(sc && sc->enabled)) {
230230
return DECLINED;
231231
}
232232

@@ -235,7 +235,7 @@ static int ssl_hook_pre_connection(conn_rec *c, void *csd)
235235
*/
236236
sslconn = apr_pcalloc(c->pool, sizeof(*sslconn));
237237
myConnConfigSet(c, sslconn);
238-
sslconn->log_level = sc->nLogLevel;
238+
sslconn->log_level = sc->log_level;
239239

240240
/*
241241
* Remember the connection information for
@@ -244,7 +244,7 @@ static int ssl_hook_pre_connection(conn_rec *c, void *csd)
244244

245245
ssl_log(c->base_server, SSL_LOG_INFO,
246246
"Connection to child %d established "
247-
"(server %s, client %s)", c->id, sc->szVHostID,
247+
"(server %s, client %s)", c->id, sc->vhost_id,
248248
c->remote_ip ? c->remote_ip : "unknown");
249249

250250
/*
@@ -267,11 +267,11 @@ static int ssl_hook_pre_connection(conn_rec *c, void *csd)
267267
}
268268

269269
if (!SSL_set_session_id_context(ssl,
270-
(unsigned char *)sc->szVHostID,
271-
sc->nVHostID_length))
270+
(unsigned char *)sc->vhost_id,
271+
sc->vhost_id_len))
272272
{
273273
ssl_log(c->base_server, SSL_LOG_ERROR|SSL_ADD_SSLERR,
274-
"Unable to set session id context to `%s'", sc->szVHostID);
274+
"Unable to set session id context to `%s'", sc->vhost_id);
275275

276276
c->aborted = 1;
277277

@@ -461,7 +461,7 @@ static const char *ssl_hook_http_method(const request_rec *r)
461461
{
462462
SSLSrvConfigRec *sc = mySrvConfig(r->server);
463463

464-
if (sc->bEnabled == FALSE) {
464+
if (sc->enabled == FALSE) {
465465
return NULL;
466466
}
467467

@@ -472,7 +472,7 @@ static apr_port_t ssl_hook_default_port(const request_rec *r)
472472
{
473473
SSLSrvConfigRec *sc = mySrvConfig(r->server);
474474

475-
if (sc->bEnabled == FALSE) {
475+
if (sc->enabled == FALSE) {
476476
return 0;
477477
}
478478

modules/ssl/mod_ssl.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -483,13 +483,13 @@ typedef struct {
483483
*/
484484
typedef struct {
485485
SSLModConfigRec *mc;
486-
BOOL bEnabled;
487-
const char *szVHostID;
488-
int nVHostID_length;
489-
const char *szLogFile;
490-
apr_file_t *fileLogFile;
491-
int nLogLevel;
492-
int nSessionCacheTimeout;
486+
BOOL enabled;
487+
const char *vhost_id;
488+
int vhost_id_len;
489+
const char *log_file_name;
490+
apr_file_t *log_file;
491+
int log_level;
492+
int session_cache_timeout;
493493

494494
const char *szPublicCertFiles[SSL_AIDX_MAX];
495495
const char *szPrivateKeyFiles[SSL_AIDX_MAX];

modules/ssl/ssl_engine_config.c

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,13 @@ void *ssl_config_server_create(apr_pool_t *p, server_rec *s)
143143
SSLSrvConfigRec *sc = apr_palloc(p, sizeof(*sc));
144144

145145
sc->mc = ssl_config_global_create(s);
146-
sc->bEnabled = UNSET;
147-
sc->szVHostID = NULL;
148-
sc->nVHostID_length = 0;
149-
sc->szLogFile = NULL;
150-
sc->fileLogFile = NULL;
151-
sc->nLogLevel = SSL_LOG_NONE;
152-
sc->nSessionCacheTimeout = UNSET;
146+
sc->enabled = UNSET;
147+
sc->vhost_id = NULL;
148+
sc->vhost_id_len = 0;
149+
sc->log_file_name = NULL;
150+
sc->log_file = NULL;
151+
sc->log_level = SSL_LOG_NONE;
152+
sc->session_cache_timeout = UNSET;
153153

154154
sc->szCACertificatePath = NULL;
155155
sc->szCACertificateFile = NULL;
@@ -196,12 +196,12 @@ void *ssl_config_server_merge(apr_pool_t *p, void *basev, void *addv)
196196
SSLSrvConfigRec *mrg = (SSLSrvConfigRec *)apr_palloc(p, sizeof(*mrg));
197197

198198
cfgMerge(mc, NULL);
199-
cfgMergeBool(bEnabled);
200-
cfgMergeString(szVHostID);
201-
cfgMergeString(szLogFile);
202-
cfgMerge(fileLogFile, NULL);
203-
cfgMerge(nLogLevel, SSL_LOG_NONE);
204-
cfgMergeInt(nSessionCacheTimeout);
199+
cfgMergeBool(enabled);
200+
cfgMergeString(vhost_id);
201+
cfgMergeString(log_file_name);
202+
cfgMerge(log_file, NULL);
203+
cfgMerge(log_level, SSL_LOG_NONE);
204+
cfgMergeInt(session_cache_timeout);
205205

206206
cfgMergeString(szCACertificatePath);
207207
cfgMergeString(szCACertificateFile);
@@ -518,7 +518,7 @@ const char *ssl_cmd_SSLEngine(cmd_parms *cmd, void *ctx, int flag)
518518
{
519519
SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
520520

521-
sc->bEnabled = flag ? TRUE : FALSE;
521+
sc->enabled = flag ? TRUE : FALSE;
522522

523523
return NULL;
524524
}
@@ -957,9 +957,9 @@ const char *ssl_cmd_SSLSessionCacheTimeout(cmd_parms *cmd, void *ctx,
957957
{
958958
SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
959959

960-
sc->nSessionCacheTimeout = atoi(arg);
960+
sc->session_cache_timeout = atoi(arg);
961961

962-
if (sc->nSessionCacheTimeout < 0) {
962+
if (sc->session_cache_timeout < 0) {
963963
return "SSLSessionCacheTimeout: Invalid argument";
964964
}
965965

@@ -979,7 +979,7 @@ const char *ssl_cmd_SSLLog(cmd_parms *cmd, void *ctx,
979979
return err;
980980
}
981981

982-
sc->szLogFile = arg;
982+
sc->log_file_name = arg;
983983

984984
return NULL;
985985
}
@@ -995,22 +995,22 @@ const char *ssl_cmd_SSLLogLevel(cmd_parms *cmd, void *ctx,
995995
}
996996

997997
if (strcEQ(level, "none")) {
998-
sc->nLogLevel = SSL_LOG_NONE;
998+
sc->log_level = SSL_LOG_NONE;
999999
}
10001000
else if (strcEQ(level, "error")) {
1001-
sc->nLogLevel = SSL_LOG_ERROR;
1001+
sc->log_level = SSL_LOG_ERROR;
10021002
}
10031003
else if (strcEQ(level, "warn")) {
1004-
sc->nLogLevel = SSL_LOG_WARN;
1004+
sc->log_level = SSL_LOG_WARN;
10051005
}
10061006
else if (strcEQ(level, "info")) {
1007-
sc->nLogLevel = SSL_LOG_INFO;
1007+
sc->log_level = SSL_LOG_INFO;
10081008
}
10091009
else if (strcEQ(level, "trace")) {
1010-
sc->nLogLevel = SSL_LOG_TRACE;
1010+
sc->log_level = SSL_LOG_TRACE;
10111011
}
10121012
else if (strcEQ(level, "debug")) {
1013-
sc->nLogLevel = SSL_LOG_DEBUG;
1013+
sc->log_level = SSL_LOG_DEBUG;
10141014
}
10151015
else {
10161016
return "SSLLogLevel: Invalid argument";

modules/ssl/ssl_engine_init.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -227,16 +227,16 @@ int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
227227
/*
228228
* Create the server host:port string because we need it a lot
229229
*/
230-
sc->szVHostID = ssl_util_vhostid(p, s);
231-
sc->nVHostID_length = strlen(sc->szVHostID);
230+
sc->vhost_id = ssl_util_vhostid(p, s);
231+
sc->vhost_id_len = strlen(sc->vhost_id);
232232

233233
/* Fix up stuff that may not have been set */
234-
if (sc->bEnabled == UNSET) {
235-
sc->bEnabled = FALSE;
234+
if (sc->enabled == UNSET) {
235+
sc->enabled = FALSE;
236236
}
237237

238-
if (sc->nSessionCacheTimeout == UNSET) {
239-
sc->nSessionCacheTimeout = SSL_SESSION_CACHE_TIMEOUT;
238+
if (sc->session_cache_timeout == UNSET) {
239+
sc->session_cache_timeout = SSL_SESSION_CACHE_TIMEOUT;
240240
}
241241

242242
if (sc->nPassPhraseDialogType == SSL_PPTYPE_UNSET) {
@@ -302,7 +302,7 @@ int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
302302
* it or give out some information about what we're
303303
* configuring.
304304
*/
305-
if (!sc->bEnabled) {
305+
if (!sc->enabled) {
306306
continue;
307307
}
308308

@@ -488,7 +488,7 @@ static void ssl_init_ctx_callbacks(server_rec *s,
488488
SSL_CTX_set_tmp_rsa_callback(ctx, ssl_callback_TmpRSA);
489489
SSL_CTX_set_tmp_dh_callback(ctx, ssl_callback_TmpDH);
490490

491-
if (sc->nLogLevel >= SSL_LOG_INFO) {
491+
if (sc->log_level >= SSL_LOG_INFO) {
492492
/* this callback only logs if SSLLogLevel >= info */
493493
SSL_CTX_set_info_callback(ctx, ssl_callback_LogTracingState);
494494
}
@@ -830,7 +830,7 @@ static void ssl_init_server_certs(server_rec *s,
830830
SSLSrvConfigRec *sc)
831831
{
832832
const char *rsa_id, *dsa_id;
833-
const char *vhost_id = sc->szVHostID;
833+
const char *vhost_id = sc->vhost_id;
834834
int i;
835835
int have_rsa, have_dsa;
836836

@@ -904,15 +904,15 @@ void ssl_init_CheckServers(server_rec *base_server, apr_pool_t *p)
904904
for (s = base_server; s; s = s->next) {
905905
sc = mySrvConfig(s);
906906

907-
if (sc->bEnabled && (s->port == DEFAULT_HTTP_PORT)) {
907+
if (sc->enabled && (s->port == DEFAULT_HTTP_PORT)) {
908908
ssl_log(base_server, SSL_LOG_WARN,
909909
"Init: (%s) You configured HTTPS(%d) "
910910
"on the standard HTTP(%d) port!",
911911
ssl_util_vhostid(p, s),
912912
DEFAULT_HTTPS_PORT, DEFAULT_HTTP_PORT);
913913
}
914914

915-
if (!sc->bEnabled && (s->port == DEFAULT_HTTPS_PORT)) {
915+
if (!sc->enabled && (s->port == DEFAULT_HTTPS_PORT)) {
916916
ssl_log(base_server, SSL_LOG_WARN,
917917
"Init: (%s) You configured HTTP(%d) "
918918
"on the standard HTTPS(%d) port!",
@@ -932,7 +932,7 @@ void ssl_init_CheckServers(server_rec *base_server, apr_pool_t *p)
932932
for (s = base_server; s; s = s->next) {
933933
sc = mySrvConfig(s);
934934

935-
if (!sc->bEnabled) {
935+
if (!sc->enabled) {
936936
continue;
937937
}
938938

modules/ssl/ssl_engine_io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ void ssl_io_filter_init(conn_rec *c, SSL *ssl)
890890
apr_pool_cleanup_register(c->pool, (void*)filter,
891891
ssl_io_filter_cleanup, apr_pool_cleanup_null);
892892

893-
if (sc->nLogLevel >= SSL_LOG_DEBUG) {
893+
if (sc->log_level >= SSL_LOG_DEBUG) {
894894
BIO_set_callback(SSL_get_rbio(ssl), ssl_io_data_cb);
895895
BIO_set_callback_arg(SSL_get_rbio(ssl), (void *)ssl);
896896
}

modules/ssl/ssl_engine_kernel.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ int ssl_hook_Access(request_rec *r)
350350
/*
351351
* Check to see if SSL protocol is on
352352
*/
353-
if (!(sc->bEnabled || ssl)) {
353+
if (!(sc->enabled || ssl)) {
354354
return DECLINED;
355355
}
356356
/*
@@ -947,7 +947,7 @@ int ssl_hook_UserCheck(request_rec *r)
947947
* - ssl not enabled
948948
* - client did not present a certificate
949949
*/
950-
if (!(sc->bEnabled && sslconn->ssl && sslconn->client_cert) ||
950+
if (!(sc->enabled && sslconn->ssl && sslconn->client_cert) ||
951951
!(dc->nOptions & SSL_OPT_FAKEBASICAUTH) || r->user)
952952
{
953953
return DECLINED;
@@ -1102,7 +1102,7 @@ int ssl_hook_Fixup(request_rec *r)
11021102
/*
11031103
* Check to see if SSL is on
11041104
*/
1105-
if (!(sc->bEnabled && sslconn && (ssl = sslconn->ssl))) {
1105+
if (!(sc->enabled && sslconn && (ssl = sslconn->ssl))) {
11061106
return DECLINED;
11071107
}
11081108

@@ -1274,7 +1274,7 @@ int ssl_callback_SSLVerify(int ok, X509_STORE_CTX *ctx)
12741274
/*
12751275
* Log verification information
12761276
*/
1277-
if (sc->nLogLevel >= SSL_LOG_TRACE) {
1277+
if (sc->log_level >= SSL_LOG_TRACE) {
12781278
X509 *cert = X509_STORE_CTX_get_current_cert(ctx);
12791279
char *sname = X509_NAME_oneline(X509_get_subject_name(cert), NULL, 0);
12801280
char *iname = X509_NAME_oneline(X509_get_issuer_name(cert), NULL, 0);
@@ -1434,7 +1434,7 @@ int ssl_callback_SSLVerify_CRL(int ok, X509_STORE_CTX *ctx, server_rec *s)
14341434
* Log information about CRL
14351435
* (A little bit complicated because of ASN.1 and BIOs...)
14361436
*/
1437-
if (sc->nLogLevel >= SSL_LOG_TRACE) {
1437+
if (sc->log_level >= SSL_LOG_TRACE) {
14381438
char buff[512]; /* should be plenty */
14391439
BIO *bio = BIO_new(BIO_s_mem());
14401440

@@ -1519,7 +1519,7 @@ int ssl_callback_SSLVerify_CRL(int ok, X509_STORE_CTX *ctx, server_rec *s)
15191519
ASN1_INTEGER *sn = X509_REVOKED_get_serialNumber(revoked);
15201520

15211521
if (!ASN1_INTEGER_cmp(sn, X509_get_serialNumber(cert))) {
1522-
if (sc->nLogLevel >= SSL_LOG_INFO) {
1522+
if (sc->log_level >= SSL_LOG_INFO) {
15231523
char *cp = X509_NAME_oneline(issuer, NULL, 0);
15241524
long serial = ASN1_INTEGER_get(sn);
15251525

@@ -1555,7 +1555,7 @@ static void ssl_session_log(server_rec *s,
15551555
char buf[SSL_SESSION_ID_STRING_LEN];
15561556
char timeout_str[56] = {'\0'};
15571557

1558-
if (sc->nLogLevel < SSL_LOG_TRACE) {
1558+
if (sc->log_level < SSL_LOG_TRACE) {
15591559
return;
15601560
}
15611561

@@ -1583,7 +1583,7 @@ int ssl_callback_NewSessionCacheEntry(SSL *ssl, SSL_SESSION *session)
15831583
conn_rec *conn = (conn_rec *)SSL_get_app_data(ssl);
15841584
server_rec *s = conn->base_server;
15851585
SSLSrvConfigRec *sc = mySrvConfig(s);
1586-
long timeout = sc->nSessionCacheTimeout;
1586+
long timeout = sc->session_cache_timeout;
15871587
BOOL rc;
15881588
unsigned char *id;
15891589
unsigned int idlen;
@@ -1715,7 +1715,7 @@ void ssl_callback_LogTracingState(SSL *ssl, int where, int rc)
17151715
/*
17161716
* create the various trace messages
17171717
*/
1718-
if (sc->nLogLevel >= SSL_LOG_TRACE) {
1718+
if (sc->log_level >= SSL_LOG_TRACE) {
17191719
if (where & SSL_CB_HANDSHAKE_START) {
17201720
ssl_log(s, SSL_LOG_TRACE,
17211721
"%s: Handshake: start", SSL_LIBRARY_NAME);

0 commit comments

Comments
 (0)