Skip to content

Commit 4509756

Browse files
Merge pull request #785 from david-puglielli/ae-test-experiments
Fixed akv test failures with win encryption
2 parents 9e75dfe + 9d1eafd commit 4509756

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

test/functional/pdo_sqlsrv/pdo_ae_azure_key_vault_keywords.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ Test connection keywords for Azure Key Vault for Always Encrypted.
66
<?php
77
require_once('pdo_ae_azure_key_vault_common.php');
88

9+
// This test only applies to Azure Key Vault, or to no encryption at all
10+
if ($keystore != 'none' and $keystore != 'akv') {
11+
echo "Done.\n";
12+
exit();
13+
}
14+
915
// We will test the direct product (set of all possible combinations) of the following
1016
$columnEncryption = ['enabled', 'disabled', 'notvalid', ''];
1117
$keyStoreAuthentication = ['KeyVaultPassword', 'KeyVaultClientSecret', 'KeyVaultNothing', ''];

test/functional/sqlsrv/sqlsrv_ae_azure_key_vault_keywords.phpt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ Test connection keywords for Azure Key Vault for Always Encrypted.
66
<?php
77
require_once('sqlsrv_ae_azure_key_vault_common.php');
88

9+
// This test only applies to Azure Key Vault, or to no encryption at all
10+
if ($keystore != 'none' and $keystore != 'akv') {
11+
echo "Done.\n";
12+
exit();
13+
}
14+
915
// We will test the direct product (set of all possible combinations) of the following
1016
$columnEncryption = ['enabled', 'disabled', 'notvalid', ''];
1117
$keyStoreAuthentication = ['KeyVaultPassword', 'KeyVaultClientSecret', 'KeyVaultNothing', ''];
@@ -123,7 +129,7 @@ for ($i = 0; $i < sizeof($columnEncryption); ++$i) {
123129
if (sqlsrv_execute($stmt) == false) {
124130
$errors = sqlsrv_errors();
125131

126-
if (!AE\isColEncrypted()) {
132+
if (!AE\isDataEncrypted()) {
127133
checkErrors(
128134
$errors,
129135
array('CE258', '0'),
@@ -142,7 +148,7 @@ for ($i = 0; $i < sizeof($columnEncryption); ++$i) {
142148
} else {
143149
// The INSERT query succeeded with bad credentials, which
144150
// should only happen when encryption is not enabled.
145-
if (AE\isColEncrypted()) {
151+
if (AE\isDataEncrypted()) {
146152
fatalError("Successful insertion with bad credentials\n");
147153
}
148154
}

0 commit comments

Comments
 (0)