Pipelines/Steps/Install/OnPrem/Sitecore/SSL/Import-RootCert.ps1

$ErrorActionPreference = "Stop"

$clientCert = $SAFConfiguration.ssl.clientCert
$serverCert = $SAFConfiguration.ssl.serverCert
if (([string]::IsNullOrEmpty($clientCert)) -and ([string]::IsNullOrEmpty($serverCert))) {
    ImportCert -PfxName "SitecoreRootSSLCertificate_SAF.pfx" -Password $SAFDefaultPFXPassword -Root
}
else {
    Write-Warning "It seems that you are using custom SSL certificates. Skipping import..." 
    Start-Sleep -s 5
}