1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-05 16:55:50 +03:00

Clear up a const warning, and recognize some arrays by changing the

variable names to the plural [rather than aszFoo, which I hope continues
  to be cleaned up as folks have time.]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93982 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
William A. Rowe Jr
2002-03-17 17:32:24 +00:00
parent 9738c5be8e
commit 05ae021cfd
4 changed files with 18 additions and 18 deletions

View File

@@ -519,8 +519,8 @@ typedef struct {
const char *szVHostID; const char *szVHostID;
int nVHostID_length; int nVHostID_length;
BOOL bEnabled; BOOL bEnabled;
const char *szPublicCertFile[SSL_AIDX_MAX]; const char *szPublicCertFiles[SSL_AIDX_MAX];
const char *szPrivateKeyFile[SSL_AIDX_MAX]; const char *szPrivateKeyFiles[SSL_AIDX_MAX];
const char *szCertificateChain; const char *szCertificateChain;
const char *szCACertificatePath; const char *szCACertificatePath;
const char *szCACertificateFile; const char *szCACertificateFile;

View File

@@ -174,8 +174,8 @@ void *ssl_config_server_create(apr_pool_t *p, server_rec *s)
sc->pSSLProxyCtx = NULL; sc->pSSLProxyCtx = NULL;
#endif #endif
memset(sc->szPublicCertFile, 0, sizeof(sc->szPublicCertFile)); memset((void*)sc->szPublicCertFiles, 0, sizeof(sc->szPublicCertFiles));
memset(sc->szPrivateKeyFile, 0, sizeof(sc->szPrivateKeyFile)); memset((void*)sc->szPrivateKeyFiles, 0, sizeof(sc->szPrivateKeyFiles));
memset(sc->pPublicCert, 0, sizeof(sc->pPublicCert)); memset(sc->pPublicCert, 0, sizeof(sc->pPublicCert));
memset(sc->pPrivateKey, 0, sizeof(sc->pPrivateKey)); memset(sc->pPrivateKey, 0, sizeof(sc->pPrivateKey));
@@ -214,8 +214,8 @@ void *ssl_config_server_merge(apr_pool_t *p, void *basev, void *addv)
cfgMerge(pRevocationStore, NULL); cfgMerge(pRevocationStore, NULL);
for (i = 0; i < SSL_AIDX_MAX; i++) { for (i = 0; i < SSL_AIDX_MAX; i++) {
cfgMergeString(szPublicCertFile[i]); cfgMergeString(szPublicCertFiles[i]);
cfgMergeString(szPrivateKeyFile[i]); cfgMergeString(szPrivateKeyFiles[i]);
cfgMerge(pPublicCert[i], NULL); cfgMerge(pPublicCert[i], NULL);
cfgMerge(pPrivateKey[i], NULL); cfgMerge(pPrivateKey[i], NULL);
} }
@@ -601,11 +601,11 @@ static const char *ssl_cmd_check_aidx_max(cmd_parms *parms,
switch (idx) { switch (idx) {
case SSL_AIDX_CERTS: case SSL_AIDX_CERTS:
desc = "certificates"; desc = "certificates";
files = sc->szPublicCertFile; files = sc->szPublicCertFiles;
break; break;
case SSL_AIDX_KEYS: case SSL_AIDX_KEYS:
desc = "private keys"; desc = "private keys";
files = sc->szPrivateKeyFile; files = sc->szPrivateKeyFiles;
break; break;
} }

View File

@@ -417,7 +417,7 @@ void ssl_init_ConfigureServer(server_rec *s,
* Now check for important parameters and the * Now check for important parameters and the
* possibility that the user forgot to set them. * possibility that the user forgot to set them.
*/ */
if (!sc->szPublicCertFile[0]) { if (!sc->szPublicCertFiles[0]) {
ssl_log(s, SSL_LOG_ERROR, ssl_log(s, SSL_LOG_ERROR,
"Init: (%s) No SSL Certificate set [hint: SSLCertificateFile]", "Init: (%s) No SSL Certificate set [hint: SSLCertificateFile]",
vhost_id); vhost_id);
@@ -826,8 +826,8 @@ void ssl_init_ConfigureServer(server_rec *s,
if (sc->szCertificateChain) { if (sc->szCertificateChain) {
BOOL skip_first = FALSE; BOOL skip_first = FALSE;
for (i = 0; (i < SSL_AIDX_MAX) && sc->szPublicCertFile[i]; i++) { for (i = 0; (i < SSL_AIDX_MAX) && sc->szPublicCertFiles[i]; i++) {
if (strEQ(sc->szPublicCertFile[i], sc->szCertificateChain)) { if (strEQ(sc->szPublicCertFiles[i], sc->szCertificateChain)) {
skip_first = TRUE; skip_first = TRUE;
break; break;
} }

View File

@@ -208,7 +208,7 @@ void ssl_pphrase_Handle(server_rec *s, apr_pool_t *p)
* Read in server certificate(s): This is the easy part * Read in server certificate(s): This is the easy part
* because this file isn't encrypted in any way. * because this file isn't encrypted in any way.
*/ */
if (sc->szPublicCertFile[0] == NULL) { if (sc->szPublicCertFiles[0] == NULL) {
ssl_log(pServ, SSL_LOG_ERROR, ssl_log(pServ, SSL_LOG_ERROR,
"Init: Server %s should be SSL-aware but has no certificate configured " "Init: Server %s should be SSL-aware but has no certificate configured "
"[Hint: SSLCertificateFile]", cpVHostID); "[Hint: SSLCertificateFile]", cpVHostID);
@@ -216,9 +216,9 @@ void ssl_pphrase_Handle(server_rec *s, apr_pool_t *p)
} }
algoCert = SSL_ALGO_UNKNOWN; algoCert = SSL_ALGO_UNKNOWN;
algoKey = SSL_ALGO_UNKNOWN; algoKey = SSL_ALGO_UNKNOWN;
for (i = 0, j = 0; i < SSL_AIDX_MAX && sc->szPublicCertFile[i] != NULL; i++) { for (i = 0, j = 0; i < SSL_AIDX_MAX && sc->szPublicCertFiles[i] != NULL; i++) {
apr_cpystrn(szPath, sc->szPublicCertFile[i], sizeof(szPath)); apr_cpystrn(szPath, sc->szPublicCertFiles[i], sizeof(szPath));
if ( exists_and_readable(szPath, p, NULL) != APR_SUCCESS ) { if ( exists_and_readable(szPath, p, NULL) != APR_SUCCESS ) {
ssl_log(s, SSL_LOG_ERROR|SSL_ADD_ERRNO, ssl_log(s, SSL_LOG_ERROR|SSL_ADD_ERRNO,
"Init: Can't open server certificate file %s", szPath); "Init: Can't open server certificate file %s", szPath);
@@ -277,8 +277,8 @@ void ssl_pphrase_Handle(server_rec *s, apr_pool_t *p)
* phrase for all). When this is the case we can minimize the dialogs * phrase for all). When this is the case we can minimize the dialogs
* by trying to re-use already known/entered pass phrases. * by trying to re-use already known/entered pass phrases.
*/ */
if (sc->szPrivateKeyFile[j] != NULL) if (sc->szPrivateKeyFiles[j] != NULL)
apr_cpystrn(szPath, sc->szPrivateKeyFile[j++], sizeof(szPath)); apr_cpystrn(szPath, sc->szPrivateKeyFiles[j++], sizeof(szPath));
/* /*
* Try to read the private key file with the help of * Try to read the private key file with the help of