Skip to content

Commit 84929c8

Browse files
mitchcapperTrolldemorted
authored andcommitted
Certificate check fix and make cert public
Allow no policy errors to proceed, needed for attachments (was broken) Also make the certificate public for use by others
1 parent d84f507 commit 84929c8

File tree

1 file changed

+3
-3
lines changed
  • libsignal-service-dotnet/util

1 file changed

+3
-3
lines changed

libsignal-service-dotnet/util/Util.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,10 @@ public static HttpClient CreateHttpClient()
191191

192192
private static bool IsCorrectCertificate(HttpRequestMessage a, X509Certificate2 b, X509Chain c, SslPolicyErrors d)
193193
{
194-
return b.RawData.SequenceEqual(Certificate);
195-
}
194+
return d == SslPolicyErrors.None || b.RawData.SequenceEqual(Certificate);
195+
}
196196

197-
private static readonly byte[] Certificate = new byte[] {
197+
public static readonly byte[] Certificate = new byte[] {
198198
48, 130, 4, 22, 48, 130, 2, 254, 160, 3, 2, 1, 2, 2, 2, 16, 3,
199199
48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 5, 5, 0, 48, 129,
200200
141, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 19, 48,

0 commit comments

Comments
 (0)