문제

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?

도움이 되었습니까?

해결책

As mentioned on comments (Thanks to Rudi):

Blockquote look here or here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top