Changeset 369f47a in mod_gnutls for src/gnutls_hooks.c


Ignore:
Timestamp:
Jan 29, 2013, 3:41:38 PM (7 years ago)
Author:
Daniel Kahn Gillmor <dkg@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, msva, upstream
Children:
8400c2e
Parents:
b8df283
git-author:
Daniel Kahn Gillmor <dkg@…> (01/26/13 02:57:28)
git-committer:
Daniel Kahn Gillmor <dkg@…> (01/29/13 15:41:38)
Message:

avoid calling gnutls_srp_server_get_username() unless SRP is configured

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_hooks.c

    rb8df283 r369f47a  
    735735
    736736#ifdef ENABLE_SRP
    737     tmp = gnutls_srp_server_get_username(ctxt->session);
    738     apr_table_setn(env, "SSL_SRP_USER", (tmp != NULL) ? tmp : "");
     737    if (ctxt->sc->srp_tpasswd_conf_file != NULL && ctxt->sc->srp_tpasswd_file != NULL) {
     738        tmp = gnutls_srp_server_get_username(ctxt->session);
     739        apr_table_setn(env, "SSL_SRP_USER", (tmp != NULL) ? tmp : "");
     740    } else {
     741        apr_table_unset(env, "SSL_SRP_USER");
     742    }
    739743#endif
    740744
Note: See TracChangeset for help on using the changeset viewer.