The CMS is derived from PKCS #7 version 1.5, which is documented in RFC 2315 [PKCS#7]. PKCS #7 version 1.5 was developed outside of the IETF. Since that time, the IETF has taken responsibility for the development and maintenance of the CMS. Today, several important IETF standards-track protocols make use of the CMS.
Aloaha can create directly CMS messages. The only condition is that a supported smartcard is being used. In case software certificates are being used please use the old Aloaha p7m/ps7 functions explained here.
The function can be found in Aloaha Object "aloahacsp.PKCS7". To be able to use the functions of this object please make sure that you referenced it correctly. Obviously "late binding" can be used as well.
This Variable contains either the path to the file to be signed, the data to be signed or a Hash.
Data_is_Hex: Is of type bool and defines if the Data in Inputdata is a string or HEXString.
Data_is_Hash: Is of type bool and defines if the Data in Inputdata is already the Hash.
Defines the Hashtype to be used. 3 for SHA1 and 5 for SHA256
If true a detached signature is being created.
Contains the fingerprint of the certificate to be used. Please note that softare certificates are not supported. The certificate has to be hosted on a supported smartcard. If the fingerprint is only one digit the qualified certificate of cardreader x is being used.
Dim Result as string
Dim PKCS7 as object
result = PKCS7.MakePKCS7fromData("C:\test.txt", False, False, 3, False, "19 bc 2d d8 43 2d f7 33 ff 38 17 22 bc d1 83 da 2e 1f ff 2c")
result = PKCS7.MakePKCS7fromData("C:\test.txt", False, False, 5, False, "0")
result = PKCS7.MakePKCS7fromData("0011223344556677889900112233445566778899", True, False, 3, False, "0")