Skip to content

Instantly share code, notes, and snippets.

View lukepothier's full-sized avatar

Luke Pothier lukepothier

View GitHub Profile
@pavlovmilen
pavlovmilen / sslcertpinningios.cs
Created June 1, 2018 15:25
Get SHA1 for Public key of SSL Cert Xamarin.iOS
private byte[] rsa2048Asn1Header = new byte[] {0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,
0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00};
public override void DidReceiveChallenge(NSUrlSession session, NSUrlAuthenticationChallenge challenge, Action<NSUrlSessionAuthChallengeDisposition, NSUrlCredential> completionHandler)
{
//Sample implementation using SHA1Managed
var secServerChain = challenge.ProtectionSpace.ServerSecTrust;
int certCount = challenge.ProtectionSpace.ServerSecTrust.Count;
@JonDouglas
JonDouglas / xamarinandroidbindings.md
Last active January 1, 2025 13:18
Xamarin Android Bindings Troubleshooting

Approaching a Xamarin.Android Bindings Case

1. Investigation

One of the best ways to investigate a problematic Xamarin.Android Binding is to first ensure you have the proper tooling available:

@joepie91
joepie91 / vpn.md
Last active April 23, 2025 18:36
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.