(VB.NET) Transition from Cert.GetCertChain to Cert.BuildCertChain
Provides instructions for replacing deprecated GetCertChain method calls with BuildCertChain. Note: This example requires Chilkat v11.0.0 or greater.
Dim cert As New Chilkat.Cert
' ------------------------------------------------------------------------
' The GetCertChain method is deprecated:
Dim certchainObj As Chilkat.CertChain = cert.GetCertChain()
If (cert.LastMethodSuccess = False) Then
Debug.WriteLine(cert.LastErrorText)
Exit Sub
End If
' ...
' ...
' ------------------------------------------------------------------------
' Do the equivalent using BuildCertChain.
' Your application creates a new, empty CertChain object which is passed
' in the last argument and filled upon success.
Dim certchainOut As New Chilkat.CertChain
Dim success As Boolean = cert.BuildCertChain(certchainOut)
If (success = False) Then
Debug.WriteLine(cert.LastErrorText)
Exit Sub
End If
|