SharpBlock icon indicating copy to clipboard operation
SharpBlock copied to clipboard

LoadProcessFormWeb not work on invalid or expired SSL certificate

Open Like0x opened this issue 4 years ago • 1 comments

[!] SharpBlock failed with error The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
   at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
   at System.Net.WebClient.DownloadData(Uri address)
   at SharpBlock.Program.LoadProcessFromWeb(String url)
   at SharpBlock.Program.LoadProcessData(String path)
   at SharpBlock.Program.ReplaceExecutable(IntPtr hProcess, IntPtr hThread, String path)
   at SharpBlock.Program.Main(String[] args)

i use below code Solve the problem

ServicePointManager ServerCertificateValidationCallback + = (sender, certificate chain, sslPolicyErrors) = > true;

want to add an option to ignore certificate errors.

Like0x avatar Apr 05 '21 08:04 Like0x

Happy to take a PR if you can add it as a program option to ignore TLS errors

CCob avatar Apr 10 '21 13:04 CCob