[openssl-commits] [tools] master update

Richard Levitte levitte at openssl.org
Tue Sep 26 07:17:28 UTC 2017


The branch master has been updated
       via  5a03dc8280b369d8807f0b53fa6a443735b7f030 (commit)
       via  a63e7491e49ff8813875a8526d8f0f7cb890e9a7 (commit)
      from  fc9383a4c71378c85708541b0ac18ea296f95cf9 (commit)


- Log -----------------------------------------------------------------
commit 5a03dc8280b369d8807f0b53fa6a443735b7f030
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri Sep 22 15:27:24 2017 +0200

    Test that a casing different from original CLA data works

commit a63e7491e49ff8813875a8526d8f0f7cb890e9a7
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri Sep 22 15:16:45 2017 +0200

    QueryApp: make email addresses in CLA db lower case
    
    This resolves any issue with mixed cases.
    
    Changed test data to be mixed casing while leaving the queries to use
    lowercase, to make sure this is properly tested.

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

Summary of changes:
 OpenSSL-Query/t/query.t             |  4 ++--
 QueryApp/lib/OpenSSL/Query/ClaDB.pm | 12 ++++++++----
 QueryApp/t/query_data/cdb.txt       |  2 +-
 3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/OpenSSL-Query/t/query.t b/OpenSSL-Query/t/query.t
index 5cb7c25..fd557e6 100644
--- a/OpenSSL-Query/t/query.t
+++ b/OpenSSL-Query/t/query.t
@@ -84,8 +84,8 @@ SKIP: {
 
   subtest 'Request of CLA status for Ray Bradbury' => sub {
     plan tests => 1;
-    my $res = $query->has_cla( 'ray at ourplace.com' );
-    ok( $res, 'Ray Bradbury has CLA as ray at ourplace.com' );
+    my $res = $query->has_cla( 'ray at Ourplace.com' );
+    ok( $res, 'Ray Bradbury has CLA as ray at Ourplace.com' );
     note( $res );
   };
 
diff --git a/QueryApp/lib/OpenSSL/Query/ClaDB.pm b/QueryApp/lib/OpenSSL/Query/ClaDB.pm
index 3ca5852..406b445 100644
--- a/QueryApp/lib/OpenSSL/Query/ClaDB.pm
+++ b/QueryApp/lib/OpenSSL/Query/ClaDB.pm
@@ -33,10 +33,14 @@ sub _build__cladb {
     next if $line =~ m|^\s*$|;
     croak "Malformed CLADB line: $line"
       unless $line =~ m|^(\S+\@\S+)\s+([ICR])\s+(.+)$|;
-    croak "Duplicate email address: $1"
-      if exists $cladb->{$1};
 
-    $cladb->{$1} = { status => $2, name => $3 };
+    my $email = lc $1;
+    my $status = $2;
+    my $name = $3;
+    croak "Duplicate email address: $email"
+      if exists $cladb->{$email};
+
+    $cladb->{$email} = { status => $status, name => $name };
   }
   close $clafh;
 
@@ -45,7 +49,7 @@ sub _build__cladb {
 
 sub has_cla {
   my $self = shift;
-  my $id = shift;
+  my $id = lc shift;
   if ($id =~ m|<(\S+\@\S+)>|) { $id = $1; }
   croak "Malformed input ID" unless $id =~ m|^\S+(\@\S+)$|;
   my $starid = '*' . $1;
diff --git a/QueryApp/t/query_data/cdb.txt b/QueryApp/t/query_data/cdb.txt
index 36d238c..14fc6c3 100644
--- a/QueryApp/t/query_data/cdb.txt
+++ b/QueryApp/t/query_data/cdb.txt
@@ -1 +1 @@
-ray at ourplace.com		I	Ray Bradbury
+Ray at ourPlace.com		I	Ray Bradbury


More information about the openssl-commits mailing list