提交 412a963c 编写于 作者: R Richard Levitte

Pipes on VMS do not work well with binary data, use an intermediary file

VMS being a record oriented operating system, it's uncertain how the
'pipe' passes binary data from one process to another.  Experience
shows that we get in trouble, and it's probably due to the pipe in
itself being opened in text mode (variable length records).

It's safer to pass data via an intermediary file instead.
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 4034c38b
......@@ -20,15 +20,17 @@ sub test_ocsp {
my $CAfile = shift;
my $expected_exit = shift;
run(app(["openssl", "base64", "-d",
"-in", catfile($ocspdir,$inputfile),
"-out", "ocsp-resp-fff.dat"]));
with({ exit_checker => sub { return shift == $expected_exit; } },
sub { ok(run(pipe(app(["openssl", "base64", "-d",
"-in", catfile($ocspdir,$inputfile)]),
app(["openssl", "ocsp", "-respin", "-",
"-partial_chain", @check_time,
"-CAfile", catfile($ocspdir, $CAfile),
"-verify_other", catfile($ocspdir, $CAfile),
"-no-CApath"]))),
$title); });
sub { ok(run(app(["openssl", "ocsp", "-respin", "ocsp-resp-fff.dat",
"-partial_chain", @check_time,
"-CAfile", catfile($ocspdir, $CAfile),
"-verify_other", catfile($ocspdir, $CAfile),
"-no-CApath"])),
$title); });
unlink "ocsp-resp-fff.dat";
}
plan tests => 10;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册