A recent question came through on an email thread I was on, and I thought it should get a little broader distribution. The question had to do with digitial certificates and using them to sign a smart document XML Expansion Pack (for more info on this technology see the smart document section of the MSDN Office Developer Center).
For example, in my Definitive Hello World Managed Smart Document Tutorial, I explain:
To digitally sign a manifest file for the XML expansion pack, you can use the XMLSign.exe utility available from the Smart Tag and Smart Document SDK. To sign the manifest, follow these steps:
- Start XMLSign.exe.
- Click the Browse button (. . . ) next to the XML File box (see Figure 10).
- Locate and click the manifest file of the XML expansion pack you want signed.
- Click Open.
- Click Load XML.
- From the Stores list, select the certificate store that you want to use.
- From the Certificate list, select the certificate you want to use to verify the authenticity of your manifest when the host application attempts to load it.
- In the XML document tree view, right-click the manifest node, and click Append Signature to this node.
- Click the Sign XML button.
- In the File name dialog box, you will see a suggested name <original name>_signed.xml. Use this name.
- Click Save.
- Click OK.
But, what if the certificate I want to use is not listed in the Certificate list? For example, you may go to a certificate provider and purchase a cert you want to use for your projects. Usually, when you get a certificate, you get an SPC and a PVK file. These files need to be imported into your certificate store before the XMLSign utility will se them. Thankfully, we have a tool for importing these files. You can get it here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mobilesdk5/html/mob5conImportExportDigitalCertificateFiles.asp.
Rock thought for the day: "Learn to forget" (see last post) comes from the famous Doors song, "Soul Kitchen". BTW: I just saw a new book out about Jim Morrison at the bookstore on Saturday. I remember going to the Rock and Roll Hall of Fame in Cleveland and seeing the pictures Jim had done in kindergarten. I reflect on such things often- how unaware he was then of what he would become.