Discuss this help topic in SecureBlackbox Forum

Check CAdES signature profile level

Different scenarios may impose different requirements on signature compliance to particular CAdES profiles: CAdES-BES, CAdES-T, baseline profiles, etc. In SecureBlackbox, TElCAdESSignatureProcessor class can be used to establish whether a signature corresponds to a particular profile.

  1. Load your CMS message into TElSignedCMSMessage object.
  2. Find the required signature in the list and load it into a TElCMSSignature object.
  3. Create a TElCAdESSignatureProcessor object passing your signature to the constructor: TElCAdESSignatureProcessor processor = new TElCAdESSignatureProcessor(sig);
  4. Call one of IsXXX() methods of the processor to perform the actual check:
    
    bool isBes = processor.IsBES();
    bool isT = processor.IsT();
    bool isBaselineLTA = processor.IsBaselineLTA();
    
  5. If the call returns false, i.e., the signature is not compliant to the chosen profile, you can check the processor's CompatibilityErrors property to find out why.

How To articles about CAdES

Discuss this help topic in SecureBlackbox Forum