Discuss this help topic in SecureBlackbox Forum

Load CMS message

Upgrading CAdES signature to a different level TElCAdESSignatureProcessor offers functionality for upgrading existing CAdES signatures to a different (normally) higher level. To upgrade a signature, load the CMS blob into a TElSignedCMSMessage object and get the TElCMSSignature object corresponding to the signature: TElCMSSignature sig = cms.get_Signatures(0); Next, create a TElCAdESSignatureProcessor object, passing the signature object to its constructor: TElCAdESSignatureProcessor processor = new TElCAdESSignatureProcessor(sig); Call the TElCAdESSignatureProcessor's UpgradeToXXX() method corresponding to the signature level you want to get. Note that a number of UpgradeXXX() methods require a timestamping client object to be passed to them, so you might need to create one before calling the UpgradeToXXX() method (see this article for information on how to create TSP client components). For example, processor.UpgradeToT(tspClient); Once the signature has been upgraded, save the updated CMS with TElSignedCMSMessage.Save() call. Note: in certain cases it makes sense to check whether a signature can be upgraded to a certain level before actually upgrading it. You can perform that check via the CanUpgradeToXXX() call: if (processor.CanUpgradeToBaselineLTA()) { processor.UpgradeToBaselineLTA(tspClient); }

Discuss this help topic in SecureBlackbox Forum