Skip to content

Commit 887618d

Browse files
committed
Solved invalid certificate
1 parent 325b482 commit 887618d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

WaybackDownloader.NET.CLI/Program.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,11 @@ static void DownloadSingleArchive(WebClient client, Archive archive, string path
450450
if (!Directory.Exists(dirPath))
451451
Directory.CreateDirectory(dirPath);
452452

453+
//Workaround for invalid certificates
454+
ServicePointManager.Expect100Continue = true;
455+
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
456+
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
457+
453458
client.DownloadFile(archive.UrlId, filePath);
454459
if (!string.IsNullOrEmpty(client.ResponseHeaders["Content-Disposition"]))
455460
{

0 commit comments

Comments
 (0)