aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gnutls_hooks.c6
1 files 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)
557 len = sizeof(sbuf); 557 len = sizeof(sbuf);
558 gnutls_session_get_id(ctxt->session, sbuf, &len); 558 gnutls_session_get_id(ctxt->session, sbuf, &len);
559 tmp = mgs_session_id2sz(sbuf, len, buf, sizeof(buf)); 559 tmp = mgs_session_id2sz(sbuf, len, buf, sizeof(buf));
560 apr_table_setn(env, "SSL_SESSION_ID", tmp); 560 apr_table_setn(env, "SSL_SESSION_ID", apr_pstrdup(r->pool, tmp));
561 561
562 /* TODO: There are many other env vars that we need to add */ 562 /* TODO: There are many other env vars that we need to add */
563 { 563 {
564 len = sizeof(buf); 564 len = sizeof(buf);
565 gnutls_x509_crt_get_dn(ctxt->sc->cert_x509, buf, &len); 565 gnutls_x509_crt_get_dn(ctxt->sc->cert_x509, buf, &len);
566 apr_table_setn(env, "SSL_SERVER_S_DN", buf); 566 apr_table_setn(env, "SSL_SERVER_S_DN", apr_pstrmemdup(r->pool, buf, len));
567 567
568 len = sizeof(buf); 568 len = sizeof(buf);
569 gnutls_x509_crt_get_issuer_dn(ctxt->sc->cert_x509, buf, &len); 569 gnutls_x509_crt_get_issuer_dn(ctxt->sc->cert_x509, buf, &len);
570 apr_table_setn(env, "SSL_SERVER_I_DN", buf); 570 apr_table_setn(env, "SSL_SERVER_I_DN", apr_pstrmemdup(r->pool, buf, len));
571 } 571 }
572 572
573 return rv; 573 return rv;