|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Error importing key - object already exists.trying to sign an assembly using a PFX file, and would like to know how to resolve the problem. Background: The PFX file has been used for code-signing before (to sign an InfoPath form), so therefore the file contains a valid code-signing key. I have the correct password to the PFX file (because I get a different error if I enter the wrong password - it helpfully tells me I've entered the wrong password). The assembly is a DLL which will be installed as an Outlook add-in, is written in C#, and was created by using the Outlook Add-in template from VSTO 2005. I'm signing the assembly simply by checking the "Sign The Assembly" box, and selecting my PFX file in the drop-down list below that box. The Usenet news article <http://groups.google.com/group/microsoft.public.dotnet.general/browse_thread/thread/774d0c593789658a/d4dabaeecd4c5430> seems to discuss a similar issue, but doesn't have any good suggestions on fixing it that I can use. I can sign the assembly using a key that I generate, but I need to use the code-signing certificate that has already been deployed to our existing users. When building the assembly with my key file selected for signing, I first get a dialog box that reads "Import Key File", "This project includes a password-encrypted key used for signing. Enter the password for the key file to import the key file into the local crypto-store database for use." Entering the password, and clicking OK, I get the dialog "Error importing key", "Object already exists". Often it asks me for the password several times over. If I try to build the project, the following error is listed immediately after the first appearance of the "Object already exists" dialog: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1718,7): error MSB3321: Importing key file "codesign.pfx" was canceled. Please let me know if you have any good ideas on solving this issue. Thanks in advance, Alun Jones Alun,
How many times have you run the key generation etc, I'm sure there are only so many spaces for private keys that can be generated. I'm sure it was only about 16 private keys.... Have you tried doing this on a box that you didn't do the development on? I mean clean install, then import the PFX.... Cheers, Graham "sometimes no help is better than some help" Alun Jones wrote: Show quoteHide quote > Entering the password, and clicking OK, I get the dialog "Error importing > key", "Object already exists". > > Often it asks me for the password several times over. > > If I try to build the project, the following error is listed immediately > after the first appearance of the "Object already exists" dialog: > > C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1718,7): > error MSB3321: Importing key file "codesign.pfx" was canceled. > > Please let me know if you have any good ideas on solving this issue. > > Thanks in advance, > > Alun Jones "graham" <gra***@dunnings.net> wrote in message Just tried it - clean install of Windows, clean install of VS2005, SP1, news:1167221765.910388.108400@i12g2000cwa.googlegroups.com... > How many times have you run the key generation etc, I'm sure there are > only so many spaces for private keys that can be generated. I'm sure it > was only about 16 private keys.... > > Have you tried doing this on a box that you didn't do the development > on? > > I mean clean install, then import the PFX.... VSTO, then open and build the project. It asked me four times - once while opening, and three times while building - for the pfx file's password, and while it accepted the password without error on the first open, on the build dialogs, it gave "object already exists". Judging by the posters at https://forums.microsoft.com/msdn/showpost.aspx?postid=1046090&siteid=1, this is apparently an actual, real, honest-to-goodness bug, rather than something stupid I did (or if it's something "stupid", it needs to be documented, because it's the kind of stupid that lots of people are going to do). Alun. ~~~~
SslStream and Certificates - Not Supported Exception.
token elevation Recognising user by their Network login Role-based-Security... just switch it off Validate Signed XML against X.509 Certificate in .NET How to retrieve the domain name for an AD user object? Validate Signed XML against X.509 Certificate in .NET Securing Web Servicesq SslStream.AuthenticateAsClient is slow (calling the RemoteCertificateValidationCallback) Error importing key - object already exists. |
|||||||||||||||||||||||