aboutsummaryrefslogtreecommitdiffstats
path: root/src/mod_gnutls.c
diff options
context:
space:
mode:
authorGravatar Paul Querna 2004-12-09 07:52:31 +0000
committerGravatar Paul Querna 2004-12-09 07:52:31 +0000
commit32f2e601850dbbfb34180763df507d103c6b6aff (patch)
tree9b50b30743958f0a4e2c71f3d7f762b6170952f9 /src/mod_gnutls.c
parent0314debf01c32040851395b66669b75bbc1220cc (diff)
fixes and stuff that i should of already committed.
Diffstat (limited to 'src/mod_gnutls.c')
-rw-r--r--src/mod_gnutls.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/mod_gnutls.c b/src/mod_gnutls.c
index f1ab6a2..04f7db9 100644
--- a/src/mod_gnutls.c
+++ b/src/mod_gnutls.c
@@ -44,8 +44,9 @@ static int mod_gnutls_hook_pre_config(apr_pool_t * pconf,
44} 44}
45 45
46#define DH_BITS 1024 46#define DH_BITS 1024
47#ifdef USE_RSA
47#define RSA_BITS 512 48#define RSA_BITS 512
48 49#endif
49static int mod_gnutls_hook_post_config(apr_pool_t * p, apr_pool_t * plog, 50static int mod_gnutls_hook_post_config(apr_pool_t * p, apr_pool_t * plog,
50 apr_pool_t * ptemp, 51 apr_pool_t * ptemp,
51 server_rec * base_server) 52 server_rec * base_server)
@@ -53,15 +54,17 @@ static int mod_gnutls_hook_post_config(apr_pool_t * p, apr_pool_t * plog,
53 mod_gnutls_srvconf_rec *sc; 54 mod_gnutls_srvconf_rec *sc;
54 server_rec *s; 55 server_rec *s;
55 gnutls_dh_params_t dh_params; 56 gnutls_dh_params_t dh_params;
57#ifdef USE_RSA
56 gnutls_rsa_params_t rsa_params; 58 gnutls_rsa_params_t rsa_params;
57 59#endif
58 60
59 /* TODO: Should we regenerate these after X requests / X time ? */ 61 /* TODO: Should we regenerate these after X requests / X time ? */
60 gnutls_dh_params_init(&dh_params); 62 gnutls_dh_params_init(&dh_params);
61 gnutls_dh_params_generate2(dh_params, DH_BITS); 63 gnutls_dh_params_generate2(dh_params, DH_BITS);
62// gnutls_rsa_params_init(&rsa_params); 64#ifdef USE_RSA
63// gnutls_rsa_params_generate2(rsa_params, RSA_BITS); 65 gnutls_rsa_params_init(&rsa_params);
64 66 gnutls_rsa_params_generate2(rsa_params, RSA_BITS);
67#endif
65 for (s = base_server; s; s = s->next) { 68 for (s = base_server; s; s = s->next) {
66 sc = (mod_gnutls_srvconf_rec *) ap_get_module_config(s->module_config, 69 sc = (mod_gnutls_srvconf_rec *) ap_get_module_config(s->module_config,
67 &gnutls_module); 70 &gnutls_module);
@@ -69,7 +72,9 @@ static int mod_gnutls_hook_post_config(apr_pool_t * p, apr_pool_t * plog,
69 gnutls_certificate_set_x509_key_file(sc->certs, sc->cert_file, 72 gnutls_certificate_set_x509_key_file(sc->certs, sc->cert_file,
70 sc->key_file, 73 sc->key_file,
71 GNUTLS_X509_FMT_PEM); 74 GNUTLS_X509_FMT_PEM);
72// gnutls_certificate_set_rsa_export_params(sc->certs, rsa_params); 75#ifdef USE_RSA
76 gnutls_certificate_set_rsa_export_params(sc->certs, rsa_params);
77#endif
73 gnutls_certificate_set_dh_params(sc->certs, dh_params); 78 gnutls_certificate_set_dh_params(sc->certs, dh_params);
74 } 79 }
75 else if (sc->enabled == GNUTLS_ENABLED_TRUE) { 80 else if (sc->enabled == GNUTLS_ENABLED_TRUE) {