wininet: Added NETCON_GetCert support for schannel-based connections.

This commit is contained in:
Jacek Caban 2013-04-03 14:04:01 +02:00 committed by Alexandre Julliard
parent 6c6e084a7d
commit 7d386bfcd8

View File

@ -1458,8 +1458,14 @@ LPCVOID NETCON_GetCert(netconn_t *connection)
r = X509_to_cert_context(cert);
return r;
#else
FIXME("not supported on this platform\n");
return NULL;
const CERT_CONTEXT *ret;
SECURITY_STATUS res;
if (!connection->secure)
return NULL;
res = QueryContextAttributesW(&connection->ssl_ctx, SECPKG_ATTR_REMOTE_CERT_CONTEXT, (void*)&ret);
return res == SEC_E_OK ? ret : NULL;
#endif
}