winhttp: Added schannel-based netconn_get_certificate implementation.

This commit is contained in:
Jacek Caban 2013-01-23 15:50:08 +01:00 committed by Alexandre Julliard
parent a3e15549d6
commit d15265db28
1 changed files with 6 additions and 1 deletions

View File

@ -1443,7 +1443,12 @@ const void *netconn_get_certificate( netconn_t *conn )
ret = X509_to_cert_context( cert );
return ret;
#else
return NULL;
const CERT_CONTEXT *ret;
SECURITY_STATUS res;
if (!conn->secure) return NULL;
res = QueryContextAttributesW(&conn->ssl_ctx, SECPKG_ATTR_REMOTE_CERT_CONTEXT, (void*)&ret);
return res == SEC_E_OK ? ret : NULL;
#endif
}