Dart Smtp, Pop, Imap Controls
Authenticate Event
Remote host's certificate.
Indicates if the certificate was from a Trusted Root Authority (CA).
Indicates if the current date-time is within the certificate's life span.
Indicates if the certificate has a valid signature.
Set this value to True to authenticate the remote certificate or set it to False to deny it.
Description
Fires when the remote host has sent a certificate to be authenticated.
Syntax
Visual Basic
Public Event Authenticate( _
   ByVal RemoteCertificate As ICertificate, _
   ByVal TrustedRoot As Boolean, _
   ByVal ValidDate As Boolean, _
   ByVal ValidSignature As Boolean, _
   ByRef Valid As Boolean _
)
Parameters
RemoteCertificate
Remote host's certificate.
TrustedRoot
Indicates if the certificate was from a Trusted Root Authority (CA).
ValidDate
Indicates if the current date-time is within the certificate's life span.
ValidSignature
Indicates if the certificate has a valid signature.
Valid
Set this value to True to authenticate the remote certificate or set it to False to deny it.
Remarks
Typically, the remote certificate is rejected if TrustedRoot, ValidDate, or ValidSignature is False. This event allows you to ease or strengthen the restrictions on the remote host's certificate. To authenticate a certificate if one or all of the parameters are False, set Valid to True. You can also deny a certificate if the hostname is not the same as the IssuedTo property of the Certificate.
Example
This example demonstrates denying a certificate.
Private Sub SecureTcp1_Authenticate(RemoteCertificate As Certificate, TrustedRoot As Boolean, ValidDate As Boolean, ValidSignature As Boolean, ByRef Valid As Boolean)
	On Error GoTo OnError ' use intrinsic error handling
	If RemoteCertificate.IssuedTo <> gRemoteHostName Then Valid = False
	Exit Sub
OnError: ' Any error jumps here
	Debug.Print "Error #" + CStr(Err.Number) + ": " + Err.Description
End Sub
See Also

Imap Object  | Imap Members


PowerTCP SSL for ActiveX Documentation Version 2.2.1
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic