Question

I'm trying to sign a manifest file to be used in Passbook using c#. my code was doing fine until they released GM of iOS6. in this seed they want the signature to include the intemidiate certificate. Here's my code:

var dataToSign = System.IO.File.ReadAllBytes(filePathToSign);
ContentInfo contentInfo = new ContentInfo(new Oid("1.2.840.113549.1.7.2"), dataToSign);

var signerCert = new X509Certificate2(signerPfxCertPath, signerPfxCertPassword);

var signedCms = new SignedCms(contentInfo, true);

var signer = new CmsSigner(signerCert);
signer.IncludeOption = X509IncludeOption.ExcludeRoot;

signedCms.ComputeSignature(signer);

var myCmsMessage = signedCms.Encode();

return myCmsMessage;

I have the certificat einstalled on my machine but it doesn't work. any ideas what I'm missing?

Was it helpful?

Solution

As mentioned on comments (Thanks to Rudi):

Blockquote look here or here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top