[openssl] master update

Richard Levitte levitte at openssl.org
Sun May 3 04:06:26 UTC 2020


The branch master has been updated
       via  6d81bb2676f6a210f15f17324ab6852f52cc7f55 (commit)
      from  c450922c8cd8bc7326670fe83e2eb453fea79595 (commit)


- Log -----------------------------------------------------------------
commit 6d81bb2676f6a210f15f17324ab6852f52cc7f55
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri May 1 19:24:50 2020 +0200

    util/perl/OpenSSL/OID.pm: remove the included unit test
    
    The unit test uses features that appeared in perl 5.12, and is
    therefore a source of trouble when building.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/11704)

-----------------------------------------------------------------------

Summary of changes:
 util/perl/OpenSSL/OID.pm | 85 ------------------------------------------------
 1 file changed, 85 deletions(-)

diff --git a/util/perl/OpenSSL/OID.pm b/util/perl/OpenSSL/OID.pm
index 0bc34ce5b7..0b39ef9fd2 100644
--- a/util/perl/OpenSSL/OID.pm
+++ b/util/perl/OpenSSL/OID.pm
@@ -304,89 +304,4 @@ sub _pairmap (&@) {
     map { $block->($_) } _pairs @_;
 }
 
-######## UNIT TESTING
-
-use Test::More;
-
-sub TEST {
-    # Order is important, so we make it a pairwise list
-    my @predefined =
-        (
-         'pkcs' => '1.2.840.113549',
-         'pkcs-1' => 'pkcs.1',
-        );
-
-    my %good_cases =
-        (
-         ' 1.2.840.113549.1.1 ' => [ 42, 134, 72, 134, 247, 13, 1, 1 ],
-         'pkcs.1.1' => [ 42, 134, 72, 134, 247, 13, 1, 1 ],
-         'pkcs-1.1' => [ 42, 134, 72, 134, 247, 13, 1, 1 ],
-         ' { iso (1) 2 840 113549 1 1 } ' => [ 42, 134, 72, 134, 247, 13, 1, 1 ],
-         '{ pkcs 1 1 } ' => [ 42, 134, 72, 134, 247, 13, 1, 1 ],
-         '{pkcs-1 1 }' => [ 42, 134, 72, 134, 247, 13, 1, 1 ],
-        );
-    my @bad_cases =
-        (
-         ' { 1.2.840.113549.1.1 } ',
-        );
-
-    plan tests =>
-        scalar ( @predefined ) / 2
-        + scalar ( keys %good_cases )
-        + scalar @bad_cases;
-
-    note 'Predefine a few names OIDs';
-    foreach my $pair ( _pairs @predefined ) {
-        ok( defined eval { register_oid(@$pair) },
-            "Registering $pair->[0] => $pair->[1]" );
-    }
-
-    note 'Good cases';
-    foreach ( keys %good_cases ) {
-        subtest "Checking '$_'" => sub {
-            my $oid = shift;
-
-            plan tests => 5;
-
-            my (@l, @e);
-
-            ok( scalar (@l = eval { parse_oid $oid }) > 0,
-                "Parsing" );
-            diag $@ unless @l;
-            ok( scalar (@e = eval { encode_oid_nums @l }) > 0,
-                "Encoding via encode_oid_nums()" );
-            diag $@ unless @e;
-            is_deeply(\@e, $good_cases{$oid}, "Checking encoding");
-            note "'$oid' => ", join(', ', @e) if @e;
-
-            ok( scalar (@e = eval { encode_oid $oid }) > 0,
-                "Encoding directly" );
-            diag $@ unless @e;
-            is_deeply(\@e, $good_cases{$oid}, "Checking encoding");
-            note "'$oid' => ", join(', ', @e) if @e;
-        },
-        $_;
-    }
-
-    note 'Bad cases';
-    foreach ( @bad_cases ) {
-        subtest "Checking '$_'" => sub {
-            my $oid = shift;
-
-            plan tests => 2;
-
-            my (@l, @e);
-
-            ok( scalar (@l = eval { parse_oid $oid }) == 0,
-                "Parsing '$oid'" );
-            note $@ unless @l;
-            ok( scalar (@e = eval { encode_oid_nums @l }) == 0,
-                "Encoding '$oid'" );
-            note $@ unless @e;
-            note "'$oid' => ", join(', ', @e) if @e;
-        },
-        $_;
-    }
-}
-
 1; # End of OpenSSL::OID


More information about the openssl-commits mailing list