Skip to content

Commit

Permalink
Change
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivangi authored and Shivangi committed Nov 15, 2019
1 parent 53e7877 commit 31fd4de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tasks/Common/VstsAzureHelpers_/Utility.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
[Switch] $ServicePrincipal
)

# Add the certificate to the cert store.
$certificate = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2

if ($ServicePrincipal) {
$pemFileContent = $Endpoint.Auth.Parameters.ServicePrincipalCertificate
$pfxFilePath, $pfxFilePassword = ConvertTo-Pfx -pemFileContent $pemFileContent

# Add the certificate to the cert store.
$certificate = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($pfxFilePath, $pfxFilePassword, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::PersistKeySet)
}
else {
Expand Down

0 comments on commit 31fd4de

Please sign in to comment.