When it comes to Custom certificate validation, I see all the examples that either call Accept
or Recect
in all execution branches.
My question is, whether this code is valid, too:
private void ftp_ValidatingCertificate(
object sender,
SslCertificateValidationEventArgs e)
{
if (IgnoreCertificateErrors)
{
e.Accept();
}
}
I.e. I only call Accept
under certain cases, but sometimes I do call neither Accept
nor Reject
.
Is this allowed?