]> granicus.if.org Git - curl/commitdiff
schannel: make more cipher options conditional
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Sun, 8 Jul 2018 14:55:11 +0000 (16:55 +0200)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Mon, 9 Jul 2018 16:08:46 +0000 (18:08 +0200)
They are not defined in the original MinGW's <wincrypt.h>.

Closes https://github.com/curl/curl/pull/2721

lib/vtls/schannel.c

index 0d69a40de85f6048e0cb47ddd94861e77234368e..2e2b198c4e7973f1473b442f78532fd634542aa9 100644 (file)
@@ -234,29 +234,57 @@ get_alg_id_by_name(char *name)
 #endif
   CIPHEROPTION(CALG_RSA_KEYX);
   CIPHEROPTION(CALG_DES);
+#ifdef CALG_3DES_112
   CIPHEROPTION(CALG_3DES_112);
+#endif
   CIPHEROPTION(CALG_3DES);
   CIPHEROPTION(CALG_DESX);
   CIPHEROPTION(CALG_RC2);
   CIPHEROPTION(CALG_RC4);
   CIPHEROPTION(CALG_SEAL);
+#ifdef CALG_DH_SF
   CIPHEROPTION(CALG_DH_SF);
+#endif
   CIPHEROPTION(CALG_DH_EPHEM);
+#ifdef CALG_AGREEDKEY_ANY
   CIPHEROPTION(CALG_AGREEDKEY_ANY);
+#endif
+#ifdef CALG_HUGHES_MD5
   CIPHEROPTION(CALG_HUGHES_MD5);
+#endif
   CIPHEROPTION(CALG_SKIPJACK);
+#ifdef CALG_TEK
   CIPHEROPTION(CALG_TEK);
+#endif
   CIPHEROPTION(CALG_CYLINK_MEK);
   CIPHEROPTION(CALG_SSL3_SHAMD5);
+#ifdef CALG_SSL3_MASTER
   CIPHEROPTION(CALG_SSL3_MASTER);
+#endif
+#ifdef CALG_SCHANNEL_MASTER_HASH
   CIPHEROPTION(CALG_SCHANNEL_MASTER_HASH);
+#endif
+#ifdef CALG_SCHANNEL_MAC_KEY
   CIPHEROPTION(CALG_SCHANNEL_MAC_KEY);
+#endif
+#ifdef CALG_SCHANNEL_ENC_KEY
   CIPHEROPTION(CALG_SCHANNEL_ENC_KEY);
+#endif
+#ifdef CALG_PCT1_MASTER
   CIPHEROPTION(CALG_PCT1_MASTER);
+#endif
+#ifdef CALG_SSL2_MASTER
   CIPHEROPTION(CALG_SSL2_MASTER);
+#endif
+#ifdef CALG_TLS1_MASTER
   CIPHEROPTION(CALG_TLS1_MASTER);
+#endif
+#ifdef CALG_RC5
   CIPHEROPTION(CALG_RC5);
+#endif
+#ifdef CALG_HMAC
   CIPHEROPTION(CALG_HMAC);
+#endif
   CIPHEROPTION(CALG_TLS1PRF);
 #ifdef CALG_HASH_REPLACE_OWF
   CIPHEROPTION(CALG_HASH_REPLACE_OWF);