diff --git a/DSCResources/MSFT_xCertReq/MSFT_xCertReq.psm1 b/DSCResources/MSFT_xCertReq/MSFT_xCertReq.psm1 index 58bd6962..bff0a082 100644 --- a/DSCResources/MSFT_xCertReq/MSFT_xCertReq.psm1 +++ b/DSCResources/MSFT_xCertReq/MSFT_xCertReq.psm1 @@ -405,8 +405,8 @@ RenewalCert = $Thumbprint $certReqOutPath = [System.IO.Path]::ChangeExtension($workingPath,'.out') $command = "$PSHOME\PowerShell.exe" $arguments = "-Command ""& $ENV:SystemRoot\system32\certreq.exe" + ` - " @('-submit','-q','-config','$ca','$reqPath','$cerPath')" + ` - " | Set-Content -Path '$certReqOutPath'""" + " @('-submit','-q','-config',$ca,'$reqPath','$cerPath')" + ` + " | Set-Content -Path '$certReqOutPath'""" # This may output a win32-process object, but it often does not because of # a timing issue in PDT (the process has often completed before the @@ -421,7 +421,7 @@ RenewalCert = $Thumbprint $($LocalizedData.SubmittingRequestProcessCertificateMessage) ) -join '' ) - $null = Wait-Win32ProcessStop ` + $null = Wait-Win32ProcessEnd ` -Path $command ` -Arguments $arguments ` -Credential $Credential diff --git a/ReadMe.md b/ReadMe.md index 7acc9611..50c31fe9 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -56,13 +56,6 @@ Please check out common DSC Resources [contributing guidelines](https://github.c ### Unreleased -- xCertReq: - - Fixing issue #42 (Error when requesting cerificate using $credential and error regarding single quotes around the $ca variable value): - - Removed single quotes in three lines (131, 281 and 592) around the $ca variable value. - - Added single quotes around the $ca variable in line 408 when requesting the certificate. - - Changed function WaitProcessEnd to function WaitProcessStop (line 424). - - Changed line 22 of the integration test (`Exportable = $($Exportable.ToString().ToUpper())` to `Exportable = $Exportable`), so the manual integration tests work. - ### 2.3.0.0 - xCertReq: diff --git a/Tests/Integration/MSFT_xCertReq.config.ps1 b/Tests/Integration/MSFT_xCertReq.config.ps1 index 3011b392..f1304a7d 100644 --- a/Tests/Integration/MSFT_xCertReq.config.ps1 +++ b/Tests/Integration/MSFT_xCertReq.config.ps1 @@ -19,7 +19,7 @@ $TestCertReq = [PSObject]@{ CARootName = $CARootName Credential = $Credential KeyLength = $KeyLength - Exportable = $Exportable + Exportable = $($Exportable.ToString().ToUpper()) ProviderName = $ProviderName OID = $OID KeyUsage = $KeyUsage