#!/usr/bin/perl use Test2::V0; skip_all('This test is only suitable for the engine') unless $ARGV[0] eq 'engine'; plan(7); use Cwd 'abs_path'; # prepare data for open (my $F,">","testdata.dat"); print $F "12345670" x 128; close $F; my $key='0123456789abcdef' x 2; # # You can redefine engine to use using ENGINE_NAME environment variable # my $engine=$ENV{'ENGINE_NAME'}||"gost"; # Reopen STDERR to eliminate extra output open STDERR, ">>","tests.err"; if (exists $ENV{'OPENSSL_CONF'}) { delete $ENV{'OPENSSL_CONF'} } # # This test needs output of openssl engine -c command. # Default one is hardcoded below, but you can place file # ${ENGINE_NAME}.info into this directory if you use this test suite # to test other engine implementing GOST cryptography. # my $engine_info; if ( -f $engine . ".info") { diag("Reading $engine.info"); open F, "<", $engine . ".info"; read F,$engine_info,1024; } else { $engine_info= <","test.cnf"; print $F <