Hello Han, > That sounds like a reasonable workaround to me. But before patching it, > have you tried updating mingw32?
However the version included in Debian stable is quiet recent 5.0.1. I just downloaded the most recent source version, extracted and greped the source after SEC_E_APPLICATION_PROTOCOL_MISMATCH, but found nothing. So here is my patch based on what I found here[1] and Daniels comment. On the other hand we could just throw it out because it ends up in the default case anyway. [1] https://github.com/jeroen/mongolite/blob/master/src/mongoc/mongoc-secure-channel.c I tested the patch with my application and it works for me. Cheers, Thomas
>From 33344920f85259efc4e9606047df9655c080cb5d Mon Sep 17 00:00:00 2001 From: Thomas Glanzmann <[email protected]> Date: Thu, 6 Sep 2018 21:37:15 +0200 Subject: [PATCH] schannel: Fix build regression introduced in 5a3efb1db for mingw --- lib/vtls/schannel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c index e7d1e3dde..7dfe39460 100644 --- a/lib/vtls/schannel.c +++ b/lib/vtls/schannel.c @@ -810,7 +810,9 @@ schannel_connect_step1(struct connectdata *conn, int sockindex) case SEC_E_INTERNAL_ERROR: case SEC_E_NO_CREDENTIALS: case SEC_E_UNSUPPORTED_FUNCTION: +#ifdef SEC_E_APPLICATION_PROTOCOL_MISMATCH /* Not defined in mingw */ case SEC_E_APPLICATION_PROTOCOL_MISMATCH: +#endif default: failf(data, "schannel: initial InitializeSecurityContext failed: %s", Curl_sspi_strerror(conn, sspi_status)); @@ -1047,7 +1049,9 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) case SEC_E_INTERNAL_ERROR: case SEC_E_NO_CREDENTIALS: case SEC_E_UNSUPPORTED_FUNCTION: - case SEC_E_APPLICATION_PROTOCOL_MISMATCH: +#ifdef SEC_E_APPLICATION_PROTOCOL_MISMATCH /* Not defined in mingw */ + case SEC_E_APPLICATION_PROTOCOL_MISMATCH: +#endif default: failf(data, "schannel: next InitializeSecurityContext failed: %s", Curl_sspi_strerror(conn, sspi_status)); -- 2.11.0
------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
