Add shireSSLOnly config optopn and check it in mod_shire
authorwarlord <warlord@cb58f699-b61c-0410-a6fe-9272a202ed29>
Tue, 24 Sep 2002 03:31:52 +0000 (03:31 +0000)
committerwarlord <warlord@cb58f699-b61c-0410-a6fe-9272a202ed29>
Tue, 24 Sep 2002 03:31:52 +0000 (03:31 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@89 cb58f699-b61c-0410-a6fe-9272a202ed29

configs/shibboleth.ini
mod_shire/mod_shire.cpp

index 437af5b..511f1c6 100644 (file)
@@ -5,8 +5,9 @@ schemadir=/mit/shibboleth/src/shibboleth/c/schemas/
 [http]
 # These items must live in [http]
 shire=/shibboleth/SHIRE
-wayfLocation=https://shibprod0.internet2.edu/shibboleth/WAYF
+wayfLocation=https://wayf.internet2.edu/shibboleth/WAYF
 cookie=shib-cookie
+shireSSLOnly=true
 
 # these can live anywhere
 supportContact=warlord@MIT.EDU
index cb8580d..9b2ee16 100644 (file)
@@ -388,8 +388,12 @@ extern "C" int shire_check_user(request_rec* r)
 
       try {
 
+       const string& sslonly = ini.get (SHIBTARGET_HTTP, "shireSSLOnly");
+       const char* sslonlyc = sslonly.c_str();
+       
        // Make sure this is SSL, if it should be
-       if (sc->bSSLOnly==1 && strcmp(ap_http_method(r),"https"))
+       if ((*sslonlyc == 't' || *sslonlyc == 'T') &&
+           strcmp(ap_http_method(r),"https"))
          throw ShibTargetException (SHIBRPC_OK,
                                     "blocked non-SSL access to SHIRE POST processor");