提交 46ac07f5 编写于 作者: M Matt Caswell

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: NRichard Levitte <levitte@openssl.org>
上级 cb2e10f2
...@@ -36,6 +36,7 @@ my $digest = "-sha1"; ...@@ -36,6 +36,7 @@ my $digest = "-sha1";
my @reqcmd = ("openssl", "req"); my @reqcmd = ("openssl", "req");
my @x509cmd = ("openssl", "x509", $digest); my @x509cmd = ("openssl", "x509", $digest);
my @verifycmd = ("openssl", "verify"); my @verifycmd = ("openssl", "verify");
my @gendsacmd = ("openssl", "gendsa");
my $dummycnf = srctop_file("apps", "openssl.cnf"); my $dummycnf = srctop_file("apps", "openssl.cnf");
my $CAkey = "keyCA.ss"; my $CAkey = "keyCA.ss";
...@@ -105,6 +106,7 @@ sub testss { ...@@ -105,6 +106,7 @@ sub testss {
my @req_dsa = ("-newkey", my @req_dsa = ("-newkey",
"dsa:".srctop_file("apps", "dsa1024.pem")); "dsa:".srctop_file("apps", "dsa1024.pem"));
my $dsaparams = srctop_file("apps", "dsa1024.pem");
my @req_new; my @req_new;
if ($no_rsa) { if ($no_rsa) {
@req_new = @req_dsa; @req_new = @req_dsa;
...@@ -175,14 +177,18 @@ sub testss { ...@@ -175,14 +177,18 @@ sub testss {
plan skip_all => "skipping DSA certificate creation" plan skip_all => "skipping DSA certificate creation"
if $no_dsa; if $no_dsa;
plan tests => 4; plan tests => 5;
SKIP: { SKIP: {
$ENV{CN2} = "DSA Certificate"; $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 skip 'failure', 3 unless
ok(run(app([@reqcmd, "-config", $Uconf, ok(run(app([@reqcmd, "-new", "-config", $Uconf,
"-out", $Dreq, "-keyout", $Dkey, "-out", $Dreq, "-key", $Dkey],
@req_dsa],
stdout => "err.ss")), stdout => "err.ss")),
"make a DSA user cert request"); "make a DSA user cert request");
skip 'failure', 2 unless skip 'failure', 2 unless
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册