Signed Template and MakeCert.exe - InfoPath Dev
in

InfoPath Dev

Signed Template and MakeCert.exe

Last post 09-10-2005 06:38 PM by vt_asparagus. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-10-2005 08:18 AM

    Signed Template and MakeCert.exe

    I am messing around with test certificates to see how they work. I wanted to use the MakeCert.exe located within C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin to create a test cert to play with. I quickly found out that I had to take several other steps to build the certificate.

    Here are some command line statements I had to run:

    cd C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin
    makecert -sv testCertKey.pvk -n "CN=AsparagusCertificate,OU=Delivery,O=Asparagus,C=US" -r testCert.cer
    cert2spc testcert.cer testcert.spc
    pvkimprt -IMPORT testCert.spc testCertkey.pvk

    You will need to go out and install the pvkimprt tool. Anyways, I can now see the certificate in InfoPath and I can Sign my Template of my test form by going to Tools >> Security. (I know I can create a certificate in InfoPath but I wanted to try it this way.)

    Here is new issue, when I try to use the InfoPath form that I signed with the certificate on another machine for testing purposes I get the following warning when I open it up (I created the form on a host machined and then threw it onto a VPC).

    "The selected form cannot be opened correctly because it was signed with a certificate that is not available on this machine. To remove the certificate and open the form, click OK. Note that removing the certificate might require users to delete and reinstall the form on their computer. In addition, forms requiring full trust will not open correctly unless they are signed with a trusted signature."

    This leads me to believe that I needed to install the certificate I created on my host machined onto my VPC. That did not work. I then tried rebuilding the certificate on the VPC from scratch using the same steps and open the InfoPath form and I again got the same issue. How can I get this to work?
    Jason
    http://www.k2distillery.com/
  • 09-10-2005 01:17 PM In reply to

    Re: Signed Template and MakeCert.exe

    To continue my saga...I am still having issues.

    When I run the .xsn locally get a prompt warning me that the digital certificate is not trusted, which makes sense because I created it using MakeCert.exe. Although, if I take the form, throw it onto a VPC, double click the .xsn, I get "InfoPath Cannot load this form. The signature is corrupt or the certificate used to sign the form is expired or has been revoked. Contact the author of the form."

    Hypothetically, all I should have to do is install the certificate in the VPC and it should work. Maybe I do not have the right steps.

    Another thing, I found the following link out there - BUG: You may receive "The signature is corrupt or the certificate used to sign this form is expired" error message in InfoPath 2003 Service Pack 1 -http://support.microsoft.com/kb/888704

    I have tried to follow the steps but get the following error at the end. It is "Windows cannot build the requested certification path."

    Any advice?
    Jason
    http://www.k2distillery.com/
  • 09-10-2005 06:38 PM In reply to

    Re: Signed Template and MakeCert.exe

    Looks like I cannot move the XSN file from machine to machine and expect the certificate I created with MakeCert.exe to work. If I publish the form through SharePoint on the machined where I created the certificate, the user will be prompted that the certificate cannot be trusted but they will be allowed to open the form.

    As everyone should know, you should only use a certificate created from MakeCert.exe for testing purposes only.
    Jason
    http://www.k2distillery.com/
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.