[cpp-sp] branch master updated: SSPCPP-803 Pull IIS6/IIS7 coexistance check code.
Rod Widdowson
rdw at steadingsoftware.com
Mon May 14 11:27:28 EDT 2018
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch master
in repository cpp-sp.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=5f56991c996f97a474141a160dba4f4112fe329c
The following commit(s) were added to refs/heads/master by this push:
new 5f56991 SSPCPP-803 Pull IIS6/IIS7 coexistance check code.
5f56991 is described below
commit 5f56991c996f97a474141a160dba4f4112fe329c
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon May 14 16:26:56 2018 +0100
SSPCPP-803 Pull IIS6/IIS7 coexistance check code.
https://issues.shibboleth.net/jira/browse/SSPCPP-803
---
Projects/vc15/iis7_shib/iis7_shib.vcxproj | 1 -
Projects/vc15/iis7_shib/iis7_shib.vcxproj.filters | 3 -
Projects/vc15/isapi_shib/isapi_shib.vcxproj | 1 -
iis7_shib/register.cpp | 10 ---
isapi_shib/isapi_shib.cpp | 10 ---
util/RegistrySignature.cpp | 82 -----------------------
util/RegistrySignature.h | 33 ---------
util/message.mc | 32 ---------
8 files changed, 172 deletions(-)
diff --git a/Projects/vc15/iis7_shib/iis7_shib.vcxproj b/Projects/vc15/iis7_shib/iis7_shib.vcxproj
index e33e97c..9d721a9 100644
--- a/Projects/vc15/iis7_shib/iis7_shib.vcxproj
+++ b/Projects/vc15/iis7_shib/iis7_shib.vcxproj
@@ -209,7 +209,6 @@
<ClCompile Include="..\..\..\iis7_shib\register.cpp" />
<ClCompile Include="..\..\..\iis7_shib\ShibHttpModule.cpp" />
<ClCompile Include="..\..\..\iis7_shib\ShibUser.cpp" />
- <ClCompile Include="..\..\..\util\RegistrySignature.cpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\Iis7_Shib\iis7_shib.rc">
diff --git a/Projects/vc15/iis7_shib/iis7_shib.vcxproj.filters b/Projects/vc15/iis7_shib/iis7_shib.vcxproj.filters
index 4cb3b61..fea5647 100644
--- a/Projects/vc15/iis7_shib/iis7_shib.vcxproj.filters
+++ b/Projects/vc15/iis7_shib/iis7_shib.vcxproj.filters
@@ -18,9 +18,6 @@
<ClCompile Include="..\..\..\iis7_shib\ShibHttpModule.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\util\RegistrySignature.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\..\..\iis7_shib\IIS7Request.cpp">
<Filter>Source Files</Filter>
</ClCompile>
diff --git a/Projects/vc15/isapi_shib/isapi_shib.vcxproj b/Projects/vc15/isapi_shib/isapi_shib.vcxproj
index 282739c..eb647d9 100644
--- a/Projects/vc15/isapi_shib/isapi_shib.vcxproj
+++ b/Projects/vc15/isapi_shib/isapi_shib.vcxproj
@@ -234,7 +234,6 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\Isapi_Shib\isapi_shib.cpp" />
- <ClCompile Include="..\..\..\util\RegistrySignature.cpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\Isapi_Shib\isapi_shib.rc">
diff --git a/iis7_shib/register.cpp b/iis7_shib/register.cpp
index 80153d9..7fdca01 100644
--- a/iis7_shib/register.cpp
+++ b/iis7_shib/register.cpp
@@ -26,7 +26,6 @@
// Project
#include "IIS7_shib.hpp"
#include "ShibHttpModule.hpp"
-#include "../util/RegistrySignature.h"
#include <xmltooling/logging.h>
#pragma warning(disable: 4996)
#include <codecvt> // 16 bit to 8 bit and vice versa chars
@@ -96,15 +95,6 @@ RegisterModule(
return S_OK;
}
- RegistrySignature::CheckSigResult checkSig = RegistrySignature::CheckSignature('IIS7');
- if (RegistrySignature::CheckSigResult::Failed == checkSig) {
- LogEvent(EVENTLOG_WARNING_TYPE, SHIB_NATIVE_CANNOT_CHECK_SIGNATURE, Priority::WARN, "SHIB_NATIVE_CANNOT_CHECK_SIGNATURE");
- }
- else if (RegistrySignature::CheckSigResult::Mismatched == checkSig) {
- LogEvent(EVENTLOG_ERROR_TYPE, SHIB_NATIVE_SIGNATURE_MISMATCH, Priority::FATAL, "SHIB_NATIVE_SIGNATURE_MISMATCH");
- return FALSE;
- }
-
g_Config = &SPConfig::getConfig();
g_Config->setFeatures(
SPConfig::Listener |
diff --git a/isapi_shib/isapi_shib.cpp b/isapi_shib/isapi_shib.cpp
index c722e52..289d34e 100644
--- a/isapi_shib/isapi_shib.cpp
+++ b/isapi_shib/isapi_shib.cpp
@@ -56,8 +56,6 @@
#include <httpext.h>
#include <message.h>
-#include "../util/RegistrySignature.h"
-
using namespace shibsp;
using namespace xmltooling;
using namespace xercesc;
@@ -173,14 +171,6 @@ extern "C" BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pVer)
return TRUE;
}
- RegistrySignature::CheckSigResult checkSig = RegistrySignature::CheckSignature('IIS6');
- if (RegistrySignature::Failed == checkSig) {
- LogEvent(EVENTLOG_WARNING_TYPE, SHIB_ISAPI_CANNOT_CHECK_SIGNATURE, Priority::WARN, "SHIB_ISAPI_CANNOT_CHECK_SIGNATURE");
- } else if (RegistrySignature::Mismatched == checkSig) {
- LogEvent(EVENTLOG_ERROR_TYPE, SHIB_ISAPI_SIGNATURE_MISMATCH, Priority::FATAL, "SHIB_ISAPI_SIGNATURE_MISMATCH");
- return FALSE;
- }
-
g_Config = &SPConfig::getConfig();
g_Config->setFeatures(
SPConfig::Listener |
diff --git a/util/RegistrySignature.cpp b/util/RegistrySignature.cpp
deleted file mode 100644
index c30338c..0000000
--- a/util/RegistrySignature.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
-* Licensed to the University Corporation for Advanced Internet
-* Development, Inc. (UCAID) under one or more contributor license
-* agreements. See the NOTICE file distributed with this work for
-* additional information regarding copyright ownership.
-*
-* UCAID licenses this file to you under the Apache License,
-* Version 2.0 (the "License"); you may not use this file except
-* in compliance with the License. You may obtain a copy of the
-* License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
-* either express or implied. See the License for the specific
-* language governing permissions and limitations under the License.
-*/
-
-/*
- * RegistrySignature.cpp : simple bit of code to check for and write
- * a signature into the registry.
- * - if it's not there we create a volatile key, write it and say "OK"
- * - if it is there and the same then we say OK
- * - if it is there and differs then we delete thekey (resetting the trigger) and say NOT OK
- */
-
-#include "RegistrySignature.h"
-
-namespace RegistrySignature
-{
- CheckSigResult CheckSignature(const DWORD Signature)
- {
-#if _WIN32_WINNT < 0x0600
- // Supress downrev (==VC2010 builds)
- return Matched;
-#else
- const WCHAR KeyName[] = L"SOFTWARE\\Shibboleth\\PublicRWKey\\IsapiPlugin";
- const WCHAR ValueName[] = L"Signature";
-
- struct HKEY_HOLDER {
- private:
- HKEY handle;
- public:
- HKEY_HOLDER(HKEY what)
- {
- handle = what;
- }
- ~HKEY_HOLDER()
- {
- RegCloseKey(handle);
- }
- };
-
- HKEY handle;
- DWORD disposition, key, keySize;
- LONG result;
- result = RegCreateKeyExW(HKEY_LOCAL_MACHINE, KeyName, 0, NULL, REG_OPTION_VOLATILE, KEY_ALL_ACCESS, NULL, &handle, &disposition);
- if (result != ERROR_SUCCESS) {
- return Failed;
- }
- HKEY_HOLDER holder(handle);
- if (disposition == REG_OPENED_EXISTING_KEY) {
- keySize = sizeof(key);
- result = RegGetValueW(handle, nullptr, ValueName, RRF_RT_DWORD, NULL, &key, &keySize);
- if (result == ERROR_SUCCESS) {
- if (key != Signature) {
- result = RegDeleteKeyW(HKEY_LOCAL_MACHINE, KeyName);
- return Mismatched;
- }
- else {
- return Matched;
- }
- }
- }
- result = RegSetValueExW(handle, ValueName, 0, REG_DWORD, reinterpret_cast<const BYTE*>(&Signature), sizeof(Signature));
-
- return (ERROR_SUCCESS == result) ? Matched : Failed;
-#endif
- }
-}
diff --git a/util/RegistrySignature.h b/util/RegistrySignature.h
deleted file mode 100644
index 4120c16..0000000
--- a/util/RegistrySignature.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
-* Licensed to the University Corporation for Advanced Internet
-* Development, Inc. (UCAID) under one or more contributor license
-* agreements. See the NOTICE file distributed with this work for
-* additional information regarding copyright ownership.
-*
-* UCAID licenses this file to you under the Apache License,
-* Version 2.0 (the "License"); you may not use this file except
-* in compliance with the License. You may obtain a copy of the
-* License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
-* either express or implied. See the License for the specific
-* language governing permissions and limitations under the License.
-*/
-
-#pragma once
-#include <windows.h>
-
-namespace RegistrySignature
-{
- enum CheckSigResult {
- Failed,
- Matched,
- Mismatched
- };
-
- CheckSigResult CheckSignature(const DWORD Signature);
-}
\ No newline at end of file
diff --git a/util/message.mc b/util/message.mc
index a209e35..201d69d 100644
--- a/util/message.mc
+++ b/util/message.mc
@@ -169,23 +169,6 @@ Shibboleth ISAPI filter: Caught an Unknown Exception.
.
MessageId=
-Severity=Error
-Facility=ShibbolethISAPI
-SymbolicName=SHIB_ISAPI_CANNOT_CHECK_SIGNATURE
-Language=Neutral
-Shibboleth ISAPI filter: Failed when looking for signature.
-.
-
-MessageId=
-Severity=Error
-Facility=ShibbolethISAPI
-SymbolicName=SHIB_ISAPI_SIGNATURE_MISMATCH
-Language=Neutral
-Shibboleth ISAPI filter: Native Filter is already running, exiting.
-.
-
-
-MessageId=
Severity=Warning
Facility=ShibbolethNative
SymbolicName=SHIB_NATIVE_REENTRANT_INIT
@@ -233,18 +216,3 @@ Language=Neutral
Shibboleth Native filter: Critical Error: %0!s!
.
-MessageId=
-Severity=Error
-Facility=ShibbolethNative
-SymbolicName=SHIB_NATIVE_CANNOT_CHECK_SIGNATURE
-Language=Neutral
-Shibboleth Native filter: Failed when looking for signature (check the status).
-.
-
-MessageId=
-Severity=Error
-Facility=ShibbolethNative
-SymbolicName=SHIB_NATIVE_SIGNATURE_MISMATCH
-Language=Neutral
-Shibboleth ISAPI filter: ISAPI Filter is already running, exiting.
-.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list