[Rt-commit] rt branch, 4.4/report-smime-signer-and-issuer-correctly, created. rt-4.4.4-163-g1a75ad3d42

? sunnavy sunnavy at bestpractical.com
Mon Nov 16 17:09:59 EST 2020


The branch, 4.4/report-smime-signer-and-issuer-correctly has been created
        at  1a75ad3d42920d5ea5f1994ded3a666ab62cc377 (commit)

- Log -----------------------------------------------------------------
commit 006676e5f0091ab18a9bbb9bdffb682f8334f1fc
Author: Dianne Skoll <dianne at bestpractical.com>
Date:   Tue Nov 3 09:47:46 2020 -0500

    Report the cert authority in an "assured by ..." clause.

diff --git a/lib/RT/Crypt/SMIME.pm b/lib/RT/Crypt/SMIME.pm
index 5ea826327c..22cfa9a198 100644
--- a/lib/RT/Crypt/SMIME.pm
+++ b/lib/RT/Crypt/SMIME.pm
@@ -533,7 +533,7 @@ sub Verify {
 
     $res{'status'} = $self->FormatStatus({
         Operation => "Verify", Status => "DONE",
-        Message => "The signature is good, signed by ".$signer->{User}[0]{String}.", trust is ".$signer->{TrustTerse},
+        Message => "The signature is good, signed by ".$signer->{User}[0]{String}.", assured by " . $signer->{Issuer}[0]{String} . ", trust is ".$signer->{TrustTerse},
         UserString => $signer->{User}[0]{String},
         Trust => uc($signer->{TrustTerse}),
     });

commit 1a75ad3d42920d5ea5f1994ded3a666ab62cc377
Author: Dianne Skoll <dianne at bestpractical.com>
Date:   Tue Nov 3 09:47:46 2020 -0500

    Report the S/MIME signer correctly when there is no EmailAddress
    
    There are many cases when a cert doesn't include an email address. On
    the other hand, CN is guaranteed to be present

diff --git a/lib/RT/Crypt/SMIME.pm b/lib/RT/Crypt/SMIME.pm
index 22cfa9a198..9ebfc66668 100644
--- a/lib/RT/Crypt/SMIME.pm
+++ b/lib/RT/Crypt/SMIME.pm
@@ -933,8 +933,11 @@ sub GetCertificateInfo {
             my $method = $type . "_" . $USER_MAP{$_};
             $data{$_} = $cert->$method if $cert->can($method);
         }
-        $data{String} = Email::Address->new( @data{'Name', 'EmailAddress'} )->format
-            if $data{EmailAddress};
+        if ($data{EmailAddress}) {
+            $data{String} = Email::Address->new( @data{'Name', 'EmailAddress'} )->format;
+        } else {
+            $data{String} = $data{Name};
+        }
         return \%data;
     };
 

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


More information about the rt-commit mailing list