mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 15:19:58 -05:00
12 lines
440 B
PowerShell
12 lines
440 B
PowerShell
|
|
function Get-IcingaForWindowsCertificate()
|
||
|
|
{
|
||
|
|
[string]$CertificateFolder = Join-Path -Path (Get-IcingaFrameworkRootPath) -ChildPath 'certificate';
|
||
|
|
[string]$CertificateFile = Join-Path -Path $CertificateFolder -ChildPath 'icingaforwindows.pfx';
|
||
|
|
|
||
|
|
if (-Not (Test-Path $CertificateFile)) {
|
||
|
|
return $null;
|
||
|
|
}
|
||
|
|
|
||
|
|
return ([Security.Cryptography.X509Certificates.X509Certificate2]::CreateFromCertFile($CertificateFile));
|
||
|
|
}
|