Skip to content

Commit bac3ab4

Browse files
Update Enclave Error messages to handle Attestation Protocol (#421)
1 parent 13a69bd commit bac3ab4

File tree

9 files changed

+299
-165
lines changed

9 files changed

+299
-165
lines changed

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlUtil.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,6 +1712,16 @@ internal static Exception EnclaveComputationsNotSupported()
17121712
return ADP.InvalidOperation(System.SRHelper.GetString(SR.TCE_EnclaveComputationsNotSupported));
17131713
}
17141714

1715+
internal static Exception AttestationURLNotSupported()
1716+
{
1717+
return ADP.InvalidOperation(System.SRHelper.GetString(SR.TCE_AttestationURLNotSupported));
1718+
}
1719+
1720+
internal static Exception AttestationProtocolNotSupported()
1721+
{
1722+
return ADP.InvalidOperation(System.SRHelper.GetString(SR.TCE_AttestationProtocolNotSupported));
1723+
}
1724+
17151725
internal static Exception EnclaveTypeNotReturned()
17161726
{
17171727
return ADP.InvalidOperation(System.SRHelper.GetString(SR.TCE_EnclaveTypeNotReturned));

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs

Lines changed: 116 additions & 102 deletions
Large diffs are not rendered by default.

src/Microsoft.Data.SqlClient/netcore/src/Resources/SR.Designer.cs

Lines changed: 22 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Microsoft.Data.SqlClient/netcore/src/Resources/SR.resx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1654,8 +1654,14 @@
16541654
<value>Invalid key store provider name specified. Key store provider names cannot be null or empty.</value>
16551655
</data>
16561656
<data name="TCE_EnclaveComputationsNotSupported" xml:space="preserve">
1657+
<value>You have specified the enclave attestation URL and attestation protocol in the connection string, but the SQL Server instance in use does not support enclave based computations.</value>
1658+
</data>
1659+
<data name="TCE_AttestationURLNotSupported" xml:space="preserve">
16571660
<value>You have specified the enclave attestation URL in the connection string, but the SQL Server instance in use does not support enclave based computations.</value>
16581661
</data>
1662+
<data name="TCE_AttestationProtocolNotSupported" xml:space="preserve">
1663+
<value>You have specified the attestation protocol in the connection string, but the SQL Server instance in use does not support enclave based computations.</value>
1664+
</data>
16591665
<data name="TCE_EnclaveProviderNotFound" xml:space="preserve">
16601666
<value>No enclave provider found for enclave type '{0}' and attestation protocol '{1}'. Please specify the correct attestation protocol in the connection string.</value>
16611667
</data>
@@ -1854,4 +1860,4 @@
18541860
<data name="SQLUDT_InvalidSize" xml:space="preserve">
18551861
<value>UDT size must be less than {1}, size: {0}</value>
18561862
</data>
1857-
</root>
1863+
</root>

src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlUtil.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,6 +1730,16 @@ static internal Exception EnclaveComputationsNotSupported()
17301730
return ADP.InvalidOperation(StringsHelper.GetString(Strings.TCE_EnclaveComputationsNotSupported));
17311731
}
17321732

1733+
internal static Exception AttestationURLNotSupported()
1734+
{
1735+
return ADP.InvalidOperation(StringsHelper.GetString(Strings.TCE_AttestationURLNotSupported));
1736+
}
1737+
1738+
internal static Exception AttestationProtocolNotSupported()
1739+
{
1740+
return ADP.InvalidOperation(StringsHelper.GetString(Strings.TCE_AttestationProtocolNotSupported));
1741+
}
1742+
17331743
static internal Exception EnclaveTypeNotReturned()
17341744
{
17351745
return ADP.InvalidOperation(StringsHelper.GetString(Strings.TCE_EnclaveTypeNotReturned));

0 commit comments

Comments
 (0)