[Rt-commit] rt branch, 4.2/smime-v2-without-gpg, created. rt-4.0.4-507-ge7c0d0d

Kevin Falcone falcone at bestpractical.com
Fri Apr 20 12:19:41 EDT 2012


The branch, 4.2/smime-v2-without-gpg has been created
        at  e7c0d0d1a65f2861f996122720b2d04756ebb4d1 (commit)

- Log -----------------------------------------------------------------
commit 386cd724b7ff7139ce291726673893974f6f8726
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Fri Apr 20 12:15:00 2012 -0400

    Switch to using the FormatStatus method
    
    The Decryption methods use this, and the verify version was just
    slightly different, so use the helper.

diff --git a/lib/RT/Crypt/SMIME.pm b/lib/RT/Crypt/SMIME.pm
index 9a61163..2a26166 100644
--- a/lib/RT/Crypt/SMIME.pm
+++ b/lib/RT/Crypt/SMIME.pm
@@ -391,11 +391,11 @@ sub VerifyRFC3851 {
     $args{'Data'}->parts([ $res_entity->parts ]);
     $args{'Data'}->make_singlepart;
 
-    $res{'status'} =
-        "Operation: Verify\nStatus: DONE\n"
-        ."Message: The signature is good\n"
-        ."UserString: ". $signers[0]{'User'}[0]{'String'} ."\n"
-    ;
+    $res{'status'} = $self->FormatStatus({
+            Operation   => 'Verify', Status => 'DONE',
+            Message     => 'The signature is good',
+            UserString  => $signers[0]{'User'}[0]{'String'},
+        });
 
     return %res;
 }

commit 78ff1d33f74bf8c2430237145b7e27a2b79b237c
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Fri Apr 20 12:16:49 2012 -0400

    Show status if you're only using S/MIME
    
    If you didn't have GnuPG enabled, you wouldn't see S/MIME status
    messages.

diff --git a/share/html/Ticket/Elements/ShowTransactionAttachments b/share/html/Ticket/Elements/ShowTransactionAttachments
index 4b33230..8aaf3b8 100644
--- a/share/html/Ticket/Elements/ShowTransactionAttachments
+++ b/share/html/Ticket/Elements/ShowTransactionAttachments
@@ -50,7 +50,7 @@
 # For each of these attachments
 foreach my $message ( grep $_->__Value('Parent') == $Parent, @$Attachments ) {
 
-    if (RT->Config->Get('GnuPG')->{'Enable'}) {
+    if (RT::Crypt->EnabledProtocols) {
         $m->comp( 'ShowCryptStatus', Attachment => $message, WarnUnsigned => $WarnUnsigned );
     }
 

commit e7c0d0d1a65f2861f996122720b2d04756ebb4d1
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Fri Apr 20 12:17:18 2012 -0400

    Switch the label because there can be S/MIME messages
    
    I don't know enough about the structure of @messages to know what
    *should* be in the list in this spot, but it probably isn't one of the
    X-RT-SMIME-Status headers since the GnuPG code must return just a plain
    string.
    
    That header is also unfortunately being squished in the DB (losing
    newlines) so we don't parse it back out for display properly.

diff --git a/share/html/Ticket/Elements/ShowCryptStatus b/share/html/Ticket/Elements/ShowCryptStatus
index 605b25d..308028e 100644
--- a/share/html/Ticket/Elements/ShowCryptStatus
+++ b/share/html/Ticket/Elements/ShowCryptStatus
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <table class="crypt-runs">
-<tr><td align="right" class="labeltop" rowspan="<% scalar @messages %>">GnuPG:</td>
+<tr><td align="right" class="labeltop" rowspan="<% scalar @messages %>">Encryption:</td>
 <td><% shift @messages %></td></tr>
 
 % foreach my $msg( @messages ) {

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


More information about the Rt-commit mailing list