Sample code for 30+ languages & platforms
VB.NET

Example: Http.GetServerCert method

Demonstrates how to call the GetServerCert method.

Chilkat VB.NET Downloads

VB.NET
Dim success As Boolean = False

Dim http As New Chilkat.Http
Dim cert As New Chilkat.Cert

success = http.GetServerCert("chilkatsoft.com",443,cert)
If (success = False) Then
    Debug.WriteLine(http.LastErrorText)
    Exit Sub
End If


Debug.WriteLine(cert.SubjectDN)
Debug.WriteLine(cert.ValidToStr)

' Output:

' CN=*.chilkatsoft.com
' Wed, 10 Jun 2026 23:59:59 GMT