[Rt-commit] r9173 - in rtir/branches/2.3-EXPERIMENTAL: .

sartak at bestpractical.com sartak at bestpractical.com
Thu Sep 27 17:15:51 EDT 2007


Author: sartak
Date: Thu Sep 27 17:15:50 2007
New Revision: 9173

Modified:
   rtir/branches/2.3-EXPERIMENTAL/   (props changed)
   rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Create.html
   rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Update.html

Log:
 r43197 at onn:  sartak | 2007-09-27 17:15:41 -0400
 Add DrySign checks


Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Create.html
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Create.html	(original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Create.html	Thu Sep 27 17:15:50 2007
@@ -69,6 +69,10 @@
 
 <a name="top"></a>
 
+% if ($cannot_sign) {
+<& /Elements/GnuPGSignIssues &>
+% }
+
 <& /Elements/GnuPGKeyIssues, Issues => \@gnupg_keys_issues &>
 
 <&| /Widgets/TitleBox, contentbg => "#cccccc", title => $Title &>
@@ -405,6 +409,15 @@
 
 push @results, $m->comp( 'SELF:ProcessAttachments', %ARGS );
 
+# check to see if we have a good passphrase
+my $cannot_sign = 0;
+if ( $ARGS{'Create'} && $ARGS{'Sign'} ) {
+    if (!RT::Crypt::GnuPG::DrySign($QueueObj->CorrespondAddress, "x")) {
+        $cannot_sign = 1;
+        $checks_failure = 1;
+    }
+}
+
 my @gnupg_keys_issues;
 if ( $ARGS{'Create'} && $ARGS{'Encrypt'} ) {
 

Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Update.html
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Update.html	(original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Update.html	Thu Sep 27 17:15:50 2007
@@ -48,6 +48,10 @@
 %   }
 % }
 
+% if ($cannot_sign) {
+<& /Elements/GnuPGSignIssues &>
+% }
+
 <& /Elements/GnuPGKeyIssues, Issues => \@gnupg_keys_issues &>
 
 <table>
@@ -173,6 +177,18 @@
 
 my $checks_failure;
 
+# check to see if we have a good passphrase
+my $cannot_sign = 0;
+if ( $ARGS{'SubmitTicket'} && $ARGS{'Sign'} ) {
+    my $address = $ARGS{'UpdateType'} eq "private"
+                ? $Ticket->QueueObj->CommentAddress
+                : $Ticket->QueueObj->CorrespondAddress;
+    if (!RT::Crypt::GnuPG::DrySign($address, "x")) {
+        $cannot_sign = 1;
+        $checks_failure = 1;
+    }
+}
+
 my @gnupg_keys_issues;
 if ( $ARGS{'SubmitTicket'} && $ARGS{'Encrypt'} ) {
 


More information about the Rt-commit mailing list