diff --git a/patches/tls_config.c.patch b/patches/tls_config.c.patch index 5702a58..cd9817c 100644 --- a/patches/tls_config.c.patch +++ b/patches/tls_config.c.patch @@ -1,5 +1,5 @@ ---- tls/tls_config.c.orig Sun Mar 18 00:29:59 2018 -+++ tls/tls_config.c Sun Mar 18 00:30:51 2018 +--- tls/tls_config.c.orig Fri Jul 26 22:16:53 2019 ++++ tls/tls_config.c Fri Jul 26 22:21:25 2019 @@ -15,6 +15,10 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ @@ -11,3 +11,15 @@ #include #include +@@ -48,7 +52,11 @@ tls_config_load_file(struct tls_error *error, const ch + *buf = NULL; + *len = 0; + ++#ifndef _WIN32 + if ((fd = open(filename, O_RDONLY)) == -1) { ++#else ++ if ((fd = open(filename, O_RDONLY | O_BINARY)) == -1) { ++#endif + tls_error_set(error, "failed to open %s file '%s'", + filetype, filename); + goto err; diff --git a/patches/tls_util.c.patch b/patches/tls_util.c.patch index 10f2f99..9f57d83 100644 --- a/patches/tls_util.c.patch +++ b/patches/tls_util.c.patch @@ -1,5 +1,5 @@ ---- tls/tls_util.c.orig Sun Mar 18 00:30:07 2018 -+++ tls/tls_util.c Sun Mar 18 00:31:09 2018 +--- tls/tls_util.c.orig Fri Jul 26 22:17:04 2019 ++++ tls/tls_util.c Fri Jul 26 22:21:22 2019 @@ -17,6 +17,10 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ @@ -11,3 +11,15 @@ #include #include +@@ -161,7 +165,11 @@ tls_load_file(const char *name, size_t *len, char *pas + + *len = 0; + ++#ifndef _WIN32 + if ((fd = open(name, O_RDONLY)) == -1) ++#else ++ if ((fd = open(name, O_RDONLY | O_BINARY)) == -1) ++#endif + return (NULL); + + /* Just load the file into memory without decryption */