You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by do...@apache.org on 2002/03/13 00:05:33 UTC
cvs commit: httpd-2.0/modules/ssl mod_ssl.h ssl_engine_init.c ssl_engine_kernel.c
dougm 02/03/12 15:05:33
Modified: modules/ssl mod_ssl.h ssl_engine_init.c ssl_engine_kernel.c
Log:
for the sake of readablity,
change: SSL_TKPIDX_{DH,RSA}{512,1024}
to: SSL_TMP_KEY_{DH,RSA}_{512,1024}
Revision Changes Path
1.74 +6 -6 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.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- mod_ssl.h 12 Mar 2002 22:50:38 -0000 1.73
+++ mod_ssl.h 12 Mar 2002 23:05:33 -0000 1.74
@@ -299,11 +299,11 @@
* Define IDs for the temporary RSA keys and DH params
*/
-#define SSL_TKPIDX_RSA512 (0)
-#define SSL_TKPIDX_RSA1024 (1)
-#define SSL_TKPIDX_DH512 (2)
-#define SSL_TKPIDX_DH1024 (3)
-#define SSL_TKPIDX_MAX (4)
+#define SSL_TMP_KEY_RSA_512 (0)
+#define SSL_TMP_KEY_RSA_1024 (1)
+#define SSL_TMP_KEY_DH_512 (2)
+#define SSL_TMP_KEY_DH_1024 (3)
+#define SSL_TMP_KEY_MAX (4)
/*
* Define the SSL options
@@ -513,7 +513,7 @@
apr_lock_t *pMutex;
apr_array_header_t *aRandSeed;
apr_hash_t *tVHostKeys;
- void *pTmpKeys[SSL_TKPIDX_MAX];
+ void *pTmpKeys[SSL_TMP_KEY_MAX];
apr_hash_t *tPublicCert;
apr_hash_t *tPrivateKey;
#ifdef SSL_EXPERIMENTAL_ENGINE
1.51 +6 -6 httpd-2.0/modules/ssl/ssl_engine_init.c
Index: ssl_engine_init.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_init.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- ssl_engine_init.c 12 Mar 2002 22:50:38 -0000 1.50
+++ ssl_engine_init.c 12 Mar 2002 23:05:33 -0000 1.51
@@ -130,8 +130,8 @@
}
#define MODSSL_TMP_KEYS_FREE(mc, type) \
- MODSSL_TMP_KEY_FREE(mc, type, SSL_TKPIDX_##type##512); \
- MODSSL_TMP_KEY_FREE(mc, type, SSL_TKPIDX_##type##1024)
+ MODSSL_TMP_KEY_FREE(mc, type, SSL_TMP_KEY_##type##_512); \
+ MODSSL_TMP_KEY_FREE(mc, type, SSL_TMP_KEY_##type##_1024)
static void ssl_tmp_keys_free(server_rec *s)
{
@@ -153,7 +153,7 @@
"Init: Generating temporary RSA private keys (512/1024 bits)");
/* generate 512 bit RSA key */
- if (!(mc->pTmpKeys[SSL_TKPIDX_RSA512] =
+ if (!(mc->pTmpKeys[SSL_TMP_KEY_RSA_512] =
RSA_generate_key(512, RSA_F4, NULL, NULL)))
{
ssl_log(s, SSL_LOG_ERROR,
@@ -163,7 +163,7 @@
}
/* generate 1024 bit RSA key */
- if (!(mc->pTmpKeys[SSL_TKPIDX_RSA1024] =
+ if (!(mc->pTmpKeys[SSL_TMP_KEY_RSA_1024] =
RSA_generate_key(1024, RSA_F4, NULL, NULL)))
{
ssl_log(s, SSL_LOG_ERROR,
@@ -177,7 +177,7 @@
"DH parameters (512/1024 bits)");
/* generate 512 bit DH param */
- if (!(mc->pTmpKeys[SSL_TKPIDX_DH512] =
+ if (!(mc->pTmpKeys[SSL_TMP_KEY_DH_512] =
ssl_dh_GetTmpParam(512)))
{
ssl_log(s, SSL_LOG_ERROR,
@@ -187,7 +187,7 @@
}
/* generate 1024 bit DH param */
- if (!(mc->pTmpKeys[SSL_TKPIDX_DH1024] =
+ if (!(mc->pTmpKeys[SSL_TMP_KEY_DH_1024] =
ssl_dh_GetTmpParam(1024)))
{
ssl_log(s, SSL_LOG_ERROR,
1.46 +8 -8 httpd-2.0/modules/ssl/ssl_engine_kernel.c
Index: ssl_engine_kernel.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_kernel.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- ssl_engine_kernel.c 12 Mar 2002 04:41:57 -0000 1.45
+++ ssl_engine_kernel.c 12 Mar 2002 23:05:33 -0000 1.46
@@ -1226,19 +1226,19 @@
if (export) {
/* It's because an export cipher is used */
if (keylen == 512) {
- rsa = (RSA *)mc->pTmpKeys[SSL_TKPIDX_RSA512];
+ rsa = (RSA *)mc->pTmpKeys[SSL_TMP_KEY_RSA_512];
}
else if (keylen == 1024) {
- rsa = (RSA *)mc->pTmpKeys[SSL_TKPIDX_RSA1024];
+ rsa = (RSA *)mc->pTmpKeys[SSL_TMP_KEY_RSA_1024];
}
else {
/* it's too expensive to generate on-the-fly, so keep 1024bit */
- rsa = (RSA *)mc->pTmpKeys[SSL_TKPIDX_RSA1024];
+ rsa = (RSA *)mc->pTmpKeys[SSL_TMP_KEY_RSA_1024];
}
}
else {
/* It's because a sign-only certificate situation exists */
- rsa = (RSA *)mc->pTmpKeys[SSL_TKPIDX_RSA1024];
+ rsa = (RSA *)mc->pTmpKeys[SSL_TMP_KEY_RSA_1024];
}
return rsa;
@@ -1256,19 +1256,19 @@
if (export) {
/* It's because an export cipher is used */
if (keylen == 512) {
- dh = (DH *)mc->pTmpKeys[SSL_TKPIDX_DH512];
+ dh = (DH *)mc->pTmpKeys[SSL_TMP_KEY_DH_512];
}
else if (keylen == 1024) {
- dh = (DH *)mc->pTmpKeys[SSL_TKPIDX_DH1024];
+ dh = (DH *)mc->pTmpKeys[SSL_TMP_KEY_DH_1024];
}
else {
/* it's too expensive to generate on-the-fly, so keep 1024bit */
- dh = (DH *)mc->pTmpKeys[SSL_TKPIDX_DH1024];
+ dh = (DH *)mc->pTmpKeys[SSL_TMP_KEY_DH_1024];
}
}
else {
/* It's because a sign-only certificate situation exists */
- dh = (DH *)mc->pTmpKeys[SSL_TKPIDX_DH1024];
+ dh = (DH *)mc->pTmpKeys[SSL_TMP_KEY_DH_1024];
}
return dh;