Error during Install-CertificationAuthority

Jun 21, 2012 at 12:08 PM

Hi

 

I use the following script to install a CA

Install-CertificationAuthority -CAName $CaName -CADNSuffix $CADNSuffix -CAType $CAType -Keylength $Keylength -ValidForYears $ValidForYears -RequestFileName $Requestfile -DBDirectory $DBDir -LogDirectory $LogDir -Force

 

$CAName="AmIssuing-CA909"
$CADNSuffix="OU=CA909"

$CAType="Enterprise Subordinate"
$Keylength=4096
$ValidForYears=1
$DBDir="D:\PKI\Certlog"
$LogDir="D:\PKI\Certlog"
$Requestfile="D:\PKI\Requests\CA909-request.req"

 

I get the following Error

<Error>

Exception calling "GetKeyLengthList" with "1" argument(s): "CCertSrvSetup::GetKeyLengthList: Invalid pointer 0x80004003
 (-2147467261)"
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSPKI\Install-CertificationAuthority.ps1:134 char:32
+         if ($CASetup.GetKeyLengthList <<<< ($CSP).Length -eq 1) {
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ComMethodTargetInvocation
</Error>

The CA is installed and I have request file.

Martijn

Coordinator
Jun 21, 2012 at 2:44 PM

this is a bug. Tomorrow I'll issue a patch. Please contact me via email if you wish to get updated file immediately.

thanks.

Jun 22, 2012 at 6:43 AM

Thanks, by the way, nice work. Thnks for teh scripts.

Coordinator
Jun 22, 2012 at 4:06 PM

This release: http://pspki.codeplex.com/releases/view/89299 has updated Install-CertificationAuthority command with fixed key length parameter handling.