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Client/tests/FunctionalTests/Resources/Certificate3.pfx b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Resources/Certificate3.pfx
new file mode 100644
index 0000000000000000000000000000000000000000..86294195bd7137fa5fe659fa4a9ecde1c096dc52
GIT binary patch
literal 2612
zcmZXUc{J2*8^?cRHtSG!!jLTW&`+{&F;Uq)WZx5p>`S(K7)uf&TV`TtWGhRFD1;K(
z_hm#FS+Zt{vE-ee^S;k}-t(UOT=)IGKG*fV&;8GRfjCBx4gv*n3@ZqRvvF7Bc3B`u
zNFI)15{6?Kr{Q4`2mkdyCHOiF2VbV)1zJ!LO#gN4z>@TLNNXZ(=JEB
z=x0hw+y^;w`snD8eJ~ts>_^n=oJWpk60^u&`J=1IdspJ>V@%p4(Ri@2Hvf`xGNVFL
zY&wg8lFYFb@79Fp;4|&8@rIo|I`S?kU{+B$(VHTXfRWb6JeGF`=D*UVVy|BN7A)vd
zG;?)b@F+5-H-F6er_JgVTJR{my|=;mxwTe;mgyQQGDt2cjqA(W31$o5X)sDD>&@<2
z_kM?9tCK&|gKAvIp@%l{%SvsO1#0D%!^7?ta{!sLE%{hs)HIH+MXcD`ec4XTGyd%J
zJeLg36$;jwu)??&PAw>{@ih~ROeXo3^CG?79yAL+LiG#Tg+=+o&h{N`R`}49-
z6EBiktCs9wAwMWz-!6=!S8$TuhWc!H#T8elTy?avCSGT!+hMLyNlhD>O(>8Ks(S1N`_cR4l5BVEs|#1wO*$%B
z`{>I@u1vc5jfs)quL{T;m
zH{FToR{g;zU+27Bs53o*$4x<(rV%0=*`JQH{kY`e^U^!Ho1c4S72eHLVx0&)#UuJ!
z8w7~pa$iyXD%Kwb6kYn2IIoa`DNy@V
z;jmcc+dI-n%mJBPY!Vrn750oR;?V~TUnIh+c^h0u^T#!Y^4{+jm~~r)axgz+NZ
zy})sJQty$b#s$0k8GM8iw;dR?OYfKQt4ZdmG@p;;S(Yj2Fkn#+t7abS;HgdcGOc56
zbg;>PJk{)=;yDykbezGSh)mf#^d=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jE=&naWekGPncDwRX_(FhGyaH9Br^60F!eHdNUS^eN&}TY
zR3Y^l#UO^;W(}P%qp!4h+efAicrp4b8bdS!#L(^TNg
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Microsoft.Data.SqlClient.Tests.Resources {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Data.SqlClient.Tests.Resources.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Byte[].
+ ///
+ internal static byte[] Certificate1 {
+ get {
+ object obj = ResourceManager.GetObject("Certificate1", resourceCulture);
+ return ((byte[])(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Byte[].
+ ///
+ internal static byte[] Certificate2 {
+ get {
+ object obj = ResourceManager.GetObject("Certificate2", resourceCulture);
+ return ((byte[])(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Byte[].
+ ///
+ internal static byte[] Certificate3 {
+ get {
+ object obj = ResourceManager.GetObject("Certificate3", resourceCulture);
+ return ((byte[])(obj));
+ }
+ }
+ }
+}
diff --git a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Resources/Resources.resx b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Resources/Resources.resx
new file mode 100644
index 0000000000..3e5ca2faac
--- /dev/null
+++ b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Resources/Resources.resx
@@ -0,0 +1,130 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+ Certificate1.pfx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Certificate2.pfx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Certificate3.pfx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/Setup/CertificateUtility.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/Setup/CertificateUtility.cs
index de03f6cfb7..3560fe2746 100644
--- a/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/Setup/CertificateUtility.cs
+++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/Setup/CertificateUtility.cs
@@ -19,6 +19,8 @@ namespace Microsoft.Data.SqlClient.ManualTesting.Tests.AlwaysEncrypted
{
class CertificateUtility
{
+ public const string EmbeddedCertificatePassword = @"P@zzw0rD!SqlvN3x+";
+
private CertificateUtility()
{
}
@@ -196,7 +198,7 @@ internal static byte[] DecryptRsaDirectly(byte[] rsaPfx, byte[] ciphertextCek, s
Debug.Assert(rsaPfx != null && rsaPfx.Length > 0);
// The rest of the parameters may be invalid for exception handling test cases
- X509Certificate2 x509 = new X509Certificate2(rsaPfx, @"P@zzw0rD!SqlvN3x+");
+ X509Certificate2 x509 = new X509Certificate2(rsaPfx, EmbeddedCertificatePassword);
Debug.Assert(x509.HasPrivateKey);
@@ -210,7 +212,7 @@ internal static bool VerifyRsaSignatureDirectly(byte[] hashedCek, byte[] signedC
{
Debug.Assert(rsaPfx != null && rsaPfx.Length > 0);
- X509Certificate2 x509 = new X509Certificate2(rsaPfx, @"P@zzw0rD!SqlvN3x+");
+ X509Certificate2 x509 = new X509Certificate2(rsaPfx, EmbeddedCertificatePassword);
Debug.Assert(x509.HasPrivateKey);
SqlColumnEncryptionCertificateStoreProvider rsaProvider = new SqlColumnEncryptionCertificateStoreProvider();
From c199ddd9bbd5bbfc8cdfa43c4eb85570e95dfec1 Mon Sep 17 00:00:00 2001
From: Edward Neal <55035479+edwardneal@users.noreply.github.com>
Date: Tue, 19 Nov 2024 19:18:40 +0000
Subject: [PATCH 07/12] Added extra Unix-specific exceptions
Converting more unusually-embedded PFX files into embedded resources
---
.../src/Microsoft/Data/SqlClient/SqlUtil.cs | 48 +++++--
.../src/Resources/Strings.Designer.cs | 52 +++++++-
.../src/Resources/Strings.resx | 12 ++
...ncryptionCertificateStoreProviderShould.cs | 43 ++++--
.../AlwaysEncryptedTests/Utility.cs | 8 +-
.../Resources/Certificate4.pfx | Bin 0 -> 2612 bytes
.../Resources/Certificate5.pfx | Bin 0 -> 2612 bytes
.../Resources/Resources.Designer.cs | 20 +++
.../FunctionalTests/Resources/Resources.resx | 6 +
.../TestFixtures/Setup/CertificateUtility.cs | 3 +-
....Data.SqlClient.ManualTesting.Tests.csproj | 9 ++
.../ManualTests/Resources/Certificate1.pfx | Bin 0 -> 2604 bytes
.../Resources/Resources.Designer.cs | 73 +++++++++++
.../ManualTests/Resources/Resources.resx | 124 ++++++++++++++++++
14 files changed, 369 insertions(+), 29 deletions(-)
create mode 100644 src/Microsoft.Data.SqlClient/tests/FunctionalTests/Resources/Certificate4.pfx
create mode 100644 src/Microsoft.Data.SqlClient/tests/FunctionalTests/Resources/Certificate5.pfx
create mode 100644 src/Microsoft.Data.SqlClient/tests/ManualTests/Resources/Certificate1.pfx
create mode 100644 src/Microsoft.Data.SqlClient/tests/ManualTests/Resources/Resources.Designer.cs
create mode 100644 src/Microsoft.Data.SqlClient/tests/ManualTests/Resources/Resources.resx
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlUtil.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlUtil.cs
index 57ad0d9844..1ef4d3bf19 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlUtil.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlUtil.cs
@@ -1696,14 +1696,29 @@ internal static Exception LargeCertificatePathLength(int actualLength, int maxLe
internal static Exception NullCertificatePath(string[] validLocations, bool isSystemOp)
{
- Debug.Assert(2 == validLocations.Length);
- if (isSystemOp)
+ if (Environment.OSVersion.Platform == PlatformID.Win32NT)
{
- return ADP.ArgumentNull(TdsEnums.TCE_PARAM_MASTERKEY_PATH, StringsHelper.GetString(Strings.TCE_NullCertificatePathSysErr, validLocations[0], validLocations[1], @"/"));
+ Debug.Assert(validLocations.Length == 2);
+ if (isSystemOp)
+ {
+ return ADP.ArgumentNull(TdsEnums.TCE_PARAM_MASTERKEY_PATH, StringsHelper.GetString(Strings.TCE_NullCertificatePathSysErr, validLocations[0], validLocations[1], @"/"));
+ }
+ else
+ {
+ return ADP.ArgumentNull(TdsEnums.TCE_PARAM_MASTERKEY_PATH, StringsHelper.GetString(Strings.TCE_NullCertificatePath, validLocations[0], validLocations[1], @"/"));
+ }
}
else
{
- return ADP.ArgumentNull(TdsEnums.TCE_PARAM_MASTERKEY_PATH, StringsHelper.GetString(Strings.TCE_NullCertificatePath, validLocations[0], validLocations[1], @"/"));
+ Debug.Assert(validLocations.Length == 1);
+ if (isSystemOp)
+ {
+ return ADP.ArgumentNull(TdsEnums.TCE_PARAM_MASTERKEY_PATH, StringsHelper.GetString(Strings.TCE_NullCertificatePathSysErr_Unix, validLocations[0], @"/"));
+ }
+ else
+ {
+ return ADP.ArgumentNull(TdsEnums.TCE_PARAM_MASTERKEY_PATH, StringsHelper.GetString(Strings.TCE_NullCertificatePath_Unix, validLocations[0], @"/"));
+ }
}
}
@@ -1733,14 +1748,29 @@ internal static Exception NullCngKeyPath(bool isSystemOp)
internal static Exception InvalidCertificatePath(string actualCertificatePath, string[] validLocations, bool isSystemOp)
{
- Debug.Assert(2 == validLocations.Length);
- if (isSystemOp)
+ if (Environment.OSVersion.Platform == PlatformID.Win32NT)
{
- return ADP.Argument(StringsHelper.GetString(Strings.TCE_InvalidCertificatePathSysErr, actualCertificatePath, validLocations[0], validLocations[1], @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
+ Debug.Assert(validLocations.Length == 2);
+ if (isSystemOp)
+ {
+ return ADP.Argument(StringsHelper.GetString(Strings.TCE_InvalidCertificatePathSysErr, actualCertificatePath, validLocations[0], validLocations[1], @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
+ }
+ else
+ {
+ return ADP.Argument(StringsHelper.GetString(Strings.TCE_InvalidCertificatePath, actualCertificatePath, validLocations[0], validLocations[1], @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
+ }
}
else
{
- return ADP.Argument(StringsHelper.GetString(Strings.TCE_InvalidCertificatePath, actualCertificatePath, validLocations[0], validLocations[1], @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
+ Debug.Assert(validLocations.Length == 1);
+ if (isSystemOp)
+ {
+ return ADP.Argument(StringsHelper.GetString(Strings.TCE_InvalidCertificatePathSysErr_Unix, actualCertificatePath, validLocations[0], @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
+ }
+ else
+ {
+ return ADP.Argument(StringsHelper.GetString(Strings.TCE_InvalidCertificatePath_Unix, actualCertificatePath, validLocations[0], @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
+ }
}
}
@@ -1856,6 +1886,7 @@ internal static Exception InvalidCertificateLocation(string certificateLocation,
{
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
{
+ Debug.Assert(validLocations.Length == 2);
if (isSystemOp)
{
return ADP.Argument(StringsHelper.GetString(Strings.TCE_InvalidCertificateLocationSysErr, certificateLocation, certificatePath, validLocations[0], validLocations[1], @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
@@ -1867,6 +1898,7 @@ internal static Exception InvalidCertificateLocation(string certificateLocation,
}
else
{
+ Debug.Assert(validLocations.Length == 1);
if (isSystemOp)
{
return ADP.Argument(StringsHelper.GetString(Strings.TCE_InvalidCertificateLocationSysErr_Unix, certificateLocation, certificatePath, validLocations[0], @"/"), TdsEnums.TCE_PARAM_MASTERKEY_PATH);
diff --git a/src/Microsoft.Data.SqlClient/src/Resources/Strings.Designer.cs b/src/Microsoft.Data.SqlClient/src/Resources/Strings.Designer.cs
index 119d049b93..f87b2c259a 100644
--- a/src/Microsoft.Data.SqlClient/src/Resources/Strings.Designer.cs
+++ b/src/Microsoft.Data.SqlClient/src/Resources/Strings.Designer.cs
@@ -12812,7 +12812,18 @@ internal static string TCE_InvalidCertificatePath {
return ResourceManager.GetString("TCE_InvalidCertificatePath", resourceCulture);
}
}
-
+
+ ///
+ /// Looks up a localized string similar to Invalid certificate path: '{0}'. Use the following format: <certificate location>{2}<certificate store>{2}<certificate thumbprint>, where <certificate location> is '{1}'..
+ ///
+ internal static string TCE_InvalidCertificatePath_Unix
+ {
+ get
+ {
+ return ResourceManager.GetString("TCE_InvalidCertificatePath_Unix", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Internal error. Invalid certificate path: '{0}'. Use the following format: <certificate location>{3}<certificate store>{3}<certificate thumbprint>, where <certificate location> is either '{1}' or '{2}'..
///
@@ -12821,7 +12832,18 @@ internal static string TCE_InvalidCertificatePathSysErr {
return ResourceManager.GetString("TCE_InvalidCertificatePathSysErr", resourceCulture);
}
}
-
+
+ ///
+ /// Looks up a localized string similar to Internal error. Invalid certificate path: '{0}'. Use the following format: <certificate location>{2}<certificate store>{2}<certificate thumbprint>, where <certificate location> is '{1}'..
+ ///
+ internal static string TCE_InvalidCertificatePathSysErr_Unix
+ {
+ get
+ {
+ return ResourceManager.GetString("TCE_InvalidCertificatePathSysErr_Unix", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to The specified encrypted column encryption key signature does not match the signature computed with the column master key (certificate) in '{0}'. The encrypted column encryption key may be corrupt, or the specified path may be incorrect..
///
@@ -13199,7 +13221,18 @@ internal static string TCE_NullCertificatePath {
return ResourceManager.GetString("TCE_NullCertificatePath", resourceCulture);
}
}
-
+
+ ///
+ /// Looks up a localized string similar to Certificate path cannot be null. Use the following format: <certificate location>{1}<certificate store>{1}<certificate thumbprint>, where <certificate location> is '{0}'..
+ ///
+ internal static string TCE_NullCertificatePath_Unix
+ {
+ get
+ {
+ return ResourceManager.GetString("TCE_NullCertificatePath_Unix", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Internal error. Certificate path cannot be null. Use the following format: <certificate location>{2}<certificate store>{2}<certificate thumbprint>, where <certificate location> is either '{0}' or '{1}'..
///
@@ -13208,7 +13241,18 @@ internal static string TCE_NullCertificatePathSysErr {
return ResourceManager.GetString("TCE_NullCertificatePathSysErr", resourceCulture);
}
}
-
+
+ ///
+ /// Looks up a localized string similar to Internal error. Certificate path cannot be null. Use the following format: <certificate location>{1}<certificate store>{1}<certificate thumbprint>, where <certificate location> is '{0}'..
+ ///
+ internal static string TCE_NullCertificatePathSysErr_Unix
+ {
+ get
+ {
+ return ResourceManager.GetString("TCE_NullCertificatePathSysErr_Unix", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Internal error. Ciphertext value cannot be null..
///
diff --git a/src/Microsoft.Data.SqlClient/src/Resources/Strings.resx b/src/Microsoft.Data.SqlClient/src/Resources/Strings.resx
index 1cb13538c2..be79cd17a3 100644
--- a/src/Microsoft.Data.SqlClient/src/Resources/Strings.resx
+++ b/src/Microsoft.Data.SqlClient/src/Resources/Strings.resx
@@ -4035,9 +4035,15 @@
Certificate path cannot be null. Use the following format: <certificate location>{2}<certificate store>{2}<certificate thumbprint>, where <certificate location> is either '{0}' or '{1}'.
+
+ Certificate path cannot be null. Use the following format: <certificate location>{1}<certificate store>{1}<certificate thumbprint>, where <certificate location> is '{0}'.
+
Internal error. Certificate path cannot be null. Use the following format: <certificate location>{2}<certificate store>{2}<certificate thumbprint>, where <certificate location> is either '{0}' or '{1}'.
+
+ Internal error. Certificate path cannot be null. Use the following format: <certificate location>{1}<certificate store>{1}<certificate thumbprint>, where <certificate location> is '{0}'.
+
Column master key path cannot be null. Use the following format for a key stored in a Microsoft cryptographic service provider (CSP): <CSP Provider Name>{0}<Key Identifier>.
@@ -4053,9 +4059,15 @@
Invalid certificate path: '{0}'. Use the following format: <certificate location>{3}<certificate store>{3}<certificate thumbprint>, where <certificate location> is either '{1}' or '{2}'.
+
+ Invalid certificate path: '{0}'. Use the following format: <certificate location>{2}<certificate store>{2}<certificate thumbprint>, where <certificate location> is '{1}'.
+
Internal error. Invalid certificate path: '{0}'. Use the following format: <certificate location>{3}<certificate store>{3}<certificate thumbprint>, where <certificate location> is either '{1}' or '{2}'.
+
+ Internal error. Invalid certificate path: '{0}'. Use the following format: <certificate location>{2}<certificate store>{2}<certificate thumbprint>, where <certificate location> is '{1}'.
+
Invalid column master key path: '{0}'. Use the following format for a key stored in a Microsoft cryptographic service provider (CSP): <CSP Provider Name>{1}<Key Identifier>.
diff --git a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/AlwaysEncryptedTests/SqlColumnEncryptionCertificateStoreProviderShould.cs b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/AlwaysEncryptedTests/SqlColumnEncryptionCertificateStoreProviderShould.cs
index 70859e5ed7..ab055d59bf 100644
--- a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/AlwaysEncryptedTests/SqlColumnEncryptionCertificateStoreProviderShould.cs
+++ b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/AlwaysEncryptedTests/SqlColumnEncryptionCertificateStoreProviderShould.cs
@@ -512,15 +512,19 @@ public override IEnumerable