"Root",
1 => "Client",
2 => "Admin",
3 => "Bundle",
4 => "Client",
5 => "Client Private Key",
6 => "Admin",
7 => "Admin Private Key",
8 => "Root",
9 => "Client");
function print_cert_info($info, $type)
{
$status = "Valid";
if( !$info->IsValid ) $status = "Expired";
else if( $info->ExpireSoon ) $status = "Expires
Soon";
// Highlight the tags in the Issuer and Subject
$old = array("C:", "S:", "L:", "O:", "OU:", "CN:");
$new = array("C:", "S:", "L:", "O:", "OU:", "CN:");
$Issuer = str_replace($old, $new, $info->Issuer);
$Subject = str_replace($old, $new, $info->Subject);
?>
| =$type?> |
Library |
=$info->SN?> |
=$info->NotValidBefore?> =$info->NotValidAfter?> |
=$status?> |
| Issuer: | =$Issuer?> |
| Subject: | =$Subject?> |
|
}
if ($_SERVER['REQUEST_METHOD'] == "POST")
{
$url = $_REQUEST['url'];
$libGuid = $_REQUEST['loglibGuid'];
$libName = $_REQUEST['loglibName'];
$setDefaults = $_REQUEST['setDefaults'];
$libguids = split(':', $libGuid);
$libnames = split(':', $libName);
}
$i = 0;
$libCount = count($libguids);
error_log("libCount: ".$libCount);
foreach ($libguids as $libguid)
{
$encryptData[$i] = get_partition_enryption($user, $libguid);
error_log("library name: ".$libnames[$i]);
error_log("library stored encrypt values: ".print_r($encryptData[$i], true));
$ekm[$i] = get_ekm_by_library($user, $libguid);
error_log("\n\nlibrary stored ekm values: \n".print_r($ekm[$i], true));
if (($ekm[$i]->primaryIP == "") || ($ekm[$i]->primaryIP == "0.0.0.0") || ($ekm[$i]->primaryIP == "0"))
{
$ekm[$i]->primaryIP = "0.0.0.0";
$ekm[$i]->primaryPort = "3801";
}
if (($ekm[$i]->secondaryIP == "") || ($ekm[$i]->secondaryIP == "0.0.0.0") || ($ekm[$i]->secondaryIP == "0"))
{
$ekm[$i]->secondaryIP = "0.0.0.0";
$ekm[$i]->secondaryPort = "3801";
}
error_log("\n\ndid the values change ekm values: \n".print_r($ekm[$i], true));
$sortCriteria->sortColumn = DRIVE_SORT_DEFAULT;
$assignedDrives = get_all_drives_by_library($user, $libguid, $sortCriteria,(int)0,(int)MEDIA_TYPE_ANY);
//error_log("\n\nAssigned Drives".print_r($assignedDrives,true));
$numDrives=count($assignedDrives);
for ($driveIndex = 0; $driveIndex < $numDrives; $driveIndex++)
{
if ($assignedDrives[$driveIndex]->driveType == 'LTO-4')
{
$kmipCapable[$i]=0;
}
else
{
$kmipCapable[$i]=1;
}
}
$i++;
}
if (preg_match("/:/", $ekm->primaryIP))
{
$assignment = 'static6';
$text_attributes = 'size="45" maxlength="39"';
}
else
{
$assignment = 'static4';
$text_attributes = 'size="45" maxlength="39"';
}
if (is_ibm_encryption_licensed($user))
{
$encryptionKeyInstalled = 1;
}
else
{
$encryptionKeyInstalled = 0;
}
// check TLS cert status and info
$bKmipTLS = (has_certs_installed($user, 8, 9) == 1);
$kmipInfoArray = get_cert_info($user, 8, 9);
error_log("kmip certs = ". print_r($kmipInfoArray,true));
$global_ekm_type=get_ekm_type($user);
error_log("global ekm type: ".$global_ekm_type);
?>
Encryption Settings