From: cantor Date: Sun, 27 May 2007 03:27:51 +0000 (+0000) Subject: Draft artifact resolver. X-Git-Tag: 2.4~925 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fsp.git;a=commitdiff_plain;h=05e34e05e303ddc66c13efa92e448b654b68df5e Draft artifact resolver. Fixes and properties related to SOAP-based services. Client certificate bridging for Apache and IIS. git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2263 cb58f699-b61c-0410-a6fe-9272a202ed29 --- diff --git a/apache/mod_apache.cpp b/apache/mod_apache.cpp index ccbc0c3..91e196f 100644 --- a/apache/mod_apache.cpp +++ b/apache/mod_apache.cpp @@ -271,7 +271,7 @@ class ShibTargetApache : public AbstractSPRequest { mutable string m_body; mutable bool m_gotBody; - vector m_certs; + mutable vector m_certs; public: request_rec* m_req; @@ -419,13 +419,26 @@ public: in.read(buf,1024); ap_rwrite(buf,in.gcount(),m_req); } - return ((status==XMLTOOLING_HTTP_STATUS_OK) ? DONE : status); + if (status!=XMLTOOLING_HTTP_STATUS_OK) + m_req->status = status; + return DONE; } long sendRedirect(const char* url) { ap_table_set(m_req->headers_out, "Location", url); return REDIRECT; } const vector& getClientCertificates() const { + if (m_certs.empty()) { + const char* cert = ap_table_get(m_req->subprocess_env, "SSL_CLIENT_CERT"); + if (cert) + m_certs.push_back(cert); + int i = 0; + do { + cert = ap_table_get(m_req->subprocess_env, ap_psprintf(m_req->pool, "SSL_CLIENT_CERT_CHAIN_%d", i++)); + if (cert) + m_certs.push_back(cert); + } while (cert); + } return m_certs; } long returnDecline(void) { return DECLINED; } diff --git a/configs/shibboleth.xml.in b/configs/shibboleth.xml.in index bceda8d..df65ed2 100644 --- a/configs/shibboleth.xml.in +++ b/configs/shibboleth.xml.in @@ -214,8 +214,9 @@ logoLocation="/shibboleth-sp/logo.jpg" styleSheet="/shibboleth-sp/main.css"/> - - + +