From 46e3920048e0be9fd270befa4b59226d4330716d Mon Sep 17 00:00:00 2001 From: Paul Querna Date: Sun, 24 Apr 2005 23:46:06 +0000 Subject: if there aren't any certs.. still set something. --- (limited to 'src/gnutls_hooks.c') diff --git a/src/gnutls_hooks.c b/src/gnutls_hooks.c index f36f9de..575b631 100644 --- a/src/gnutls_hooks.c +++ b/src/gnutls_hooks.c @@ -579,17 +579,19 @@ int mgs_hook_fixups(request_rec *r) } len = sizeof(buf); - if (gnutls_x509_crt_get_dn(cert, buf, &len) == 0) { - apr_table_setn(env, "SSL_SERVER_S_DN", buf); - } + gnutls_x509_crt_get_dn(cert, buf, &len); + apr_table_setn(env, "SSL_SERVER_S_DN", buf); len = sizeof(buf); - if (gnutls_x509_crt_get_issuer_dn(cert, buf, &len) == 0) { - apr_table_setn(env, "SSL_SERVER_I_DN", buf); - } + gnutls_x509_crt_get_issuer_dn(cert, buf, &len); + apr_table_setn(env, "SSL_SERVER_I_DN", buf); gnutls_x509_crt_deinit(cert); } + else { + apr_table_setn(env, "SSL_SERVER_S_DN", "Unknown"); + apr_table_setn(env, "SSL_SERVER_I_DN", "Unknown"); + } } end_fixups: -- cgit v0.9.2