Sample code for 30+ languages & platforms
B4X Requires Chilkat v11.0.0+

Example: Crypt2.LastSignerCert method

Demonstrates how to call the LastSignerCert method.

Chilkat B4X Downloads

B4X
Dim success As Boolean = False

Dim crypt As ChilkatCrypt2
crypt.Initialize("crypt")

Dim p7m_path As String = "qa_data/p7m/Firma.docx.p7m"
Dim out_path As String = "qa_output/Firma.docx"

success = crypt.VerifyP7M(p7m_path, out_path)
If success = False Then
    Log(crypt.LastErrorText)
    Return
End If


'  Examine the certificate(s) used for signing.
Dim numSigners As Int = crypt.NumSignerCerts
Dim i As Int = 0

Dim cert As ChilkatCert
cert.Initialize("cert")

Do While i < numSigners
    crypt.LastSignerCert(i, cert)
    Log("Signer: " & cert.SubjectDN)
    i = i + 1
Loop