Crypt::Simple::SMIME - Simple SMIME Email Encryptor
use Crypt::Simple::SMIME;
my $c = new Crypt::Simple::SMIME( { 'openssl' => '/opt/openssl/bin/openssl', 'sendmail' => '/usr/sbin/sendmail' 'certificate' => '/home/bob/certificate.pem' } );
or:
my $c = new Crypt::Simple::SMIME();
$c->OpenSSLPath('/opt/openssl/bin/openssl');
$c->SendmailPath('/usr/sbin/sendmail');
$c->CertificatePath('/home/bob/certificate.pem')
$c->SendMail($from,$to,$subject,$message);
$c->Close();
$c->SignedEmailCertificate($signed_email_text)
$c->SendMail($to,$from,$subject,$message);
$c->SignedEmailCertificate($signed_email_file)
$c->Certificate($certificate_text)
After looking around for a simple way to send encrypted email to Outlook, Mozilla and Netscape email clients, the modules had requirements that required installing and/or compiling other software. This module is a simple and secure method of sending encrypted email.
No encrypted files are written to the hard drive. So there's no chance of others accessing the information. The only files stored on the hard drive is public keys/certificates
The only two requirements are the openssl binary be installed on the system and the system has Sendmail or a binary that emulates Sendmail. For example Qmail provides a binary to emulate Sendmail.
The methods described in this section are available for all Crypt::Simple::SMIME objects.
Crypt::Simple::SMIME
The new method is the constructor. The input hash can inlude the following:
openssl / Path to the openssl binary on your system (optional) sendmail / Path to the sendmail binary on your system (optional)
my $2 = new Crypt::Simple::SMIME( { 'openssl' => '/opt/openssl/bin/openssl', 'sendmail' => '/usr/sbin/sendmail' 'certificate' => '/home/bob/certificate.pem' } );
Given the from address, to address, subject and the message, encrypts and sends the message to the given address.
Cleans up after the module by deleting temporary files.
The methods described in this section allow setting and reading data.
If a the open sll binary path is passed, this accessor will set the value. It will always return the value stored.
If a the sendmail binary path is passed, this accessor will set the value. It will always return the value stored.
Accepts the text of a signed email or the path to a file that contains the email. It returns the text of a signed email.
To get a certificate from asigned email, save the message to a file and and pass the contents this routine.
Accepts the certificate contents from a variable to use to encrypt the message.
Returns true if the module encountered an error.
Returns the error message module encountered an error.
Returns the command used to encrypt the email.
This will occur if your LWP does not support SSL (i.e. https). I suggest installing the Crypt::SSLeay module.
Build methods for each type of transaction so you don't need to know UTIs and other FedEx codes. FedEx Express Ship-A-Package UTI 2016 would be called via $object->FDXE_ship();
Duane Hinkley, <duane@dhwd.com>
http://www.dhwd.com
If you have any questions, comments or suggestions please feel free to contact me.
Copyright 1995-2004, Down Home Web Design, Inc. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The latest version of this module is likely to be available from CPAN as well as:
http://www.dhwd.com/
Crypt::SSLeay, LWP::UserAgent, Business::FedEx::Constants
1;
2 POD Errors
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
'=item' outside of any '=over'
To install Crypt::Simple::SMIME, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Crypt::Simple::SMIME
CPAN shell
perl -MCPAN -e shell install Crypt::Simple::SMIME
For more information on module installation, please visit the detailed CPAN module installation guide.