You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by bb...@apache.org on 2022/02/09 18:25:14 UTC

[geode-native] branch develop updated: GEODE-9960: Remove strong name signing support for .net assemblies (#905)

This is an automated email from the ASF dual-hosted git repository.

bbender pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git


The following commit(s) were added to refs/heads/develop by this push:
     new 7b88b9e  GEODE-9960: Remove strong name signing support for .net assemblies (#905)
7b88b9e is described below

commit 7b88b9e4464249fadbe33c29c1bf989f1d6b6e3b
Author: Blake Bender <bb...@pivotal.io>
AuthorDate: Wed Feb 9 10:25:06 2022 -0800

    GEODE-9960: Remove strong name signing support for .net assemblies (#905)
    
    * Remove strong name signing support for .net assemblies
    - This has caused problems with build pipelines, and is no longer used by .net runtimes
    - Make internals visible to test DLL
---
 CMakeLists.txt                               | 10 ----------
 clicache/acceptance-test/CMakeLists.txt      |  7 -------
 clicache/integration-test/CMakeLists.txt     |  7 -------
 clicache/integration-test2/CMakeLists.txt    |  7 -------
 clicache/src/CMakeLists.txt                  |  6 ------
 clicache/src/impl/AssemblyInfo.cpp.in        |  5 +++--
 clicache/test2/CMakeLists.txt                |  7 -------
 templates/security/csharp/CMakeLists.txt     |  6 ------
 tests/cli/DUnitFramework/CMakeLists.txt      |  7 -------
 tests/cli/FwkClient/CMakeLists.txt           |  6 ------
 tests/cli/FwkLauncher/FwkLauncher.csproj.txt |  2 --
 tests/cli/FwkUtil/FwkUtil.csproj.txt         |  2 --
 tests/cli/NewTestObject/CMakeLists.txt       |  6 ------
 tests/cli/PdxClassLibrary/CMakeLists.txt     |  6 ------
 tests/cli/PdxVersion1Lib/CMakeLists.txt      |  6 ------
 tests/cli/PdxVersion2Lib/CMakeLists.txt      |  6 ------
 tests/cli/QueryHelper/CMakeLists.txt         |  1 -
 tests/cli/SecurityUtil/CMakeLists.txt        |  6 ------
 18 files changed, 3 insertions(+), 100 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c12791d..8f517ac 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -283,16 +283,6 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
   # Enables multiprocess compiles
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
 
-  # Enables strong name signing
-  set(STRONG_NAME_KEY "" CACHE FILEPATH "Strong Name Key File")
-  if(EXISTS "${STRONG_NAME_KEY}")
-    set(SHARED_LINKER_FLAGS_STRONG_KEY "/keyfile:${STRONG_NAME_KEY}")
-    execute_process(COMMAND sn -p ${STRONG_NAME_KEY} ${CMAKE_CURRENT_BINARY_DIR}/public.snk)
-    execute_process(COMMAND sn -tp ${CMAKE_CURRENT_BINARY_DIR}/public.snk OUTPUT_VARIABLE STRONG_NAME_PUBLIC_KEY)
-    string(REPLACE "\n" "" STRONG_NAME_PUBLIC_KEY ${STRONG_NAME_PUBLIC_KEY})
-    string(REGEX REPLACE ".*sha1\\):([a-f0-9]+).*" "\\1" STRONG_NAME_PUBLIC_KEY ${STRONG_NAME_PUBLIC_KEY})
-  endif()
-
   find_program(NUGET nuget)
   add_custom_target(nuget-restore 
     COMMAND ${NUGET} restore ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.sln
diff --git a/clicache/acceptance-test/CMakeLists.txt b/clicache/acceptance-test/CMakeLists.txt
index 79e2b13..369684d 100644
--- a/clicache/acceptance-test/CMakeLists.txt
+++ b/clicache/acceptance-test/CMakeLists.txt
@@ -62,11 +62,4 @@ set_target_properties( ${PROJECT_NAME} PROPERTIES
   FOLDER cli/test/acceptance
 )
 
-if(NOT "${STRONG_NAME_KEY}" STREQUAL "")
-  set_target_properties( ${PROJECT_NAME} PROPERTIES
-    VS_GLOBAL_SignAssembly "true"
-    VS_GLOBAL_AssemblyOriginatorKeyFile ${STRONG_NAME_KEY}
-  )
-endif()
-
 add_dependencies(${PROJECT_NAME} nuget-restore)
diff --git a/clicache/integration-test/CMakeLists.txt b/clicache/integration-test/CMakeLists.txt
index d879008..bc9c30e 100644
--- a/clicache/integration-test/CMakeLists.txt
+++ b/clicache/integration-test/CMakeLists.txt
@@ -68,13 +68,6 @@ set_target_properties(Apache.Geode.Client.UnitTests PROPERTIES
   FOLDER cli/test/integration
 )
 
-if(NOT "${STRONG_NAME_KEY}" STREQUAL "")
-  set_target_properties(Apache.Geode.Client.UnitTests PROPERTIES
-    VS_GLOBAL_SignAssembly "true"
-    VS_GLOBAL_AssemblyOriginatorKeyFile ${STRONG_NAME_KEY}
-  )
-endif()
-
 add_dependencies(Apache.Geode.Client.UnitTests FwkClient SqLiteImpl)
 add_dependencies(Apache.Geode.Client.UnitTests nuget-restore)
 
diff --git a/clicache/integration-test2/CMakeLists.txt b/clicache/integration-test2/CMakeLists.txt
index 91cb035..4af499e 100644
--- a/clicache/integration-test2/CMakeLists.txt
+++ b/clicache/integration-test2/CMakeLists.txt
@@ -85,13 +85,6 @@ set_target_properties(Apache.Geode.IntegrationTests2 PROPERTIES
   FOLDER cli/test/integration
 )
 
-if(NOT "${STRONG_NAME_KEY}" STREQUAL "")
-  set_target_properties( Apache.Geode.IntegrationTests2 PROPERTIES
-    VS_GLOBAL_SignAssembly "true"
-    VS_GLOBAL_AssemblyOriginatorKeyFile ${STRONG_NAME_KEY}
-  )
-endif()
-
 add_dependencies(Apache.Geode.IntegrationTests2 nuget-restore)
 
 enable_testing()
diff --git a/clicache/src/CMakeLists.txt b/clicache/src/CMakeLists.txt
index 16503f5..20db4d1 100644
--- a/clicache/src/CMakeLists.txt
+++ b/clicache/src/CMakeLists.txt
@@ -16,9 +16,6 @@
 cmake_minimum_required(VERSION 3.12)
 project(Apache.Geode CXX)
 
-if(NOT "${STRONG_NAME_PUBLIC_KEY}" STREQUAL "")
-  set(STRONG_NAME_PUBLIC_KEY_ATTRIBUTE ", PublicKey=${STRONG_NAME_PUBLIC_KEY}")
-endif()
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/impl/AssemblyInfo.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/impl/AssemblyInfo.cpp)
 list(APPEND CONFIGURE_IN_FILES ${CMAKE_CURRENT_SOURCE_DIR}/impl/AssemblyInfo.cpp.in)
 list(APPEND CONFIGURE_OUT_FILES ${CMAKE_CURRENT_BINARY_DIR}/impl/AssemblyInfo.cpp)
@@ -365,9 +362,6 @@ target_link_options(Apache.Geode
 
 string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
 
-set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${SHARED_LINKER_FLAGS_STRONG_KEY}")
-
-
 include(PrecompiledHeader)
 add_precompiled_header(Apache.Geode-object geode_includes.hpp FORCEINCLUDE)
 
diff --git a/clicache/src/impl/AssemblyInfo.cpp.in b/clicache/src/impl/AssemblyInfo.cpp.in
index f5c82b2..4431eae 100644
--- a/clicache/src/impl/AssemblyInfo.cpp.in
+++ b/clicache/src/impl/AssemblyInfo.cpp.in
@@ -42,5 +42,6 @@ using namespace System::Security::Permissions;
 
 [assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)];
 
-[assembly:InternalsVisibleToAttribute("Apache.Geode.Client.UnitTests@STRONG_NAME_PUBLIC_KEY_ATTRIBUTE@")];
-[assembly:InternalsVisibleToAttribute("cli-unit-tests@STRONG_NAME_PUBLIC_KEY_ATTRIBUTE@")];
+[assembly:InternalsVisibleToAttribute("Apache.Geode.Client.UnitTests")];
+[assembly:InternalsVisibleToAttribute("cli-unit-tests")];
+
diff --git a/clicache/test2/CMakeLists.txt b/clicache/test2/CMakeLists.txt
index 3dd7e8c..f4c9f5d 100644
--- a/clicache/test2/CMakeLists.txt
+++ b/clicache/test2/CMakeLists.txt
@@ -53,13 +53,6 @@ set_target_properties(Apache.Geode.Tests2 PROPERTIES
   FOLDER cli/test/unit
 )
 
-if(NOT "${STRONG_NAME_KEY}" STREQUAL "")
-  set_target_properties(Apache.Geode.Tests2 PROPERTIES
-    VS_GLOBAL_SignAssembly "true"
-    VS_GLOBAL_AssemblyOriginatorKeyFile ${STRONG_NAME_KEY}
-  )
-endif()
-
 add_dependencies(Apache.Geode.Tests2 nuget-restore)
 
 enable_testing()
diff --git a/templates/security/csharp/CMakeLists.txt b/templates/security/csharp/CMakeLists.txt
index 40bc757..c292f98 100644
--- a/templates/security/csharp/CMakeLists.txt
+++ b/templates/security/csharp/CMakeLists.txt
@@ -34,9 +34,3 @@ set_target_properties(Apache.Geode.Templates.Cache.Security PROPERTIES
   FOLDER cli/test/integration
 )
 
-if(NOT "${STRONG_NAME_KEY}" STREQUAL "")
-  set_target_properties(Apache.Geode.Templates.Cache.Security PROPERTIES
-    VS_GLOBAL_SignAssembly "true"
-    VS_GLOBAL_AssemblyOriginatorKeyFile ${STRONG_NAME_KEY}
-  )
-endif()
diff --git a/tests/cli/DUnitFramework/CMakeLists.txt b/tests/cli/DUnitFramework/CMakeLists.txt
index 6202fc2..a37887c 100644
--- a/tests/cli/DUnitFramework/CMakeLists.txt
+++ b/tests/cli/DUnitFramework/CMakeLists.txt
@@ -51,11 +51,4 @@ set_target_properties(DUnitFramework PROPERTIES
   FOLDER cli/test/integration
 )
 
-if(NOT "${STRONG_NAME_KEY}" STREQUAL "")
-  set_target_properties(DUnitFramework PROPERTIES
-    VS_GLOBAL_SignAssembly "true"
-    VS_GLOBAL_AssemblyOriginatorKeyFile ${STRONG_NAME_KEY}
-  )
-endif()
-
 add_dependencies(DUnitFramework nuget-restore)
diff --git a/tests/cli/FwkClient/CMakeLists.txt b/tests/cli/FwkClient/CMakeLists.txt
index 90ddcd3..6e2cef2 100644
--- a/tests/cli/FwkClient/CMakeLists.txt
+++ b/tests/cli/FwkClient/CMakeLists.txt
@@ -36,9 +36,3 @@ set_target_properties(FwkClient PROPERTIES
   FOLDER cli/test/integration
 )
 
-if(NOT "${STRONG_NAME_KEY}" STREQUAL "")
-  set_target_properties(FwkClient PROPERTIES
-    VS_GLOBAL_SignAssembly "true"
-    VS_GLOBAL_AssemblyOriginatorKeyFile ${STRONG_NAME_KEY}
-  )
-endif()
diff --git a/tests/cli/FwkLauncher/FwkLauncher.csproj.txt b/tests/cli/FwkLauncher/FwkLauncher.csproj.txt
index 8396fb7..9152e76 100644
--- a/tests/cli/FwkLauncher/FwkLauncher.csproj.txt
+++ b/tests/cli/FwkLauncher/FwkLauncher.csproj.txt
@@ -30,8 +30,6 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>Apache.Geode.Client.FwkLauncher</RootNamespace>
     <AssemblyName>FwkLauncher</AssemblyName>
-    <SignAssembly>${STRONG_NAME_KEY_ENABLED}</SignAssembly>
-    <AssemblyOriginatorKeyFile>${STRONG_NAME_KEY}</AssemblyOriginatorKeyFile>
     <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
     <FileUpgradeFlags>
     </FileUpgradeFlags>
diff --git a/tests/cli/FwkUtil/FwkUtil.csproj.txt b/tests/cli/FwkUtil/FwkUtil.csproj.txt
index 8e49b59..c0058f3 100644
--- a/tests/cli/FwkUtil/FwkUtil.csproj.txt
+++ b/tests/cli/FwkUtil/FwkUtil.csproj.txt
@@ -30,8 +30,6 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>Apache.Geode.Client.FwkLib</RootNamespace>
     <AssemblyName>FwkUtil</AssemblyName>
-    <SignAssembly>${STRONG_NAME_KEY_ENABLED}</SignAssembly>
-    <AssemblyOriginatorKeyFile>${STRONG_NAME_KEY}</AssemblyOriginatorKeyFile>
     <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
     <FileUpgradeFlags>
     </FileUpgradeFlags>
diff --git a/tests/cli/NewTestObject/CMakeLists.txt b/tests/cli/NewTestObject/CMakeLists.txt
index 4605cb7..8040825 100644
--- a/tests/cli/NewTestObject/CMakeLists.txt
+++ b/tests/cli/NewTestObject/CMakeLists.txt
@@ -53,9 +53,3 @@ set_target_properties(NewTestObject PROPERTIES
   FOLDER cli/test/integration
 )
 
-if(NOT "${STRONG_NAME_KEY}" STREQUAL "")
-  set_target_properties(NewTestObject PROPERTIES
-    VS_GLOBAL_SignAssembly "true"
-    VS_GLOBAL_AssemblyOriginatorKeyFile ${STRONG_NAME_KEY}
-  )
-endif()
diff --git a/tests/cli/PdxClassLibrary/CMakeLists.txt b/tests/cli/PdxClassLibrary/CMakeLists.txt
index 9ce4a6f..075cce4 100644
--- a/tests/cli/PdxClassLibrary/CMakeLists.txt
+++ b/tests/cli/PdxClassLibrary/CMakeLists.txt
@@ -41,9 +41,3 @@ set_target_properties( PdxClassLibrary PROPERTIES
   FOLDER cli/test/integration
 )
 
-if(NOT "${STRONG_NAME_KEY}" STREQUAL "")
-  set_target_properties( PdxClassLibrary PROPERTIES
-    VS_GLOBAL_SignAssembly "true"
-    VS_GLOBAL_AssemblyOriginatorKeyFile ${STRONG_NAME_KEY}
-  )
-endif()
diff --git a/tests/cli/PdxVersion1Lib/CMakeLists.txt b/tests/cli/PdxVersion1Lib/CMakeLists.txt
index 0a8c015..6f9f9fc 100644
--- a/tests/cli/PdxVersion1Lib/CMakeLists.txt
+++ b/tests/cli/PdxVersion1Lib/CMakeLists.txt
@@ -34,9 +34,3 @@ set_target_properties(PdxVersion1Lib PROPERTIES
   FOLDER cli/test/integration
 )
 
-if(NOT "${STRONG_NAME_KEY}" STREQUAL "")
-  set_target_properties(PdxVersion1Lib PROPERTIES
-    VS_GLOBAL_SignAssembly "true"
-    VS_GLOBAL_AssemblyOriginatorKeyFile ${STRONG_NAME_KEY}
-  )
-endif()
diff --git a/tests/cli/PdxVersion2Lib/CMakeLists.txt b/tests/cli/PdxVersion2Lib/CMakeLists.txt
index d4b15b2..cfd2b87 100644
--- a/tests/cli/PdxVersion2Lib/CMakeLists.txt
+++ b/tests/cli/PdxVersion2Lib/CMakeLists.txt
@@ -34,9 +34,3 @@ set_target_properties(PdxVersion2Lib PROPERTIES
   FOLDER cli/test/integration
 )
 
-if(NOT "${STRONG_NAME_KEY}" STREQUAL "")
-  set_target_properties(PdxVersion2Lib PROPERTIES
-    VS_GLOBAL_SignAssembly "true"
-    VS_GLOBAL_AssemblyOriginatorKeyFile ${STRONG_NAME_KEY}
-  )
-endif()
diff --git a/tests/cli/QueryHelper/CMakeLists.txt b/tests/cli/QueryHelper/CMakeLists.txt
index 03164d2..1e5a2e7 100644
--- a/tests/cli/QueryHelper/CMakeLists.txt
+++ b/tests/cli/QueryHelper/CMakeLists.txt
@@ -55,7 +55,6 @@ target_link_libraries(QueryWrapper
 add_dependencies(QueryWrapper Apache.Geode)
 
 string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
-set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${SHARED_LINKER_FLAGS_STRONG_KEY}")
 
 # For Visual Studio organization
 set_target_properties(QueryWrapper PROPERTIES FOLDER cli/test/integration)
diff --git a/tests/cli/SecurityUtil/CMakeLists.txt b/tests/cli/SecurityUtil/CMakeLists.txt
index d3bb9f6..a5dd5f1 100644
--- a/tests/cli/SecurityUtil/CMakeLists.txt
+++ b/tests/cli/SecurityUtil/CMakeLists.txt
@@ -40,9 +40,3 @@ set_target_properties(SecurityUtil PROPERTIES
   FOLDER cli/test/integration
 )
 
-if(NOT "${STRONG_NAME_KEY}" STREQUAL "")
-  set_target_properties(SecurityUtil PROPERTIES
-    VS_GLOBAL_SignAssembly "true"
-    VS_GLOBAL_AssemblyOriginatorKeyFile ${STRONG_NAME_KEY}
-  )
-endif()