VOMS-Lite
view release on metacpan or search on metacpan
- This was due to expecting a single encrypted record from server
The server's move to using vanilla OpenSSL based sockets meant
that VOMS.pm received a record with zero data before the record with
the AC or List result.
VOMS.pm can now handle multiple encrypted records per payload.
0.16 Tue Feb 28 01:48:00 2012
- Removed umask in PEMHelper.pm for Win32.* OS which doesn't do umask
- X509::Create
- Added check: does parse CA return reference to Error Array?
- Change unnecessarily strict check on dNSName and rfc822Name
- Added Explicit dependency on Crypt::DES as MacOSX required double complilation
- not sure if this will work as cannot install CPAN::Mini::Inject
- removed Umask in VOMS::Lite.pm
- Added fake DNS entry if Sys::Hostname doesn't provide a FQDN in tests
- Added some extra test info
0.17 Fri Jun 29 13:00:00 2012
- Added VOMS::Lite::SAMLHelper library in anticipation of
mainstream SAML VOMS services
- Fixed error handling in VOMS::Lite::X509::Examine for
["Unable to parse certificate"]
- Fixed CA certificate check in X509::Examine. When $CertInfoRef->{'Errors'}
author:
- Mike Jones <mike.jones@manchester.ac.uk>
license: unknown
distribution_type: module
configure_requires:
ExtUtils::MakeMaker: 0
build_requires:
ExtUtils::MakeMaker: 0
requires:
Crypt::CBC: 0
Crypt::DES: 0
Crypt::DES_EDE3: 0
Digest::MD2: 0
Digest::MD5: 0
Digest::SHA1: 0
File::Copy: 0
IO::Socket: 0
IO::Socket::SSL: 0
Math::BigInt: 0
MIME::Base64: 0
Sys::Hostname: 0
Term::ReadKey: 0
Makefile.PL view on Meta::CPAN
# List required modules and their version details:
my $RequiredModules={
Term::ReadKey => 0,
Digest::MD5 => 0,
Digest::SHA1 => 0,
# Digest::MD4 => 0,
Digest::MD2 => 0,
# Crypt::Primes => 0,
Crypt::CBC => 0,
Crypt::DES => 0,
Crypt::DES_EDE3 => 0,
# Crypt::RSA::Key => 0, #No longer needed
Math::BigInt => 0,
MIME::Base64 => 0,
# Regexp::Common => 0, #Used simpler URI Regexp (assume caller knows URI format)
File::Copy => 0,
Time::Local => 0,
IO::Socket => 0,
IO::Socket::SSL => 0, #MyProxy needs this
Sys::Hostname => 0
};
This module requires these other modules and libraries:
Math::BigInt
[ Math::BigInt::GMP ] -- if you want things to work at any reasonable speed
Term::ReadKey
Digest::MD5
Digest::SHA1
Digest::MD4
Digest::MD2
Crypt::DES_EDE3
MIME::Base64
IO::Socket
Regexp::Common -- for Target URIs in VOMS Credentials
File::Copy
Time::Local
[ DBI ] -- if using DB access to a VOMS server
Sys::Hostname
SEE ALSO
lib/VOMS/Lite/PEMHelper.pm view on Meta::CPAN
$dummy=Term::ReadKey::ReadMode('normal');
chomp $passwd;
print "\n";
}
# To encrypt or not to encrypt
if ( $passwd ne "" ) {
# Spin up the Crypto stuff
require Digest::MD5;
require Crypt::DES_EDE3;
# Make Initialisation vector
my $iv="";
while (length($iv)<8 ) {$iv.=chr((rand(255)+1));}
# Construct DES Key from password (Munge)
my $keysize=24;
my $SALT=$iv;
my $key=Digest::MD5::md5($passwd,$SALT);
while (length($key) < $keysize) { $key .= Digest::MD5::md5($key, $passwd, $SALT);}
$key=substr($key,0,$keysize);
# DES Padding Data as per RFC 1423 (not 1851 which adds message payload info)
my $pad = ( 8 - (length($pri)%8) );
my $padding=chr($pad) x $pad;
$pri.=$padding;
# Encode Data
my $DES = Crypt::DES_EDE3->new($key);
my $cyphertextout="";
while ( my $len=length($pri) ) {
my $block=substr($pri,0,8);
$pri=substr($pri,8);
$block = $SALT ^ $block;
my $cyphertext=$DES->encrypt($block);
$SALT=$cyphertext;
$cyphertextout.=$cyphertext;
}
lib/VOMS/Lite/PEMHelper.pm view on Meta::CPAN
}
# Reconstruct DES Key from password (Munge)
my $keysize=24;
$SALT=pack('H*', $SALT);
my $key=Digest::MD5::md5($passwd,$SALT);
while (length($key) < $keysize) { $key .= Digest::MD5::md5($key, $passwd, $SALT);}
$key=substr($key,0,$keysize);
# Decode Data
require Crypt::DES_EDE3;
my $DES = Crypt::DES_EDE3->new($key);
my $dataout="";
while ( my $len=length($cyphertext) ) {
my $block=substr($cyphertext,0,8);
$cyphertext=substr($cyphertext,8);
my $data=$SALT ^ $DES->decrypt($block);
$SALT=$block;
$dataout.=$data;
}
# Remove DES Padding
misc/perl-VOMS-Lite.spec view on Meta::CPAN
Release: 1%{?dist}
Summary: Perl extension for VOMS Attribute certificate creation
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/VOMS-Lite/
Source0: ftp://ftp.funet.fi/pub/CPAN/authors/id/M/MI/MIKEJ/VOMS-Lite-%{version}.tar.gz
Source1: voms.config
Patch0: unwin32.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: perl(Crypt::DES_EDE3)
BuildRequires: perl(Digest::MD2)
BuildRequires: perl(Digest::SHA1)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(IO::Socket::SSL)
BuildRequires: perl(Regexp::Common)
BuildRequires: perl(Term::ReadKey)
BuildRequires: perl(Math::BigInt::GMP)
BuildRequires: perl(Crypt::CBC)
Requires: perl(Math::BigInt::GMP)
Requires: perl(Crypt::DES_EDE3)
Requires: perl(Digest::MD2)
Requires: perl(Digest::SHA1)
Requires: perl(IO::Socket::SSL)
Requires: perl(Regexp::Common)
Requires: perl(Term::ReadKey)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
#Add a test sub package.
%{?perl_default_subpackage_tests}
( run in 0.313 second using v1.01-cache-2.11-cpan-9a3d99fc6dc )