Discuss this help topic in SecureBlackbox Forum
Load CMS message
Checking CAdES signature profile level compliance Different scenarios may impose different requirements on signature compliance to particular CAdES profiles (such as CAdES-BES, CAdES-T, baseline profiles etc.). SecureBlackbox TElCAdESSignatureProcessor class provides means for establishing whether a signature corresponds to a particular profile. 1. Load your CMS message into TElSignedCMSMessage object. 2. Get the needed signature from the message as TElCMSSignature object. 3. Create a TElCAdESSignatureProcessor object, passing your signature object to the constructor: TElCAdESSignatureProcessor processor = new TElCAdESSignatureProcessor(sig); 4. Call one of IsXXX() methods of processor to check if the signature is compliant to that particular profile: bool isBes = processor.IsBES(); bool isT = processor.IsT(); bool isBaselineLTA = processor.IsBaselineLTA(); 5. If the call returns false (the signature is not compliant to the chosen profile), you may consider checking the contents of the processor.CompatibilityErrors property to find out the reason for the signature to not be considered compliant.