Crypt-OpenSSL-Common
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
functionality of the OpenSSL libraries.
It complements the other modules in the Crypt::OpenSSL::* hierarchy in many ways:
providing proper OpenSSL initialization, access to extended error information, etc.
For example:
use Crypt::OpenSSL::RSA;
use Crypt::OpenSSL::Common;
my $private = Crypt::OpenSSL::RSA->new_private_key($pem_encrypted_key);
With out Crypt::OpenSSL::Common, the C::O::RSA's new_private_key method can't
handle encrypted keys. Now it can handle them.
INSTALLATION
To install this module type the following:
perl Makefile.PL
make
make test
make install
lib/Crypt/OpenSSL/Common.pm view on Meta::CPAN
sub import {
load_crypto_strings();
Exporter::export_to_level(__PACKAGE__, 1, @_);
}
# A missing C::O::RSA method
sub Crypt::OpenSSL::RSA::new_from_file {
my($proto, $file) = @_;
open(my $pkfh, '<', $file) or die "Can't open key file: $!\n";
local $/ = undef;
return $proto->new_private_key(<$pkfh>);
}
require XSLoader;
XSLoader::load('Crypt::OpenSSL::Common', $VERSION);
1;
__END__
=head1 NAME
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.398 second using v1.00-cache-2.02-grep-82fe00e-cpan-2cc899e4a130 )