Skip to content

Commit

Permalink
Alter HTTPS negotiation protocols for HIBP to fix #22.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-schofield committed Apr 13, 2017
1 parent 2d40864 commit 5d791a5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
Binary file modified HaveIBeenPwned.plgx
Binary file not shown.
3 changes: 3 additions & 0 deletions HaveIBeenPwned/HaveIBeenPwnedExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Net.Http.Headers;
using System.Drawing;
using System.Linq;
using System.Net;

namespace HaveIBeenPwned
{
Expand All @@ -18,6 +19,8 @@ public sealed class HaveIBeenPwnedExt : Plugin

public HaveIBeenPwnedExt()
{
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
client.DefaultRequestHeaders.UserAgent.ParseAdd(string.Format("KeePass HIBP Checker/{0}", Application.ProductVersion));
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
Expand Down
4 changes: 2 additions & 2 deletions HaveIBeenPwned/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.2.9.1")]
[assembly: AssemblyFileVersion("0.2.9.1")]
[assembly: AssemblyVersion("0.2.9.2")]
[assembly: AssemblyFileVersion("0.2.9.2")]
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
:
HaveIBeenPwned checker:0.2.9.1
HaveIBeenPwned checker:0.2.9.2
:
Binary file modified mono/HaveIBeenPwned.dll
Binary file not shown.

0 comments on commit 5d791a5

Please sign in to comment.