I need to find the Public key specified in certificate details. I have used WinHttpQuery option and provided WINHTTP_OPTION_SERVER_CERT_CONTEXT as the option flag.
bRet = WinHttpQueryOption(
hRequest,
WINHTTP_OPTION_SERVER_CERT_CONTEXT,
&pCert,
&dwLen
);
I found the public key encryption type using the structure returned from WinhttpQueryOption. Now I need to find the size of the public key
Example : RSA(2048 bits)
Is there a way to find the size of the public key using this method or is there any other way?