views:

26

answers:

1

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
That query the server *from* the server, not over the network from the client.
GregS
Sorry, that wasn't clear to me from the original post. I suggest the OP is edited to make that explicit.
CesarGon
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