PowerShell icon indicating copy to clipboard operation
PowerShell copied to clipboard

CAName corrupted when using CSV list

Open MrTomasz opened this issue 4 years ago • 0 comments

When using CSV list, CAName gets updated with certreq's -config argument after first execution, thus any following entries will fail with invalid CAName given to the certreq.

Please add following fixup starting @ line 367:

+       $CANameArg = ""
        if (!$CAName -eq "") {
-           $CAName = " -config `"$CAName`""
+           $CANameArg = " -config `"$CAName`""
        }

-       Write-Debug "certreq -submit$CAName `"$req`" `"$cer`""
-       Invoke-Expression -Command "certreq -submit$CAName `"$req`" `"$cer`""
+       Write-Debug "certreq -submit$CANameArg `"$req`" `"$cer`""
+       Invoke-Expression -Command "certreq -submit$CANameArg `"$req`" `"$cer`""

MrTomasz avatar Dec 29 '20 12:12 MrTomasz