Skip to content

Commit

Permalink
Solved invalid certificate
Browse files Browse the repository at this point in the history
  • Loading branch information
erlange committed Apr 6, 2021
1 parent 325b482 commit 887618d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions WaybackDownloader.NET.CLI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,11 @@ static void DownloadSingleArchive(WebClient client, Archive archive, string path
if (!Directory.Exists(dirPath))
Directory.CreateDirectory(dirPath);

//Workaround for invalid certificates
ServicePointManager.Expect100Continue = true;
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;

client.DownloadFile(archive.UrlId, filePath);
if (!string.IsNullOrEmpty(client.ResponseHeaders["Content-Disposition"]))
{
Expand Down

0 comments on commit 887618d

Please sign in to comment.