From 1fdb35f3173d0b7160f1cc36e24378a038b16c0b Mon Sep 17 00:00:00 2001 From: Oleksandr Poliakov <31327136+sanych-sun@users.noreply.github.com> Date: Wed, 17 Jul 2024 15:05:18 -0700 Subject: [PATCH] CSHARP-5182: Provide Strong-Named Assembly of libmongocrypt (#864) --- .evergreen/config.yml | 8 ++++---- bindings/cs/CMakeLists.txt | 1 + bindings/cs/MongoDB.Driver.snk | Bin 0 -> 596 bytes .../MongoDB.Libmongocrypt.Test.csproj | 2 ++ .../MongoDB.Libmongocrypt.Test32.csproj | 2 ++ bindings/cs/MongoDB.Libmongocrypt/AssemblyInfo.cs | 4 ++-- .../MongoDB.Libmongocrypt.csproj | 2 ++ 7 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 bindings/cs/MongoDB.Driver.snk diff --git a/.evergreen/config.yml b/.evergreen/config.yml index fe6b4f22d..0280648e8 100755 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1093,7 +1093,7 @@ buildvariants: - build-and-test-and-upload - build-and-test-shared-bson - build-and-test-asan-mac - - build-and-test-csharp + # - build-and-test-csharp // temporary removed to make strong named release. - test-java - name: rhel72-zseries-test display_name: "RHEL 7.2 on zSeries" @@ -1134,7 +1134,7 @@ buildvariants: tasks: - build-and-test-and-upload - build-and-test-shared-bson - - build-and-test-csharp + # - build-and-test-csharp // temporary removed to make strong named release. - test-java - name: windows-test-python display_name: "Windows Python" @@ -1447,7 +1447,7 @@ buildvariants: - build-and-test-and-upload - build-and-test-shared-bson - build-and-test-asan - - build-and-test-csharp + # - build-and-test-csharp // temporary removed to make strong named release. - test-java - name: publish-packages distros: @@ -1489,7 +1489,7 @@ buildvariants: - build-and-test-and-upload - build-and-test-shared-bson - build-and-test-asan - - build-and-test-csharp + # - build-and-test-csharp // temporary removed to make strong named release. - test-java - upload-java - publish-packages diff --git a/bindings/cs/CMakeLists.txt b/bindings/cs/CMakeLists.txt index bd709d704..f55cc0783 100644 --- a/bindings/cs/CMakeLists.txt +++ b/bindings/cs/CMakeLists.txt @@ -1,5 +1,6 @@ configure_file(cs.sln cs.sln COPYONLY) +configure_file(MongoDB.Driver.snk MongoDB.Driver.snk COPYONLY) configure_file(MongoDB.Libmongocrypt/MongoDB.Libmongocrypt.csproj MongoDB.Libmongocrypt/MongoDB.Libmongocrypt.csproj COPYONLY) configure_file(MongoDB.Libmongocrypt/Package.include.template.csproj MongoDB.Libmongocrypt/Package.csproj.include) diff --git a/bindings/cs/MongoDB.Driver.snk b/bindings/cs/MongoDB.Driver.snk new file mode 100644 index 0000000000000000000000000000000000000000..f8eaad4c83ffd99202de3aac958f115824211313 GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50096sD1Qw&gTSD5$c_x!Jn1`P5CiPJUXl$; zjB+?uPfagRXc214D9N%DLEJirc6q@?Rv9ZRFJI!p9b!%hl+y_Rdz8O#*DCKDK>>gM zC35MI8PUcWW9E#|?PqgJLd!EdfQ~q4%jPkYaunk(K%cStV*R$ANlYa$=1M^17uN1? zdmXUaa~!|IBHp7E?aR_%7KCJv^}uS7FU%Srm0@vcEl4xlOWz`B0Ha~gPV7)iJqKN- zYCdAnbTaPCtM&JrRI7CQ4%v|tCH)E1$_P6^gbm^%Y6$o^ySnqD3S_^1fTR@R8Q2g< z5_OAp2`vXnoJ6~+RW4drhH#lsu$1xvS9aV(m2L6L_=O?sQ4AYpB)37Ro7%PcDyXJVheS*_AnyCPU false + true + ..\MongoDB.Driver.snk diff --git a/bindings/cs/MongoDB.Libmongocrypt.Test32/MongoDB.Libmongocrypt.Test32.csproj b/bindings/cs/MongoDB.Libmongocrypt.Test32/MongoDB.Libmongocrypt.Test32.csproj index f13794d79..5f5cb2d82 100644 --- a/bindings/cs/MongoDB.Libmongocrypt.Test32/MongoDB.Libmongocrypt.Test32.csproj +++ b/bindings/cs/MongoDB.Libmongocrypt.Test32/MongoDB.Libmongocrypt.Test32.csproj @@ -4,6 +4,8 @@ net472;netcoreapp2.1;netcoreapp3.0 netcoreapp2.1;netcoreapp3.0 false + true + ..\MongoDB.Driver.snk diff --git a/bindings/cs/MongoDB.Libmongocrypt/AssemblyInfo.cs b/bindings/cs/MongoDB.Libmongocrypt/AssemblyInfo.cs index 7b0f531f5..0d7b58a7c 100644 --- a/bindings/cs/MongoDB.Libmongocrypt/AssemblyInfo.cs +++ b/bindings/cs/MongoDB.Libmongocrypt/AssemblyInfo.cs @@ -1,4 +1,4 @@ using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("MongoDB.Libmongocrypt.Test")] -[assembly: InternalsVisibleTo("MongoDB.Libmongocrypt.Test32")] +[assembly: InternalsVisibleTo("MongoDB.Libmongocrypt.Test, PublicKey=002400000480000094000000060200000024000052534131000400000100010035287f0d3883c0a075c88e0cda3ce93b621003ecbd5e920d4a8c7238564f4d2f4f68116aca28c9b21341dc3a877679c14556192b2b2f5fe2c11d624e0894d308ff7b94bf6fd72aef1b41017ffe2572e99019d1c61963e68cd0ed67734a42cb333b808e3867cbe631937214e32e409fb1fa62fdb69d494c2530e64a40e417d6ee")] +[assembly: InternalsVisibleTo("MongoDB.Libmongocrypt.Test32, PublicKey=002400000480000094000000060200000024000052534131000400000100010035287f0d3883c0a075c88e0cda3ce93b621003ecbd5e920d4a8c7238564f4d2f4f68116aca28c9b21341dc3a877679c14556192b2b2f5fe2c11d624e0894d308ff7b94bf6fd72aef1b41017ffe2572e99019d1c61963e68cd0ed67734a42cb333b808e3867cbe631937214e32e409fb1fa62fdb69d494c2530e64a40e417d6ee")] diff --git a/bindings/cs/MongoDB.Libmongocrypt/MongoDB.Libmongocrypt.csproj b/bindings/cs/MongoDB.Libmongocrypt/MongoDB.Libmongocrypt.csproj index a1d3b7de0..049f45e8c 100644 --- a/bindings/cs/MongoDB.Libmongocrypt/MongoDB.Libmongocrypt.csproj +++ b/bindings/cs/MongoDB.Libmongocrypt/MongoDB.Libmongocrypt.csproj @@ -24,6 +24,8 @@ mongodb;mongo;nosql en-US true + true + ..\MongoDB.Driver.snk