Merge branch 'AlwaysEncrypted' of https://github.com/Microsoft/msphpsql into AlwaysEncrypted

This commit is contained in:
Hadis-Fard 2017-09-12 14:04:12 -07:00
commit 2737b9cc0d
9 changed files with 59 additions and 5 deletions

View file

@ -40,4 +40,8 @@ $marsMode = true;
$dsnMode = true;
$traceEnabled = false;
// column encryption variables
$keystore = "none"; // key store provider, acceptable values are none, win, ksp, akv
$dataEncrypted = false; // whether data is to be encrypted
?>

View file

@ -1,7 +1,7 @@
--TEST--
Fetch data from a prepopulated test table given a custom keystore provider
--SKIPIF--
<?php require('skipif_versions_old.inc'); ?>
<?php require('skipif_not_ksp.inc'); ?>
--FILE--
<?php
require( 'MsSetup.inc' );

View file

@ -1,7 +1,7 @@
--TEST--
Fetch encrypted data from a prepopulated test table given a custom keystore provider
--SKIPIF--
<?php require('skipif_versions_old.inc'); ?>
<?php require('skipif_not_ksp.inc'); ?>
--FILE--
<?php
require( 'MsSetup.inc' );

View file

@ -0,0 +1,22 @@
<?php
if (! extension_loaded( 'pdo' ) || ! extension_loaded( 'pdo_sqlsrv' ))
die( "PDO driver cannot be loaded; skipping test.\n" );
require_once( "MsSetup.inc" );
if ($keystore != 'ksp')
die ( 'skip - this test requires a custom keystore provider.' );
require_once( "MsCommon.inc" );
$conn = new PDO( "sqlsrv:server = $server;", $uid, $pwd );
if( ! $conn )
{
echo( "Error: could not connect during SKIPIF!" );
}
else if(! IsAEQualified($conn))
{
die( "skip - AE feature not supported in the current environment." );
}
?>

View file

@ -40,4 +40,9 @@ if (isset($_ENV['MSSQL_SERVER']) || isset($_ENV['MSSQL_USER']) || isset($_ENV['M
$pwd = $userPassword;
$databaseName = $database;
}
// column encryption variables
$keystore = "none"; // key store provider, acceptable values are none, win, ksp, akv
$dataEncrypted = false; // whether data is to be encrypted
?>

View file

@ -0,0 +1,23 @@
<?php
if(! extension_loaded( "sqlsrv" ) )
die( "skip extension not loaded" );
require_once( 'MsSetup.inc' );
if ($keystore != 'ksp')
die ( 'skip - this test requires a custom keystore provider.' );
require_once( 'MsCommon.inc' );
$conn = Connect();
if( ! $conn )
{
echo( "Error: could not connect during SKIPIF!" );
}
else if(! IsAEQualified( $conn ) )
{
die( "skip - AE feature not supported in the current environment." );
}
?>

View file

@ -1,7 +1,7 @@
--TEST--
Fetch data from a prepopulated test table given a custom keystore provider
--SKIPIF--
<?php require('skipif_versions_old.inc'); ?>
<?php require('skipif_not_ksp.inc'); ?>
--FILE--
<?php
sqlsrv_configure( 'WarningsReturnAsErrors', 1 );

View file

@ -1,7 +1,7 @@
--TEST--
Fetch encrypted data from a prepopulated test table given a custom keystore provider
--SKIPIF--
<?php require('skipif_versions_old.inc'); ?>
<?php require('skipif_not_ksp.inc'); ?>
--FILE--
<?php
sqlsrv_configure( 'WarningsReturnAsErrors', 1 );

View file

@ -1,7 +1,7 @@
--TEST--
Test simple insert, fetch and update with ColumnEncryption enabled and a custome keystore provider
--SKIPIF--
<?php require('skipif_versions_old.inc'); ?>
<?php require('skipif_not_ksp.inc'); ?>
--FILE--
<?php
function CreatePatientsTable()