VOMS::Lite::PEMHelper - Perl extension for decoding and encoding PEM X.509 certificates and keys.
use VOMS::Lite::PEMHelper qw( writeAC encodeCert encodeAC readAC readCert decodeCert writeCertKey readPrivateKey writeCert writeKey); # write DER AC $data as a PEM AC to file $file writeAC($file,$data); # encode DER Certificate $data as a PEM Certificate $cert=encodeCert($data); # encode DER AC $data as a PEM AC $ac=encodeAC($data); # read PEM AC in file $file and return DER AC $data=readAC($file); # read PEM Certificates in file $file and return DER Certificates # in array @certs=readCert($file); # read PEM Certificates in file $file and return the first as a DER # Certificate $cert=readCert($file); # takes a string and/or array of PEMs followsd by a type as arguments # and decodes them into an array of DERs @DERs=decodeCert(@PEMs,"CERTIFICATE"); # take DER certificate, private key and (optionally) a chain of # signers and write them in PEM format to file $file writeCert($file, $cert); # take DERprivate key and write it in PEM format to file $file, # encrypting with $password. If $password is undefined it will prompt # for a password, if password is "" no encryption will be used. writeKey($file, $privateKey, $password); # take DER certificate, private key and (optionally) a chain of # signers and write them in PEM format to file $file writeCertKey($file, $cert, $privateKey, @chain); # read in a PEM private key, prompt for a password if encrypted and # return unencrypted DER private key. $key=readPrivateKey($file);
VOMS::Lite::PEMHelper is primarily for internal use. But frankly I don't mind if you use this package directly :-)
None by default.
By EXPORT_OK the following functions: writeAC encodeAC readAC readCert decodeCert writeCertKey readPrivateKey writeCert writeKey
RFC 1421 RFC 3447
This module was originally designed for the SHEBANGS project at The University of Manchester. http://www.mc.manchester.ac.uk/projects/shebangs/ now http://www.rcs.manchester.ac.uk/research/shebangs/
Mailing list, shebangs@listserv.manchester.ac.uk
Mailing list, voms-lite@listserv.manchester.ac.uk
Mike Jones <mike.jones@manchester.ac.uk>
Copyright (C) 2006 by Mike Jones
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or, at your option, any later version of Perl 5 you may have available.
To install VOMS::Lite, copy and paste the appropriate command in to your terminal.
cpanm
cpanm VOMS::Lite
CPAN shell
perl -MCPAN -e shell install VOMS::Lite
For more information on module installation, please visit the detailed CPAN module installation guide.