summaryrefslogtreecommitdiffstatsabout
path: root/src/gnutls_hooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gnutls_hooks.c')
-rw-r--r--src/gnutls_hooks.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gnutls_hooks.c b/src/gnutls_hooks.c
index 55a1120..0483602 100644
--- a/src/gnutls_hooks.c
+++ b/src/gnutls_hooks.c
@@ -115,11 +115,13 @@ static int mgs_select_virtual_server_cb(gnutls_session_t session)
115 115
116 gnutls_credentials_set(session, GNUTLS_CRD_ANON, ctxt->sc->anon_creds); 116 gnutls_credentials_set(session, GNUTLS_CRD_ANON, ctxt->sc->anon_creds);
117 117
118#ifdef ENABLE_SRP
118 if (ctxt->sc->srp_tpasswd_conf_file != NULL 119 if (ctxt->sc->srp_tpasswd_conf_file != NULL
119 && ctxt->sc->srp_tpasswd_file != NULL) { 120 && ctxt->sc->srp_tpasswd_file != NULL) {
120 gnutls_credentials_set(session, GNUTLS_CRD_SRP, 121 gnutls_credentials_set(session, GNUTLS_CRD_SRP,
121 ctxt->sc->srp_creds); 122 ctxt->sc->srp_creds);
122 } 123 }
124#endif
123 125
124 /* update the priorities - to avoid negotiating a ciphersuite that is not 126 /* update the priorities - to avoid negotiating a ciphersuite that is not
125 * enabled on this virtual server. Note that here we ignore the version 127 * enabled on this virtual server. Note that here we ignore the version
@@ -313,6 +315,7 @@ mgs_hook_post_config(apr_pool_t * p, apr_pool_t * plog,
313 gnutls_certificate_server_set_retrieve_function(sc->certs, 315 gnutls_certificate_server_set_retrieve_function(sc->certs,
314 cert_retrieve_fn); 316 cert_retrieve_fn);
315 317
318#ifdef ENABLE_SRP
316 if (sc->srp_tpasswd_conf_file != NULL 319 if (sc->srp_tpasswd_conf_file != NULL
317 && sc->srp_tpasswd_file != NULL) { 320 && sc->srp_tpasswd_file != NULL) {
318 rv = gnutls_srp_set_server_credentials_file(sc->srp_creds, 321 rv = gnutls_srp_set_server_credentials_file(sc->srp_creds,
@@ -329,6 +332,7 @@ mgs_hook_post_config(apr_pool_t * p, apr_pool_t * plog,
329 exit(-1); 332 exit(-1);
330 } 333 }
331 } 334 }
335#endif
332 336
333 if (sc->certs_x509[0] == NULL 337 if (sc->certs_x509[0] == NULL
334 && sc->enabled == GNUTLS_ENABLED_TRUE) { 338 && sc->enabled == GNUTLS_ENABLED_TRUE) {
@@ -662,8 +666,10 @@ int mgs_hook_fixups(request_rec * r)
662 gnutls_compression_get_name(gnutls_compression_get 666 gnutls_compression_get_name(gnutls_compression_get
663 (ctxt->session))); 667 (ctxt->session)));
664 668
669#ifdef ENABLE_SRP
665 apr_table_setn(env, "SSL_SRP_USER", 670 apr_table_setn(env, "SSL_SRP_USER",
666 gnutls_srp_server_get_username(ctxt->session)); 671 gnutls_srp_server_get_username(ctxt->session));
672#endif
667 673
668 if (apr_table_get(env, "SSL_CLIENT_VERIFY") == NULL) 674 if (apr_table_get(env, "SSL_CLIENT_VERIFY") == NULL)
669 apr_table_setn(env, "SSL_CLIENT_VERIFY", "NONE"); 675 apr_table_setn(env, "SSL_CLIENT_VERIFY", "NONE");