question

Han-1276 avatar image
0 Votes"
Han-1276 asked Castorix31 commented

WINHTTP_SECURITY_INFO is not found in winhttp.h

Hi, I'm working on getting cipher suit used by https request with winhttp, I find this

https://docs.microsoft.com/en-us/windows/win32/api/winhttp/ns-winhttp-winhttp_security_info

but I don't find related option and struct define in winhttp header file, I'm using vs2019 and 10.0.18362.0 sdk

I also find something similar in winineti but I'm not going to do refactor and start over, so is it possible to use winhttp to get what I want, thanks.

windows-api
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Castorix31 avatar image
0 Votes"
Castorix31 answered Castorix31 commented

I have it in 10.0.19041.0 version :

 #ifdef __SCHANNEL_H__
    
 typedef struct _WINHTTP_SECURITY_INFO
 {
     SecPkgContext_ConnectionInfo ConnectionInfo;
     SecPkgContext_CipherInfo CipherInfo;
 } WINHTTP_SECURITY_INFO, *PWINHTTP_SECURITY_INFO;

 #endif

If you don't want to update the SDK, you can add it manually

· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@Castorix31 Thanks for the quick answer! I will try this.
By the way, why this is not included in previous version? and if I add the related definitions, will WinHttpQueryOption work?

0 Votes 0 ·

It seems to be a recent update
If I search WINHTTP_OPTION_SECURITY_INFO in my various SDK versions, I also only find it in 10.0.19041.0 version.
Then not sure WinHttpQueryOption will work... it must be tested.

0 Votes 0 ·

I see the date in doc is 2019, anyway thank you for help.

0 Votes 0 ·
Show more comments