PKCS #7 / S/Mime Signatures
The difference between PKCS #1 and PKCS #7 is that PKCS #7 contains additional the signing certificate and optional the original data signed. PKCS #7 is also known as S/Mime and p7m.
A source code sample on how to create a PKCS #7 or PKCS #1 signature can be found in section
APIs and samples.
A sample of a standalone S/Mime Mailer is included in the samples\SMime directory of the
Aloaha PDF Suite,
Aloaha PDF Signator and
Aloaha PDF Saver.
Mime 2 S/Mime Convertor
The function SignMessage_native converts mime objects to S/Mime objects.
The variable reader defines the reader to be used. Possible values are 0 for the first card reader to 9 for the 10th reader.
dim mime
set mime = createobject("aloaha_smime.mailer")
if mime.SignMessage_native(ByRef oMsg As CDO.Message, true, reader As Long) = true then
msgbox "sucess"
else
msgbox "problem"
end if
set mime = nothing
Instead of passing the CDO Object it is also possible to pass the mime email as string!
dim mime
set mime = createobject("aloaha_smime.mailer")
call msgbox(cstr(mime.mime2smime(ByVal mime As String, reader As Long)))
set mime = nothing
But also passing just the filenames of the .eml files is possible!
dim mime
set mime = createobject("aloaha_smime.mailer")
if mime.mime_eml2smime(EML_Path As String, SMime_path As String, reader As Long) = true then
msgbox "sucess"
else
msgbox "problem"
end if
set mime = nothing
Download sample S/Mime email:
sample.eml (8,05 KB)
Should further questions arise please do not hesitate to contact our support department.
Please ask...
Although we really tried hard, there are always questions left open.
Please send us your question.
We would be glad to answer it.
Home / Knowledge Base / Smart Card API / CDO to S/Mime