[openssl-commits] [openssl] master update
Richard Levitte
levitte at openssl.org
Sat Jun 4 07:45:26 UTC 2016
The branch master has been updated
via e2ec7332c45a39369cb541bbc33d88188b2acd94 (commit)
via c9d2437385694fb73d280db763ac495655f5d399 (commit)
via 67152812f466ab01580b8503c095da9aace9b975 (commit)
from f6ce429084155b027a48f6426f6ff216debd3b5b (commit)
- Log -----------------------------------------------------------------
commit e2ec7332c45a39369cb541bbc33d88188b2acd94
Author: Richard Levitte <levitte at openssl.org>
Date: Sat Jun 4 01:05:06 2016 +0200
Make 25-test_gen.t and 25-test_req.t into one
Since one generates files that the other depends on, there's no
real reason to keep them separate. Since they were both different
aspects of 'openssl req', the merge ends up in 25-test_req.t.
This also makes cleanup easier.
Reviewed-by: Rich Salz <rsalz at openssl.org>
commit c9d2437385694fb73d280db763ac495655f5d399
Author: Richard Levitte <levitte at openssl.org>
Date: Sat Jun 4 00:50:17 2016 +0200
Have some more test recipes clean up after themselves
Reviewed-by: Rich Salz <rsalz at openssl.org>
commit 67152812f466ab01580b8503c095da9aace9b975
Author: Richard Levitte <levitte at openssl.org>
Date: Sat Jun 4 00:48:13 2016 +0200
Windows build: Remove .manifest files in test/ as well
Reviewed-by: Rich Salz <rsalz at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
Configurations/windows-makefile.tmpl | 1 +
test/recipes/10-test_bn.t | 4 ++-
test/recipes/25-test_gen.t | 51 ------------------------------------
test/recipes/25-test_req.t | 34 +++++++++++++++++++++---
test/recipes/80-test_ca.t | 2 +-
test/recipes/80-test_ssl_old.t | 40 +++++++++++++++++++++++++++-
6 files changed, 74 insertions(+), 58 deletions(-)
delete mode 100644 test/recipes/25-test_gen.t
diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl
index 9a8109f..3dae414 100644
--- a/Configurations/windows-makefile.tmpl
+++ b/Configurations/windows-makefile.tmpl
@@ -194,6 +194,7 @@ clean: libclean
-del /Q /S /F apps\*.lib
-del /Q /S /F engines\*.manifest
-del /Q /S /F apps\*.manifest
+ -del /Q /S /F test\*.manifest
depend:
diff --git a/test/recipes/10-test_bn.t b/test/recipes/10-test_bn.t
index e35498d..13f278e 100644
--- a/test/recipes/10-test_bn.t
+++ b/test/recipes/10-test_bn.t
@@ -64,7 +64,9 @@ my $init = ok(run(test(["bntest"], stdout => $testresults)), 'initialize');
last unless $l;
}
};
-}
+ }
+
+unlink $testresults;
sub check_operations {
my $failcount = 0;
diff --git a/test/recipes/25-test_gen.t b/test/recipes/25-test_gen.t
deleted file mode 100644
index 6eac7ca..0000000
--- a/test/recipes/25-test_gen.t
+++ /dev/null
@@ -1,51 +0,0 @@
-#! /usr/bin/env perl
-# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
-#
-# Licensed under the OpenSSL license (the "License"). You may not use
-# this file except in compliance with the License. You can obtain a copy
-# in the file LICENSE in the source distribution or at
-# https://www.openssl.org/source/license.html
-
-
-use strict;
-use warnings;
-
-use File::Spec;
-use OpenSSL::Test qw/:DEFAULT srctop_file/;
-use OpenSSL::Test::Utils;
-
-setup("test_gen");
-
-plan tests => 1;
-
-my $T = "testcert";
-my $KEY = 512;
-my $CA = srctop_file("certs", "testca.pem");
-
-unlink "$T.1", "$T.2", "$T.key";
-open RND, ">>", ".rnd";
-print RND "string to make the random number generator think it has entropy";
-close RND;
-
-subtest "generating certificate requests" => sub {
- my @req_new;
- if (disabled("rsa")) {
- @req_new = ("-newkey", "dsa:".srctop_file("apps", "dsa512.pem"));
- } else {
- @req_new = ("-new");
- note("There should be a 2 sequences of .'s and some +'s.");
- note("There should not be more that at most 80 per line");
- }
-
- unlink "testkey.pem", "testreq.pem";
-
- plan tests => 2;
-
- ok(run(app(["openssl", "req", "-config", srctop_file("test", "test.cnf"),
- @req_new, "-out", "testreq.pem"])),
- "Generating request");
-
- ok(run(app(["openssl", "req", "-config", srctop_file("test", "test.cnf"),
- "-verify", "-in", "testreq.pem", "-noout"])),
- "Verifying signature on request");
-};
diff --git a/test/recipes/25-test_req.t b/test/recipes/25-test_req.t
index d5eb29b..bcc1025 100644
--- a/test/recipes/25-test_req.t
+++ b/test/recipes/25-test_req.t
@@ -10,21 +10,47 @@
use strict;
use warnings;
-use File::Spec;
+use OpenSSL::Test::Utils;
use OpenSSL::Test qw/:DEFAULT srctop_file/;
setup("test_req");
-plan tests => 3;
+plan tests => 4;
require_ok(srctop_file('test','recipes','tconversion.pl'));
+open RND, ">>", ".rnd";
+print RND "string to make the random number generator think it has entropy";
+close RND;
+subtest "generating certificate requests" => sub {
+ my @req_new;
+ if (disabled("rsa")) {
+ @req_new = ("-newkey", "dsa:".srctop_file("apps", "dsa512.pem"));
+ } else {
+ @req_new = ("-new");
+ note("There should be a 2 sequences of .'s and some +'s.");
+ note("There should not be more that at most 80 per line");
+ }
+
+ plan tests => 2;
+
+ ok(run(app(["openssl", "req", "-config", srctop_file("test", "test.cnf"),
+ @req_new, "-out", "testreq.pem"])),
+ "Generating request");
+
+ ok(run(app(["openssl", "req", "-config", srctop_file("test", "test.cnf"),
+ "-verify", "-in", "testreq.pem", "-noout"])),
+ "Verifying signature on request");
+};
+
my @openssl_args = ("req", "-config", srctop_file("apps", "openssl.cnf"));
run_conversion('req conversions',
"testreq.pem");
run_conversion('req conversions -- testreq2',
- "testreq2.pem");
+ srctop_file("test", "testreq2.pem"));
+
+unlink "testkey.pem", "testreq.pem";
sub run_conversion {
my $title = shift;
@@ -40,7 +66,7 @@ sub run_conversion {
plan skip_all => "skipping req conversion test for $reqfile"
if grep /Unknown Public Key/, map { s/\R//; } <DATA>;
- tconversion("req", "testreq.pem", @openssl_args);
+ tconversion("req", $reqfile, @openssl_args);
}
close DATA;
unlink "req-check.err";
diff --git a/test/recipes/80-test_ca.t b/test/recipes/80-test_ca.t
index cd42687..f4c01d5 100644
--- a/test/recipes/80-test_ca.t
+++ b/test/recipes/80-test_ca.t
@@ -45,7 +45,7 @@ plan tests => 4;
rmtree("demoCA", { safe => 0 });
-unlink "newcert.pem", "newreq.pem";
+unlink "newcert.pem", "newreq.pem", "newkey.pem";
sub yes {
diff --git a/test/recipes/80-test_ssl_old.t b/test/recipes/80-test_ssl_old.t
index 74d4360..59d48a0 100644
--- a/test/recipes/80-test_ssl_old.t
+++ b/test/recipes/80-test_ssl_old.t
@@ -11,7 +11,7 @@ use strict;
use warnings;
use POSIX;
-use File::Spec;
+use File::Basename;
use File::Copy;
use OpenSSL::Test qw/:DEFAULT with bldtop_file srctop_file cmdstr/;
use OpenSSL::Test::Utils;
@@ -798,3 +798,41 @@ sub testssl {
}
};
}
+
+unlink $CAkey;
+unlink $CAcert;
+unlink $CAserial;
+unlink $CAreq;
+unlink $CAreq2;
+
+unlink $Ukey;
+unlink $Ureq;
+unlink $Ucert;
+unlink basename($Ucert, '.ss').'.srl';
+
+unlink $Dkey;
+unlink $Dreq;
+unlink $Dcert;
+
+unlink $Ekey;
+unlink $Ereq;
+unlink $Ecert;
+
+unlink $P1key;
+unlink $P1req;
+unlink $P1cert;
+unlink basename($P1cert, '.ss').'.srl';
+unlink $P1intermediate;
+unlink "intP1.ss";
+
+unlink $P2key;
+unlink $P2req;
+unlink $P2cert;
+unlink $P2intermediate;
+unlink "intP2.ss";
+
+unlink "ecp.ss";
+unlink "err.ss";
+
+unlink $server_sess;
+unlink $client_sess;
More information about the openssl-commits
mailing list