We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b6ce0c4 + 91e37ea commit 221973aCopy full SHA for 221973a
1 file changed
lib/webserver/Get-IcingaSSLCertForSocket.psm1
@@ -10,8 +10,7 @@ function Get-IcingaSSLCertForSocket()
10
# to get a proper certificate
11
if ([string]::IsNullOrEmpty($CertFile) -eq $FALSE) {
12
if ((Test-Path $CertFile)) {
13
- $FileType = Get-Item -Path $CertFile;
14
- if ($FileType -eq '.pfx') {
+ if ([IO.Path]::GetExtension($CertFile) -eq '.pfx') {
15
return (New-Object Security.Cryptography.X509Certificates.X509Certificate2 $CertFile);
16
} else {
17
return ConvertTo-IcingaX509Certificate -CertFile $CertFile;
0 commit comments