Imap Object : Certificate Property |
Visual Basic |
---|
Public Property Certificate As ICertificate |
Dim Store As New CertificateStore Dim Certificate As Certificate 'Get the certificates in "MY" certificate store located in the 'Local Machine registry key. Store.Name = "MY" Store.Location = locationLocalMachine 'Must use Refresh to populate Store.Certificates Store.Refresh MsgBox "There are " & Store.Certificates.Count & " certificates." 'Set the certificate to the one for "DartServer" For Each Certificate In Store.Certificates If Certificate.IssuedTo = "DartServer" Then SecureTcp1.Certificate = Certificate Exit For End If Next
Dim Store As New CertificateStore 'Get the desired certificate SecureTcp1.Certificate = Store.Find("ROOT", locationLocalMachine, g_SavedIssuedBy, g_SavedSerialNumber)