use varaibles for ksp related constants

This commit is contained in:
v-kaywon 2017-12-05 12:23:29 -08:00
parent aa04104bb2
commit 44b31bf728

View file

@ -86,7 +86,9 @@ function getDSN($sqlsrvserver, $database, $keywords = '', $disableCE = false)
} }
if ($keystore == "ksp" && !$disableCE) { if ($keystore == "ksp" && !$disableCE) {
$ksp_path = getKSPPath(); $ksp_path = getKSPPath();
$dsn .= "CEKeystoreProvider=$ksp_path;CEKeystoreName=KSP_NAME;CEKeystoreEncryptKey=ENCRYPT_KEY;"; $ksp_name = KSP_NAME;
$encrypt_key = ENCRYPT_KEY;
$dsn .= "CEKeystoreProvider=$ksp_path;CEKeystoreName=$ksp_name;CEKeystoreEncryptKey=$encrypt_key;";
} }
if ($keywords) { if ($keywords) {
$dsn .= $keywords; $dsn .= $keywords;