Basic test for "openssl req -precert" via apps/CA.pl
authorRob Percival <robpercival@google.com>
Thu, 10 Mar 2016 20:26:34 +0000 (20:26 +0000)
committerRich Salz <rsalz@openssl.org>
Wed, 22 Feb 2017 15:40:30 +0000 (10:40 -0500)
TODO(robpercival): Should actually test that the output certificate
contains the poison extension.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/843)

test/recipes/80-test_ca.t

index 28a090ea7dd9bd768c9e4a1e90fd954c1109e0c7..4766b8280d536aecf302a8f44da463a3f1350759 100644 (file)
@@ -22,7 +22,7 @@ my $std_openssl_cnf =
 
 rmtree("demoCA", { safe => 0 });
 
-plan tests => 4;
+plan tests => 5;
  SKIP: {
      $ENV{OPENSSL_CONFIG} = '-config "'.srctop_file("test", "CAss.cnf").'"';
      skip "failed creating CA structure", 3
@@ -41,6 +41,10 @@ plan tests => 4;
 
      ok(run(perlapp(["CA.pl", "-verify", "newcert.pem"])),
         'verifying new certificate');
+
+     $ENV{OPENSSL_CONFIG} = "-config ".srctop_file("test", "Uss.cnf");
+     ok(run(perlapp(["CA.pl", "-newprecert"], stderr => undef)),
+        'creating new pre-certificate');
 }