You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Issue1.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ public static class AlwaysEncryptedManagement {
30
30
}
31
31
```
32
32
33
-
The main issue in this code is the default statement. Only an error is returned whenever you attempt to access a custom provider. Normally the code should behave as in the the "AZURE_KEY_VAULT" statement.
33
+
The main issue in this code is the default statement. Only an error is returned whenever you attempt to access a custom provider. Normally the code should behave as in the "AZURE_KEY_VAULT" statement.
34
34
35
35
With the original code, it is impossible to achieve Always Encrypted configuration with PowerShell and a custom/generic provider. It may be possible with a full C# or Java, but all the documentation use PowerShell.
By updating the IL Code from the original DLL, the SqlServer PowerShell module doesn't allow anymore you to load this assembly.
73
73
74
74
There is 2 solutions for this:
75
-
- Update by yourself the IL code, and while saving the modified DLL Reflexil will prompt to "Register it for verification skipping" :<br />
75
+
- Update by yourself the IL code, and while saving the modified DLL Reflexil will prompt you to "Register it for verification skipping" :<br />
76
76

77
77
78
78
- Use the already patched [System.Management.SQLServer.Management.dll](bin/Microsoft.SqlServer.Management.AlwaysEncrypted.Management.dll), and register the assembly to bypass Strong Name checking (using the sn.exe utility of the .NET SDK). The sn.exe utility is provided with the .NET Framework. Check a path like this one, depending the version of the .NET Framework installed "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools".<br />
79
79
Below are the following commands to:
80
80
- Enable the CLR policy for bypass Strong Name verification
81
-
- Register the DLL for bypass Strong Name verification for all users
81
+
- Register the DLL to bypass Strong Name verification for all users
Copy file name to clipboardExpand all lines: Readme.md
+2-3
Original file line number
Diff line number
Diff line change
@@ -159,7 +159,7 @@ This solution provide in order:
159
159
160
160
## Known Issues
161
161
162
-
- SQL Server Management Studio cannot decrypt columns when setting "Column Encryption Setting=enabled". Or we should access the .NET assemblies loaded by the 'smss' process and register the generic provider into the SqlConnection class loaded by the process. I even don't know if this can be done (easily I mean).
162
+
- SQL Server Management Studio cannot decrypt columns when setting "Column Encryption Setting=enabled". Or we should access the .NET assemblies loaded by the 'smss' process and register the generic provider into the SqlConnection class loaded by the process. I even don't know if this can be done (easily I mean). Nevertheless, it may be possible to update the IL code of any assembly (remove Strong Name verification for this assembly) loaded by ssms.exe to provide a static constructor (in any existing class) that would load the assembly of the generic provider ([the generic dll](bin\SQLServerAlwaysEncrypted.dll)) and create an instance of this generic provider with the right parameters to access the key, and register it. This would allow ssms.exe to decrypt columns.
163
163
164
164

165
165
@@ -179,13 +179,12 @@ SELECT [PatientID]
179
179
```
180
180
181
181
Output:
182
-
<blockquotestyle="color:red;">
182
+
```
183
183
Msg 0, Level 11, State 0, Line 0<br />
184
184
Failed to decrypt column 'SSN'.<br />
185
185
Msg 0, Level 11, State 0, Line 0<br />
186
186
Failed to decrypt a column encryption key. Invalid key store provider name: 'GENERIC'...
0 commit comments