Permalink
Browse files

Initial commit on move from customers/ repository

  • Loading branch information...
1 parent c31f5bf commit 1cc961e374011e6b93e28002ae293718f3b5d5a3 @obra obra committed Apr 28, 2008
View
37 Changes
@@ -0,0 +1,37 @@
+Revision history for RT-Crypt-SMIME
+
+0.22
+ Use email address from the config if queue has no addresses defined.
+ Use NO_ENCRYPTION flag when sending errors.
+
+0.21
+ Add support for a key per email address.
+
+0.20
+ Fix expiration of a user's attribute we use to cache expiration
+ date of her cert. Now in all cases, even when a key's been updated
+ using API.
+
+0.19
+ Delete user's attribute with expiration date of her key when we
+ update the key.
+
+0.18
+ Use a more generic regexp for detecting smime encrypted messages.
+ Add several new messages for debugging.
+
+0.17
+ We sent messages encrypted without all recipients' keys when there
+ were problems with recipients' keys. So people who have valid keys
+ got messages they can not decrypt. Fix it
+
+0.16
+ Add $NO_ENCRYPTION
+ Use $NO_ENCRYPTION to avoid recursion during errors reporting
+
+0.15
+ Store not encrypted messages in outgoing email records
+
+0.01 - 0.14
+ Initial releases
+
View
@@ -0,0 +1,44 @@
+.cvsignore
+Changes
+etc/initialdata
+html/Callbacks/RT-Crypt-SMIME/User/Prefs.html/FormEnd
+inc/Module/Install.pm
+inc/Module/Install/Base.pm
+inc/Module/Install/Can.pm
+inc/Module/Install/Fetch.pm
+inc/Module/Install/Makefile.pm
+inc/Module/Install/Metadata.pm
+inc/Module/Install/RTx.pm
+inc/Module/Install/RTx/Factory.pm
+inc/Module/Install/Win32.pm
+inc/Module/Install/WriteAll.pm
+lib/RT/Crypt/SMIME.pm
+lib/RT/Interface/Email/Auth/SMIME.pm
+lib/RT/Interface/Email/Auth/StrictSMIME.pm
+Makefile.PL
+MANIFEST
+META.yml # Will be created by "make dist"
+patches/rt-3.6.3-adjust_mail_plugins_behavior.patch
+README
+sign_and_encrypt.pl
+t/00.load.t
+t/data/README
+t/data/simple-txt-enc.eml
+t/data/with-bin-attachment.eml
+t/data/with-text-attachment.eml
+t/pod-coverage.t
+t/pod.t
+t/smime-incoming.t
+t/smime-outgoing.t
+testkeys/ca.crt
+testkeys/ca.key
+testkeys/MailEncrypted.txt
+testkeys/MailForSend.txt
+testkeys/README
+testkeys/recipient.crt
+testkeys/recipient.csr
+testkeys/recipient.key
+testkeys/sender.csr
+testkeys/sender@example.com.crt
+testkeys/sender@example.com.key
+testkeys/sender@example.com.pem
View
@@ -0,0 +1,23 @@
+---
+abstract: An RT extension to perform S/MIME encryption and decryption for mail RT sends
+author: Jesse Vincent <jesse@bestpractical.com>
+distribution_type: module
+generated_by: Module::Install version 0.67
+license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.3.html
+ version: 1.3
+name: RT-Crypt-SMIME
+no_index:
+ directory:
+ - etc
+ - html
+ - inc
+ - t
+requires:
+ File::Temp: 0
+ Hook::LexWrap: 0
+ IPC::Run3: 0
+ String::ShellQuote: 0
+ Test::More: 0
+version: 0.22
View
@@ -0,0 +1,14 @@
+use inc::Module::Install;
+
+RTx('RT-Crypt-SMIME');
+author ('Jesse Vincent <jesse@bestpractical.com>');
+version_from ('lib/RT/Crypt/SMIME.pm');
+abstract_from('lib/RT/Crypt/SMIME.pm');
+license('perl');
+requires('Test::More');
+requires('Hook::LexWrap');
+requires('IPC::Run3');
+requires('String::ShellQuote');
+requires('File::Temp');
+
+&WriteAll;
View
51 README
@@ -0,0 +1,51 @@
+RT::Crypt::SMIME(3) User Contributed Perl Documentation RT::Crypt::SMIME(3)
+
+
+
+NNAAMMEE
+ RT::Crypt::SMIME − An RT extension to perform S/MIME encryption and
+ decryption for mail RT sends
+
+SSYYNNOOPPSSIISS
+ # In your RT_SiteConfig.pm, add the following configuration directives
+ use RT::Crypt::SMIME;
+ Set($OpenSSLPath, ’/usr/bin/openssl’); # or wherever openssl lives
+ Set($SMIMEKeys, ’/opt/rt3/etc’); # This directory should contain RT’s private keys and certificates in address.pem files
+ Set($SMIMEPasswords, { address => ’squeamish ossifrage’); # The private passphrases for RT’s private keys
+ @MailPlugins = (qw(Auth::MailFrom Auth::SMIME));
+
+DDEESSCCRRIIPPTTIIOONN
+MMEETTHHOODDSS
+AAUUTTHHOORR
+ Jesse Vincent "<jesse@bestpractical.com>"
+
+LLIICCEENNCCEE AANNDD CCOOPPYYRRIIGGHHTT
+ Copyright (c) 2006, Best Practical Solutions, LLC.
+
+ This module is free software; you can redistribute it and/or modify it
+ under the same terms as Perl itself. See perlartistic.
+
+DDIISSCCLLAAIIMMEERR OOFF WWAARRRRAANNTTYY
+ BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+ FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
+ WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
+ PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND,
+ EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
+ YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+ NECESSARY SERVICING, REPAIR, OR CORRECTION.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+ REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE
+ TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CON‐
+ SEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFT‐
+ WARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
+ INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
+ THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER
+ OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+
+
+perl v5.8.8 2008‐04‐28 RT::Crypt::SMIME(3)
View
@@ -0,0 +1,27 @@
+@CustomFields = (
+ {
+ Name => 'PublicKey',
+ Type => 'Text',
+ LookupType => 'RT::User',
+ MaxValues => 1,
+ Disabled => 0,
+ Description => 'Public Key',
+ },
+);
+
+@Templates = (
+
+ { Queue => '0',
+ Name => 'NoPublicKey', # loc
+ Description =>
+ 'What RT should send when the user has no defined public key'
+ , # loc
+ Content => q{
+You haven't defined a S/MIME public key in your RT profile yet. Until you do that,
+you will only get mail containing the subject and URL of an RT ticket.
+
+<URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id} >
+}
+ },
+
+);
@@ -0,0 +1,33 @@
+<%args>
+$UserObj => undef
+</%args>
+<%init>
+my $cfs = $UserObj->CustomFields();
+$cfs->Limit(FIELD => 'Name', VALUE => 'PublicKey');
+my $cf = $cfs->First;
+unless ( $cf && $cf->id ) {
+ $RT::Logger->error("Couldn't load 'PublicKey' user's CF");
+ return;
+}
+
+my %request = $m->request_args();
+if (my $content = $request{'SMIME-'.$cf->id. '-Values'}) {
+ $UserObj->DeleteAttribute('SMIMEKeyNotAfter');
+
+ if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System )
+ and ($content ne $UserObj->FirstCustomFieldValue($cf->id))
+ ) {
+
+ my $u = RT::User->new($RT::SystemUser);
+ $u->Load($session{'CurrentUser'}->id);
+ $u->AddCustomFieldValue(Field => $cf->id, Value => $content);
+
+ }
+}
+
+
+</%init>
+<&|/Widgets/TitleBox, title => 'S/MIME Public Key'&>
+<&/Elements/EditCustomField, Object=> $UserObj, CustomField => $cf, Cols => 80, NamePrefix=> 'SMIME-' &>
+</&>
+
Oops, something went wrong.

0 comments on commit 1cc961e

Please sign in to comment.