Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Jul 8, 2024 5:50:12 AM
Jan 24, 2020 3:43:59 AM
The following steps are only applicable to Qlik Sense deployments originally installed with versions prior to the June 2019 release. For any Qlik Sense deployments installed with later versions, follow standard steps for patching Qlik Sense and do not perform the steps in this article.
In these steps we will occasionally ask you to run Powershell code.
Executing PowerShell code:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass function ExportCertificatesFromStore( [string] $name, [string] $location) { $success = 1 $oid = "1.3.6.1.5.5.7.13.3" $localStore = new-object System.Security.Cryptography.X509Certificates.X509Store $name, $location $localStore.Open("MaxAllowed") $mypwd = ConvertTo-SecureString -String "MyPassword" -Force -AsPlainText try { $certs = $localStore.Certificates foreach ($cert in $certs) { $extensions = $cert.Extensions foreach($extension in $extensions) { if ($extension.Oid.Value.Equals($oid)) { Get-ChildItem -Path cert:\$($localStore.Location)\$($localStore.Name) | Where-Object { $_.PrivateKey.CspKeyContainerInfo.Exportable } | Export-PfxCertificate -FilePath "$($localStore.Name)_$($localStore.Location).pfx" -Password $mypwd break; } } } } catch { write-host "An error occurred while removing certificates" -ForegroundColor Red write-host $_.Exception.GetType().FullName -ForegroundColor Red write-host $_.Exception.Message -ForegroundColor Red $success = 0 } finally { $localStore.Close() } if ($success -ne 1) { exit 20 } } function ExportCertificates() { ExportCertificatesFromStore "Root" "LocalMachine" ExportCertificatesFromStore "My" "LocalMachine" ExportCertificatesFromStore "My" "CurrentUser" } ExportCertificates write-host "Done." exit 0
NOTE: For information on how to execute above code please refer to “Executing PowerShell code” section at the top. Modify $mypwd variable to define custom password. Make sure certificates were backed up after running the script:
NOTE: If you happen to have more certificates with the same values in Issued To, Issued By and Friendly Name columns and you are unable to identify the correct certificate, please refer to Identifying Qlik Sense root CA and server certificates in certificate store.
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
function RemoveCertificatesFromStore(
[string] $name,
[string] $location)
{
$success = 1
$oid = "1.3.6.1.5.5.7.13.3"
$localStore = new-object System.Security.Cryptography.X509Certificates.X509Store $name, $location
$localStore.Open("MaxAllowed")
try
{
$certs = $localStore.Certificates
foreach ($cert in $certs)
{
$extensions = $cert.Extensions
foreach($extension in $extensions)
{
if ($extension.Oid.Value.Equals($oid))
{
write-host "Deleting certificate from" $localStore.Name $localStore.Location
write-host " Subject:"$cert.Subject
write-host " Issuer:"$cert.Issuer
write-host " Serial:"$cert.SerialNumber
$localStore.Remove($cert)
break;
}
}
}
}
catch
{
write-host "An error occurred while removing certificates" -ForegroundColor Red
write-host $_.Exception.GetType().FullName -ForegroundColor Red
write-host $_.Exception.Message -ForegroundColor Red
$success = 0
}
finally
{
$localStore.Close()
}
if ($success -ne 1)
{
exit 20
}
}
function CleanCertificates()
{
RemoveCertificatesFromStore "Root" "LocalMachine"
}
CleanCertificates
write-host "Done."
exit 0
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
function RemoveCertificatesFromStore(
[string] $name,
[string] $location)
{
$success = 1
$oid = "1.3.6.1.5.5.7.13.3"
$localStore = new-object System.Security.Cryptography.X509Certificates.X509Store $name, $location
$localStore.Open("MaxAllowed")
try
{
$certs = $localStore.Certificates
foreach ($cert in $certs)
{
$extensions = $cert.Extensions
foreach($extension in $extensions)
{
if ($extension.Oid.Value.Equals($oid))
{
write-host "Deleting certificate from" $localStore.Name $localStore.Location
write-host " Subject:"$cert.Subject
write-host " Issuer:"$cert.Issuer
write-host " Serial:"$cert.SerialNumber
$localStore.Remove($cert)
break;
}
}
}
}
catch
{
write-host "An error occurred while removing certificates" -ForegroundColor Red
write-host $_.Exception.GetType().FullName -ForegroundColor Red
write-host $_.Exception.Message -ForegroundColor Red
$success = 0
}
finally
{
$localStore.Close()
}
if ($success -ne 1)
{
exit 20
}
}
function CleanCertificates()
{
RemoveCertificatesFromStore "Root" "LocalMachine"
RemoveCertificatesFromStore "My" "LocalMachine"
RemoveCertificatesFromStore "My" "CurrentUser"
}
CleanCertificates
write-host "Done."
exit 0
(…)
<add key="BackgroundWork.CountLimit" value="3" />
<add key="Certificates.SelfSignedRoot.BasicConstraintsCA" value="true" />
<add key="DatabaseCommandTimeout" value="00:01:30" />
(…)
repository.exe -bootstrap -iscentral
Note: If this message is not shown, open Windows Task Manager, find Qlik Sense Repository Service in the Processes tab and end it by right-clicking on it and selecting End task.
can you confirm some of the issues that this certificate problem are known to cause?
what are some of the symptoms that the system will exhibit when this issue is present?
thanks - Ken