How is the following code evaluated?
ServicePointManager.ServerCertificateValidationCallback += ValidateRemoteCertificateA;
ServicePointManager.ServerCertificateValidationCallback += ValidateRemoteCertificateB;
Given an HttpWebRequest, is it enough if one of the Validator methods returns true, or do they both have to return true? i.e.
ValidateRemoteCertificateA && ValidateRemoteCertificateB
or
ValidateRemoteCertificateA || ValidateRemoteCertificateB
?
Cheers,
tamberg
It will use the return value of the last delegate added, in all cases.
ServerCertificateValidationCallbackis a multicast delegate property.Writing
ServerCertificateValidationCallback += xappendsxto its invocation list.The return value of a multicast delegate is the return value of the last delegate in its list.