I'm relatively new to Win32 programming & I was wondering if there is any thing similar to openssl's s_client; for e.g "openssl s_client -showcerts -connect". Bottom line, I want to grab the server certificate using Win32 API directly. Is that possible?
A:
The HttpQueryServiceConfiguration
function lets you query an HTTP server about SSL details. More info here: http://msdn.microsoft.com/en-us/library/aa364491(v=VS.85).aspx
CesarGon
2010-10-06 00:34:13
That query the server *from* the server, not over the network from the client.
GregS
2010-10-06 01:16:25
Sorry, that wasn't clear to me from the original post. I suggest the OP is edited to make that explicit.
CesarGon
2010-10-06 13:02:41
CesarGon got it right the first time. I want to replicate openssl s_client feature (specifically to grab server certificate) using Win32 API. I wanted to do this programatically instead of using the openssl tool.
John
2010-10-06 17:26:52