Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Error when using signedCms with smartcard certificate

$
0
0

I'm sending the smart card certificate from the user store into the constructor for CmsSigner and i get an error saying context was acquired as silent. Any ideas??

 

I'm trying to sign PKCS encryption using a smart card.

 

 

 

ContentInfo contentInfo = newContentInfo(msg);

 

 

 

SignedCms signedCms = newSignedCms(contentInfo,false);

 

 

 

 

 

CmsSigner cmsSigner = newCmsSigner(signerCert);

 

cmsSigner.IncludeOption =

 

X509IncludeOption.EndCertOnly;

 

 

cmsSigner.SignedAttributes.Add(newPkcs9SigningTime());

signedCms.ComputeSignature(cmsSigner);


Viewing all articles
Browse latest Browse all 8156

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>