20-test_enc.t (1.1.1.2) | 20-test_enc.t (1.1.1.1) |
---|---|
1#! /usr/bin/env perl 2# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. 3# 4# Licensed under the OpenSSL license (the "License"). You may not use 5# this file except in compliance with the License. You can obtain a copy 6# in the file LICENSE in the source distribution or at 7# https://www.openssl.org/source/license.html 8 --- 13 unchanged lines hidden (view full) --- 22# so the directory portion of $0 might not be correct any more. 23# However, the name hasn't changed. 24my $testsrc = srctop_file("test","recipes",basename($0)); 25 26my $test = catfile(".", "p"); 27 28my $cmd = "openssl"; 29 | 1#! /usr/bin/env perl 2# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. 3# 4# Licensed under the OpenSSL license (the "License"). You may not use 5# this file except in compliance with the License. You can obtain a copy 6# in the file LICENSE in the source distribution or at 7# https://www.openssl.org/source/license.html 8 --- 13 unchanged lines hidden (view full) --- 22# so the directory portion of $0 might not be correct any more. 23# However, the name hasn't changed. 24my $testsrc = srctop_file("test","recipes",basename($0)); 25 26my $test = catfile(".", "p"); 27 28my $cmd = "openssl"; 29 |
30my $ciphersstatus = undef; | |
31my @ciphers = 32 map { s/^\s+//; s/\s+$//; split /\s+/ } | 30my @ciphers = 31 map { s/^\s+//; s/\s+$//; split /\s+/ } |
33 run(app([$cmd, "list", "-cipher-commands"]), 34 capture => 1, statusvar => \$ciphersstatus); | 32 run(app([$cmd, "list", "-cipher-commands"]), capture => 1); |
35 | 33 |
36plan tests => 2 + (scalar @ciphers)*2; | 34plan tests => 1 + (scalar @ciphers)*2; |
37 | 35 |
36my $init = ok(copy($testsrc,$test)); 37 38if (!$init) { 39 diag("Trying to copy $testsrc to $test : $!"); 40} 41 |
|
38 SKIP: { | 42 SKIP: { |
39 skip "Problems getting ciphers...", 1 + scalar(@ciphers) 40 unless ok($ciphersstatus, "Running 'openssl list -cipher-commands'"); 41 unless (ok(copy($testsrc, $test), "Copying $testsrc to $test")) { 42 diag($!); 43 skip "Not initialized, skipping...", scalar(@ciphers); 44 } | 43 skip "Not initialized, skipping...", 11 unless $init; |
45 46 foreach my $c (@ciphers) { 47 my %variant = ("$c" => [], 48 "$c base64" => [ "-a" ]); 49 50 foreach my $t (sort keys %variant) { 51 my $cipherfile = "$test.$c.cipher"; 52 my $clearfile = "$test.$c.clear"; --- 18 unchanged lines hidden --- | 44 45 foreach my $c (@ciphers) { 46 my %variant = ("$c" => [], 47 "$c base64" => [ "-a" ]); 48 49 foreach my $t (sort keys %variant) { 50 my $cipherfile = "$test.$c.cipher"; 51 my $clearfile = "$test.$c.clear"; --- 18 unchanged lines hidden --- |