Example: inspecting SSL session properties  Chapter 9: Using TLS and FIPS in EAServer

Chapter 8: Using SSL in ActiveX Clients

Example: inspecting X.509 certificate properties

The previous example calls the following function to print a description of an SSL certificate represented in a CtsSecurity::X509Certificate instance:

Private Function certInfo( _
  cert As CtsSecurity.X509Certificate _
  ) As String   Dim description As String
   Dim prop As String
   
   description = ""
   
   prop = cert.getSubjectDN()
   description = description _
     & "  Subject name: " & prop & vbCrLf

   prop = cert.getIssuerDN()
   description = description _
     & "  Issuer name: " & prop & vbCrLf

   description = description _
     & "  Not valid before: " & Format(cert.getNotBefore()) & vbCrLf
   
   description = description _
     & "  Not valid after: " & Format(cert.getNotAfter()) & vbCrLf
     
   certInfo = description
   
End Function




Copyright © 2005. Sybase Inc. All rights reserved. Chapter 9: Using TLS and FIPS in EAServer

View this book as PDF