CryptoSys PKI Pro Manual

Example: X509.GetCertFromP7Chain 

[VB6 equivalent: X509_GetCertFromP7Chain]

Dim nRet As Integer
Dim strListFile As String
Dim strCertFile As String
Dim nCerts As Integer
Dim iCert As Integer

strListFile = "bob.p7b"
' How many certificates?
nCerts = X509.GetCertFromP7Chain("", strListFile, 0)
Console.WriteLine("X509_GetCertFromP7Chain(0) returns " & nCerts & " for " & strListFile)
' Enumerate through them all
If nCerts > 0 Then
    For iCert = 1 To nCerts
        strCertFile = "bobcert" & iCert & ".cer"
        nRet = X509.GetCertFromP7Chain(strCertFile, strListFile, iCert)
        Console.WriteLine("X509_GetCertFromP7Chain(" & iCert & ") returns " _
            & nRet & "->" & strCertFile)
    Next
End If

See Also:
X509.GetCertFromP7Chain Method

[Contents] [Index]

[PREV: Example: X509.CheckCertInCRL ...]   [Contents]   [Index]   
   [NEXT: Example: X509.HashIssuerAndSN ...]

Copyright © 2004-23 D.I. Management Services Pty Ltd. All rights reserved. Generated 2023-09-18T10:02:53Z.