This may help you; I patched mod_ssl to retrieve the
certificate DN in RFC2253 [LDAP-compliant] format, instead of the deprecated
method currently used:
---
http-2.2.15-baseline/modules/ssl//ssl_engine_vars.c Sat Feb 27
16:00:58 2010 --- http-2.2.15/modules/ssl//ssl_engine_vars.c Tue Mar 23 14:22:53 2010 @@ -367,10 +367,20 @@ } else if (strcEQ(var, "S_DN")) { xsname = X509_get_subject_name(xs); - cp = X509_NAME_oneline(xsname, NULL, 0); - result = apr_pstrdup(p, cp); - modssl_free(cp); - resdup = FALSE; + BIO *bio; + int n; + + if ((bio = BIO_new(BIO_s_mem())) == NULL) { + result = NULL; + } else { + X509_NAME_print_ex(bio, xsname, 0, XN_FLAG_RFC2253); + n = BIO_pending(bio); + result = apr_pcalloc(p, n+1); + n = BIO_read(bio, result, n); + result[n] = NUL; + BIO_free(bio); + resdup = FALSE; + } } else if (strlen(var) > 5 && strcEQn(var, "S_DN_", 5)) { xsname = X509_get_subject_name(xs) See also:
|