summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2017-11-21 15:22:36 +0100
committerRichard Levitte <levitte@openssl.org>2017-11-22 00:39:32 +0100
commit0ec3b53cdbda0dea32a970fe36893c0c84cfa8f5 (patch)
tree23ff25bfed35ad365efd3a9294163b946a4d18f1 /test
parentba8bd957b86051310dd58a8dba9665b97c62d0d9 (diff)
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> (Merged from https://github.com/openssl/openssl/pull/4766)
Diffstat (limited to 'test')
-rw-r--r--test/recipes/04-test_pem.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/recipes/04-test_pem.t b/test/recipes/04-test_pem.t
index 23d1ef8a93..48f62ff897 100644
--- a/test/recipes/04-test_pem.t
+++ b/test/recipes/04-test_pem.t
@@ -88,7 +88,11 @@ SKIP: {
skip "DSA support disabled, skipping...", (scalar keys %dsa_expected) unless !disabled("dsa");
foreach my $input (keys %dsa_expected) {
my @common = ($cmd, "pkey", "-inform", "PEM", "-passin", "file:" . data_file("wellknown"), "-noout", "-text", "-in");
- my @data = run(app([@common, data_file($input)], stderr => undef), capture => 1);
+ my @data;
+ {
+ local $ENV{MSYS2_ARG_CONV_EXCL} = "file:";
+ @data = run(app([@common, data_file($input)], stderr => undef), capture => 1);
+ }
my @match = grep /68:42:02:16:63:54:16:eb:06:5c:ab:06:72:3b:78:/, @data;
is((scalar @match > 0 ? 1 : 0), $dsa_expected{$input});
}