Client certificate bridge.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Sun, 27 May 2007 04:02:45 +0000 (04:02 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Sun, 27 May 2007 04:02:45 +0000 (04:02 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2264 cb58f699-b61c-0410-a6fe-9272a202ed29

nsapi_shib/nsapi_shib.cpp

index e834762..f27c8dc 100644 (file)
@@ -182,7 +182,7 @@ class ShibTargetNSAPI : public AbstractSPRequest
   string m_uri;
   mutable string m_body;
   mutable bool m_gotBody;
-  vector<string> m_certs;
+  mutable vector<string> m_certs;
 
 public:
   ShibTargetNSAPI(pblock* pb, ::Session* sn, Request* rq) : m_gotBody(false) {
@@ -344,6 +344,11 @@ public:
   long returnDecline() { return REQ_NOACTION; }
   long returnOK() { return REQ_PROCEED; }
   const vector<string>& getClientCertificates() const {
+      if (m_certs.empty()) {
+          const char* cert = pblock_findval("auth-cert", m_rq->vars);
+          if (cert)
+              m_certs.push_back(cert);
+      }
       return m_certs;
   }