Go has one of the best TLS libraries available in any programming language, for it's my language of choice for doing networking tasks. So I was a b...
For further actions, you may consider blocking this person and/or reporting abuse
Note: Huge thanks to Filippo Valsorda (github.com/FiloSottile) for his help pointing me in the right direction on how to do this here
I was wondering if we couldn't use tls.VerifyHostname for that check also: golang.org/src/crypto/tls/conn.go?...
Edit: By looking into go code it looks that tls.Verify is broader than tls.VerifyHostname (it actually can call VerifyHostname).
Thanks a lot for such great post!
Would this work if the client is behind a NAT?
Sorry this reply is super late, but unless the public IP is what is on the cert, no, it won't.
Great article.