Skip to content

Commit

Permalink
Merge pull request #255 from Remco4EF/master
Browse files Browse the repository at this point in the history
Enable TLS 1.2 in ImageHelper
  • Loading branch information
fediachov committed Feb 3, 2021
2 parents e253b88 + 285fd5d commit 01c2e77
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions FastReport.Base/Utils/ImageHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ public static byte[] LoadURL(string url)
{
if (!String.IsNullOrEmpty(url))
{
//Enable TLS1.2, 1.1. and 1.0;
System.Net.ServicePointManager.SecurityProtocol = (SecurityProtocolType)(0xc0 | 0x300 | 0xc00); // System.Net.SecurityProtocolType.Tls | System.Net.SecurityProtocolType.Tls11 | System.Net.SecurityProtocolType.Tls12;
using (WebClient web = new WebClient())
{
return web.DownloadData(url);
Expand Down

0 comments on commit 01c2e77

Please sign in to comment.