The correct way to verify a server certificate?

"'Ladd, Watson' via openssl-users" <[email protected]>
Newsgroups gmane.comp.encryption.openssl.user
Message-ID <DM6PR17MB3979B23CF3D5922013C581F3C191A@DM6PR17MB3979.namprd17.prod.outlook.com>
In Go:

Tls.Dial("tcp", "www.example.com:443", nil)

In OpenSSL I know that SSL_CTX_set_verify(VERIFY_PEER) is required, but it doesn't seem from my reading the documentation that there is an easy way to verify hostnames: it seems that the expectation is doing a bunch of X509_ functions on the result of get_peer_certificate or make a callback function, but I'm not sure that I am not just failing to find the name of what I need.

This has caused a few issues already. I'm sure we have all run into this. Does anyone have an ideomatic, easy to explain way to do this that I'm just not figuring out for some reason?

Sincerely,
Watson

-- 
You received this message because you are subscribed to the Google Groups "openssl-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openssl-users+unsubscribe-MCmKBN63+Bmbup2nOX2J7Q@public.gmane.org
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-users/DM6PR17MB3979B23CF3D5922013C581F3C191A%40DM6PR17MB3979.namprd17.prod.outlook.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.