יצרתי http proxy server
עבור https יצרתי sslstream בשני הצדדים - עבור ה-browesr הזדהיתי כ-server ועבור ה-remote server הזדהיתי כ-client
לצורך ה-browser sslstream יצרתי self certification.
אך כשאני מנסה לגשת לאתר מאובטח , הוא מתריע שהחיבור אינו פרטי.
ניסיתי לכתוב בקוד את אחת מהאפשרויות הבאות והבעיה נשארה. יש פתרון לכך?
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
או
ServicePointManager.ServerCertificateValidationCallback = (a, b, c, d) => true;
או
ServicePointManager.ServerCertificateValidationCallback = (sender, cert, chain, errors) => true;
ServicePointManager.ServerCertificateValidationCallback = delegate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors) { return
true; };
// 255 characters - lots of code!
ServicePointManager.ServerCertificateValidationCallback =
new RemoteCertificateValidationCallback(
delegate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
{
return true;
});
יש פתרון לכך?