Jacek Caban : winhttp: Added schannel-based netconn_get_certificate implementation.

Alexandre Julliard julliard at winehq.org
Thu Jan 24 12:59:48 CST 2013


Module: wine
Branch: master
Commit: d15265db286edca795037db133ca09a1ea3a09e4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d15265db286edca795037db133ca09a1ea3a09e4

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Jan 23 15:50:08 2013 +0100

winhttp: Added schannel-based netconn_get_certificate implementation.

---

 dlls/winhttp/net.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c
index 2e16cc0..2f1b8fe 100644
--- a/dlls/winhttp/net.c
+++ b/dlls/winhttp/net.c
@@ -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
 }
 




More information about the wine-cvs mailing list