Error n. 6 on Cryptware.NCryptoki.Certificate.get_CertificateValue()

3/5/2014 8:15:36 AM
Gravatar
Total Posts 1

Error n. 6 on Cryptware.NCryptoki.Certificate.get_CertificateValue()

I'm using ncryptoki for sign with HSM on multithread operation (with parallel for in .net linq). In order to avoid parallel operation errors, i have use thread locked while accessing NCryptoki sources.

 

Code thrown exception "Error: Error n. 6 StackTrace: at Cryptware.NCryptoki.Certificate.get_CertificateValue()" while executing SignOperationHelper.ecertificate() method.

 

public class SignOperationHelper

{

    private static object lockObject = new object();


     static public ECertificate ecertificate()
      {
            lock (lockObject)
            return new SomeInstance(n.certificateX509.CertificateValue);
      }

}