Skip to content

Commit

Permalink
1.4.2.1
Browse files Browse the repository at this point in the history
1.4.2.1
  • Loading branch information
codyhosterman committed Dec 7, 2020
1 parent f57fb06 commit ad24b18
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions PureStorage.Pure1.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Created by: Cody Hosterman
Organization: Pure Storage, Inc.
Filename: Cody.PureStorage.Pure1.psd1
Version: 1.4.2.0
Version: 1.4.2.1
Copyright: 2020 Pure Storage, Inc.
-------------------------------------------------------------------------
Module Name: PureStoragePure1PowerShell
Expand All @@ -30,7 +30,7 @@
RootModule = 'PureStorage.Pure1.psm1'

# Version number of this module; major.minor[.build[.revision]]
ModuleVersion = '1.4.2.0'
ModuleVersion = '1.4.2.1'

# ID used to uniquely identify this module
GUID = '65867a33-8c09-4651-8043-96c2f7ca2893'
Expand Down
9 changes: 8 additions & 1 deletion PureStorage.Pure1.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,14 @@ function Get-PureOneCertificate {
$keyPath = $ExportDirectory
}
}
$DecryptedCertificatePassword = ConvertFrom-SecureString $CertificatePassword -AsPlainText
if ($PSVersionTable.PSEdition -ne "Core")
{
$bstr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($CertificatePassword)
$DecryptedCertificatePassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($bstr)
}
else {
$DecryptedCertificatePassword = ConvertFrom-SecureString $CertificatePassword -AsPlainText
}
$cert |Foreach-Object { [system.IO.file]::WriteAllBytes("$($keyPath)\PureOneCert.pfx",($_.Export('PFX', $DecryptedCertificatePassword)) ) }
$foundKey = test-path "$($keyPath)\PureOneCert.pfx"
if ($foundKey -eq $true)
Expand Down

0 comments on commit ad24b18

Please sign in to comment.