diff options
Diffstat (limited to 'src/gnutls_hooks.c')
| -rw-r--r-- | src/gnutls_hooks.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gnutls_hooks.c b/src/gnutls_hooks.c index 26917b8..ee3c2db 100644 --- a/src/gnutls_hooks.c +++ b/src/gnutls_hooks.c | |||
| @@ -131,11 +131,13 @@ static int mgs_select_virtual_server_cb(gnutls_session_t session) | |||
| 131 | 131 | ||
| 132 | gnutls_credentials_set(session, GNUTLS_CRD_ANON, ctxt->sc->anon_creds); | 132 | gnutls_credentials_set(session, GNUTLS_CRD_ANON, ctxt->sc->anon_creds); |
| 133 | 133 | ||
| 134 | #ifdef ENABLE_SRP | ||
| 134 | if (ctxt->sc->srp_tpasswd_conf_file != NULL | 135 | if (ctxt->sc->srp_tpasswd_conf_file != NULL |
| 135 | && ctxt->sc->srp_tpasswd_file != NULL) { | 136 | && ctxt->sc->srp_tpasswd_file != NULL) { |
| 136 | gnutls_credentials_set(session, GNUTLS_CRD_SRP, | 137 | gnutls_credentials_set(session, GNUTLS_CRD_SRP, |
| 137 | ctxt->sc->srp_creds); | 138 | ctxt->sc->srp_creds); |
| 138 | } | 139 | } |
| 140 | #endif | ||
| 139 | 141 | ||
| 140 | /* update the priorities - to avoid negotiating a ciphersuite that is not | 142 | /* update the priorities - to avoid negotiating a ciphersuite that is not |
| 141 | * enabled on this virtual server. Note that here we ignore the version | 143 | * enabled on this virtual server. Note that here we ignore the version |
| @@ -379,6 +381,7 @@ mgs_hook_post_config(apr_pool_t * p, apr_pool_t * plog, | |||
| 379 | gnutls_certificate_server_set_retrieve_function(sc->certs, | 381 | gnutls_certificate_server_set_retrieve_function(sc->certs, |
| 380 | cert_retrieve_fn); | 382 | cert_retrieve_fn); |
| 381 | 383 | ||
| 384 | #ifdef ENABLE_SRP | ||
| 382 | if (sc->srp_tpasswd_conf_file != NULL | 385 | if (sc->srp_tpasswd_conf_file != NULL |
| 383 | && sc->srp_tpasswd_file != NULL) { | 386 | && sc->srp_tpasswd_file != NULL) { |
| 384 | rv = gnutls_srp_set_server_credentials_file(sc->srp_creds, | 387 | rv = gnutls_srp_set_server_credentials_file(sc->srp_creds, |
| @@ -395,6 +398,7 @@ mgs_hook_post_config(apr_pool_t * p, apr_pool_t * plog, | |||
| 395 | exit(-1); | 398 | exit(-1); |
| 396 | } | 399 | } |
| 397 | } | 400 | } |
| 401 | #endif | ||
| 398 | 402 | ||
| 399 | if (sc->certs_x509[0] == NULL | 403 | if (sc->certs_x509[0] == NULL |
| 400 | && sc->enabled == GNUTLS_ENABLED_TRUE) { | 404 | && sc->enabled == GNUTLS_ENABLED_TRUE) { |
| @@ -722,8 +726,10 @@ int mgs_hook_fixups(request_rec * r) | |||
| 722 | gnutls_compression_get_name(gnutls_compression_get | 726 | gnutls_compression_get_name(gnutls_compression_get |
| 723 | (ctxt->session))); | 727 | (ctxt->session))); |
| 724 | 728 | ||
| 729 | #ifdef ENABLE_SRP | ||
| 725 | apr_table_setn(env, "SSL_SRP_USER", | 730 | apr_table_setn(env, "SSL_SRP_USER", |
| 726 | gnutls_srp_server_get_username(ctxt->session)); | 731 | gnutls_srp_server_get_username(ctxt->session)); |
| 732 | #endif | ||
| 727 | 733 | ||
| 728 | if (apr_table_get(env, "SSL_CLIENT_VERIFY") == NULL) | 734 | if (apr_table_get(env, "SSL_CLIENT_VERIFY") == NULL) |
| 729 | apr_table_setn(env, "SSL_CLIENT_VERIFY", "NONE"); | 735 | apr_table_setn(env, "SSL_CLIENT_VERIFY", "NONE"); |
