开发者

Why is _wixCert_{0-9} added to certificate friendly name by WiX?

I am installing some certificates into localStore and for some strange reason all those certs are suffixed with "_wixCert_0" or "_wixCert_1". I've tried to manually remove all the certificates prior install to make sure that there's nothing left, but it still happens. What could be the reason?

This is how i've defined the certificates:

<Component Id="MyCert_file" Guid="*">
    <File Id="MyCert" Name="MyCert.开发者_高级运维crt" Source="$(var.CertSourceDir)\MyCert.crt" />
</Component>

<Component Id="MyCert" Guid="..." KeyPath="yes">
    <iis:Certificate Id="MyCert"
                     Name="MyCert"
                     Request="no"
                     StoreLocation="localMachine"
                     StoreName="ca"
                     Overwrite="yes"
                     BinaryKey="MyCert"
                     />
</Component>

The certificates get added to the certstore, but they have friendly name like "MyCert_wixCerts_0" and so on. I cannot figure it out why is it happening.

Anyone else does?


In the WiX source code in src\ca\serverca\scaexec\scacertexec.cpp the InstallCertificatePackage method adds "wixCert" and an increasing unique number to the certificate name before installing it. It looks to be to make sure the name is unique in the certificate store.

The UninstallCertificatePacket method tries to find certificates using the CERTNAME_wixCert_ prefix to find the certificates to uninstall.

There are logging messages in the code that show the certificate names it is installing/uninstalling with the extra stuff added to the name.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜