<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Max,<br>
      <br>
      On 27.06.2016 05:29, Max Qian wrote:<br>
    </div>
    <blockquote cite="mid:20160627032902.9761-1-public@maxqia.com"
      type="cite">
      <div class="moz-text-plain" wrap="true" graphical-quote="true"
        style="font-family: -moz-fixed; font-size: 12px;"
        lang="x-unicode">
        <pre wrap="">Signed-off-by: Max Qian <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:public@maxqia.com"><public@maxqia.com></a>
---
 dlls/secur32/schannel_gnutls.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/dlls/secur32/schannel_gnutls.c b/dlls/secur32/schannel_gnutls.c
index bcadd47..9d6af60 100644
--- a/dlls/secur32/schannel_gnutls.c
+++ b/dlls/secur32/schannel_gnutls.c
@@ -316,10 +316,11 @@ static ALG_ID schannel_get_mac_algid(gnutls_mac_algorithm_t mac)
     case GNUTLS_MAC_UNKNOWN:
     case GNUTLS_MAC_NULL: return 0;
     case GNUTLS_MAC_MD5: return CALG_MD5;
-    case GNUTLS_MAC_SHA1:
-    case GNUTLS_MAC_SHA256:
-    case GNUTLS_MAC_SHA384:
-    case GNUTLS_MAC_SHA512: return CALG_SHA;
+    case GNUTLS_MAC_SHA1: return CALG_SHA1;
+    case GNUTLS_MAC_MD2: return CALG_MD2;
+    case GNUTLS_MAC_SHA256: return CALG_SHA_256;
+    case GNUTLS_MAC_SHA384: return CALG_SHA_384;
+    case GNUTLS_MAC_SHA512: return CALG_SHA_512;
     default:
         FIXME("unknown algorithm %d\n", mac);
         return 0;
@@ -331,8 +332,12 @@ static ALG_ID schannel_get_kx_algid(gnutls_kx_algorithm_t kx)
     switch (kx)
     {
         case GNUTLS_KX_RSA: return CALG_RSA_KEYX;
+       case GNUTLS_KX_DHE_PSK:
         case GNUTLS_KX_DHE_DSS:
         case GNUTLS_KX_DHE_RSA: return CALG_DH_EPHEM;
+        case GNUTLS_KX_ECDHE_RSA:
+        case GNUTLS_KX_ECDHE_PSK: return CALG_ECDH;</pre>
      </div>
    </blockquote>
    <br>
    MSDN mentions CALG_ECDH_EPHEM, which would fit better, but it seems
    to be missing in headers. Returning CALG_ECDH is fine with me, but
    please add a comment about CALG_ECDH_EPHEM.<br>
    <br>
    <blockquote cite="mid:20160627032902.9761-1-public@maxqia.com"
      type="cite">
      <div class="moz-text-plain" wrap="true" graphical-quote="true"
        style="font-family: -moz-fixed; font-size: 12px;"
        lang="x-unicode">
        <pre wrap="">
+       case GNUTLS_KX_ECDHE_ECDSA: return CALG_ECDSA;</pre>
      </div>
    </blockquote>
    <br>
    You're mixing tabs and spaces. Please avoid using tabs.<br>
    <br>
    Thanks,<br>
    Jacek<br>
  </body>
</html>