Rather use -out parameter than redirect stdout
authorRichard Levitte <levitte@openssl.org>
Tue, 14 Mar 2017 16:01:19 +0000 (17:01 +0100)
committerRichard Levitte <levitte@openssl.org>
Thu, 16 Mar 2017 12:06:32 +0000 (13:06 +0100)
On some platforms, setting stdout to binary mode isn't quite enough,
which makes the result unusable.  With -out, we have better control.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2939)
(cherry picked from commit d8f9213ae2f0c59198fe56eeb70c34d735422254)

test/recipes/15-test_rsapss.t

index 8d2033314c9666db82590618a7dc41bf341af6df..34accaa28652295c01ceff2f06bcf475c8e46f6d 100644 (file)
@@ -21,8 +21,8 @@ plan tests => 5;
 #using test/testrsa.pem which happens to be a 512 bit RSA
 ok(run(app(['openssl', 'dgst', '-sign', srctop_file('test', 'testrsa.pem'), '-sha1',
             '-sigopt', 'rsa_padding_mode:pss', '-sigopt', 'rsa_pss_saltlen:-2',
-            '-sigopt', 'rsa_mgf1_md:sha512', srctop_file('test', 'testrsa.pem')],
-           stdout => 'testrsapss.sig')),
+            '-sigopt', 'rsa_mgf1_md:sha512', '-out', 'testrsapss.sig',
+            srctop_file('test', 'testrsa.pem')])),
    "openssl dgst -sign");
 
 with({ exit_checker => sub { return shift == 1; } },