Visual Basic 6.0
Visual Basic 6.0
Transition from Http.GetServerSslCert to Http.GetServerCert
See more HTTP Examples
Provides instructions for replacing deprecated GetServerSslCert method calls with GetServerCert.Chilkat Visual Basic 6.0 Downloads
Dim success As Long
success = 0
Dim http As New ChilkatHttp
Dim domain As String
domain = "chilkatsoft.com"
Dim port As Long
port = 443
' ------------------------------------------------------------------------
' The GetServerSslCert method is deprecated:
Dim cert1 As ChilkatCert
Set cert1 = http.GetServerSslCert(domain,port)
If (http.LastMethodSuccess = 0) Then
Debug.Print http.LastErrorText
Exit Sub
End If
Debug.Print cert1.SubjectDN
' ------------------------------------------------------------------------
' Do the equivalent using GetServerCert.
' Your application creates a new, empty certificate object which is passed
' in the last argument and filled with the server certificate upon success.
Dim cert2 As New ChilkatCert
success = http.GetServerCert(domain,port,cert2)
If (success = 0) Then
Debug.Print http.LastErrorText
Exit Sub
End If
Debug.Print cert2.SubjectDN