diff options
author | Matt Caswell <matt@openssl.org> | 2016-05-20 17:49:33 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-05-27 15:19:03 +0100 |
commit | 46ac07f5455dd39840b63bebd2942c2058e7a9cb (patch) | |
tree | 919e8a22bea731fd19e30167802e817fbeb5ab8c /test/recipes | |
parent | cb2e10f257a464c6b475b321dd9e4769df84dbf6 (diff) | |
download | openssl-46ac07f5455dd39840b63bebd2942c2058e7a9cb.tar.gz |
Avoid msys name mangling
If using the msys console then msys attempts to "fix" command line
arguments to convert them from Unix style to Windows style. One of the
things it does is to look for arguments seperated by colons. This it
assumes is a list of file paths, so it replaces the colon with a semi-colon.
This was causing one of our tests to fail when calling the "req" command
line app. We were attempting to create a new DSA key and passing the
argument "dsa:../apps/dsa1024.pem". This is exactly what we intended but
Msys mangles it to "dsa;../apps/dsa1024.pem" and the command fails.
There doesn't seem to be a way to suppress Msys name mangling. Fortunately
we can work around this issue by generating the DSA key in a separate step
by calling "gendsa".
RT#4255
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'test/recipes')
-rw-r--r-- | test/recipes/80-test_ssl_old.t | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/test/recipes/80-test_ssl_old.t b/test/recipes/80-test_ssl_old.t index 37635308ea..b41e67a2ac 100644 --- a/test/recipes/80-test_ssl_old.t +++ b/test/recipes/80-test_ssl_old.t @@ -36,6 +36,7 @@ my $digest = "-sha1"; my @reqcmd = ("openssl", "req"); my @x509cmd = ("openssl", "x509", $digest); my @verifycmd = ("openssl", "verify"); +my @gendsacmd = ("openssl", "gendsa"); my $dummycnf = srctop_file("apps", "openssl.cnf"); my $CAkey = "keyCA.ss"; @@ -105,6 +106,7 @@ sub testss { my @req_dsa = ("-newkey", "dsa:".srctop_file("apps", "dsa1024.pem")); + my $dsaparams = srctop_file("apps", "dsa1024.pem"); my @req_new; if ($no_rsa) { @req_new = @req_dsa; @@ -175,14 +177,18 @@ sub testss { plan skip_all => "skipping DSA certificate creation" if $no_dsa; - plan tests => 4; + plan tests => 5; SKIP: { $ENV{CN2} = "DSA Certificate"; + skip 'failure', 4 unless + ok(run(app([@gendsacmd, "-out", $Dkey, + $dsaparams], + stdout => "err.ss")), + "make a DSA key"); skip 'failure', 3 unless - ok(run(app([@reqcmd, "-config", $Uconf, - "-out", $Dreq, "-keyout", $Dkey, - @req_dsa], + ok(run(app([@reqcmd, "-new", "-config", $Uconf, + "-out", $Dreq, "-key", $Dkey], stdout => "err.ss")), "make a DSA user cert request"); skip 'failure', 2 unless |