Avoid unnecessary MSYS2 conversion of some arguments
authorRichard Levitte <levitte@openssl.org>
Tue, 21 Nov 2017 14:09:59 +0000 (15:09 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 21 Nov 2017 23:37:34 +0000 (00:37 +0100)
commitf106f40694b6dd22a70c3c86fd7eb790b00cf4a6
tree9d3c05149838626465f5954285b56bac6fd2a798
parent281bf2332caa33184ad611f4f96b3f7fd44d1d29
Avoid unnecessary MSYS2 conversion of some arguments

Fixes #4740

The MSYS2 run-time convert arguments that look like paths when
executing a program unless that application is linked with the MSYS
run-time.  The exact conversion rules are listed here:

    http://www.mingw.org/wiki/Posix_path_conversion

With the built-in configurations (all having names starting with
"mingw"), the openssl application is not linked with the MSYS2
run-time, and therefore, it will receive possibly converted arguments
from the process that executes it.  This conversion is fine for normal
path arguments, but it happens that some arguments to the openssl
application get converted when they shouldn't.  In one case, it's
arguments like '-passin file:something', and in another, it's a file:
URI (what typically happens is that URIs without an authority
component get converted, 'cause the conversion mechanism doesn't
recognise them as URIs).

To avoid conversion where we don't want it, we simply assign
MSYS2_ARG_CONV_EXCL a pattern to avoid specific conversions.  As a
precaution, we only do this where we obviously need it.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/4765)
test/recipes/04-test_pem.t
test/recipes/90-test_store.t