From 38435cc416d6b177c94266da98104cc29661e608 Mon Sep 17 00:00:00 2001 From: Paul Querna Date: Sun, 24 Apr 2005 23:55:23 +0000 Subject: apr_table_setn doesn't copy the data. oops. --- src/gnutls_hooks.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gnutls_hooks.c b/src/gnutls_hooks.c index 27d9c53..7c14f07 100644 --- a/src/gnutls_hooks.c +++ b/src/gnutls_hooks.c @@ -557,17 +557,17 @@ int mgs_hook_fixups(request_rec *r) len = sizeof(sbuf); gnutls_session_get_id(ctxt->session, sbuf, &len); tmp = mgs_session_id2sz(sbuf, len, buf, sizeof(buf)); - apr_table_setn(env, "SSL_SESSION_ID", tmp); + apr_table_setn(env, "SSL_SESSION_ID", apr_pstrdup(r->pool, tmp)); /* TODO: There are many other env vars that we need to add */ { len = sizeof(buf); gnutls_x509_crt_get_dn(ctxt->sc->cert_x509, buf, &len); - apr_table_setn(env, "SSL_SERVER_S_DN", buf); + apr_table_setn(env, "SSL_SERVER_S_DN", apr_pstrmemdup(r->pool, buf, len)); len = sizeof(buf); gnutls_x509_crt_get_issuer_dn(ctxt->sc->cert_x509, buf, &len); - apr_table_setn(env, "SSL_SERVER_I_DN", buf); + apr_table_setn(env, "SSL_SERVER_I_DN", apr_pstrmemdup(r->pool, buf, len)); } return rv; -- cgit