WINHTTP_CERTIFICATE_INFO structure (winhttp.h)
The WINHTTP_CERTIFICATE_INFO structure contains certificate information returned from the server. This structure is used by the WinHttpQueryOption function.
Syntax
typedef struct _WINHTTP_CERTIFICATE_INFO {
FILETIME ftExpiry;
FILETIME ftStart;
LPWSTR lpszSubjectInfo;
LPWSTR lpszIssuerInfo;
LPWSTR lpszProtocolName;
LPWSTR lpszSignatureAlgName;
LPWSTR lpszEncryptionAlgName;
DWORD dwKeySize;
} WINHTTP_CERTIFICATE_INFO, *PWINHTTP_CERTIFICATE_INFO;
Members
ftExpiry
A FILETIME structure that contains the date the certificate expires.
ftStart
A FILETIME structure that contains the date the certificate becomes valid.
lpszSubjectInfo
A pointer to a buffer that contains the name of the organization, site, and server for which the certificate was issued.
lpszIssuerInfo
A pointer to a buffer that contains the name of the organization, site, and server that issued the certificate.
lpszProtocolName
A pointer to a buffer that contains the name of the protocol used to provide the secure connection. This member is not current used.
lpszSignatureAlgName
A pointer to a buffer that contains the name of the algorithm used to sign the certificate. This member is not current used.
lpszEncryptionAlgName
A pointer to a buffer that contains the name of the algorithm used to perform encryption over the secure channel (SSL/TLS) connection. This member is not current used.
dwKeySize
The size, in bytes, of the key.
Remarks
The WINHTTP_CERTIFICATE_INFO structure contains information on the certificate returned by the server when the connection uses SSL/TLS. The WinHttpQueryOption function returns the WINHTTP_CERTIFICATE_INFO structure when the dwOption parameter passed to the WinHttpQueryOption function is set to WINHTTP_OPTION_SECURITY_CERTIFICATE_STRUCT. For more information, see Option Flags.
The WinHttpQueryOption function does not set the lpszProtocolName, lpszSignatureAlgName, and lpszEncryptionAlgName members of the WINHTTP_CERTIFICATE_INFO structure, so these member are always returned as NULL.
Once the application no longer needs the returned WINHTTP_CERTIFICATE_INFO structure, the LocalFree function should be called to free any pointers returned in the structure. The structure members containing pointers that are not NULL and need to be freed are lpszSubjectInfo and lpszIssuerInfo.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP, Windows 2000 Professional with SP3 [desktop apps only] |
Minimum supported server | Windows Server 2003, Windows 2000 Server with SP3 [desktop apps only] |
Header | winhttp.h |
Redistributable | WinHTTP 5.0 and Internet Explorer 5.01 or later on Windows XP and Windows 2000. |