1VOMS::Lite::PEMHelper(3U)ser Contributed Perl DocumentatiVoOnMS::Lite::PEMHelper(3)
2
3
4
6 VOMS::Lite::PEMHelper - Perl extension for decoding and encoding PEM
7 X.509 certificates and keys.
8
10 use VOMS::Lite::PEMHelper qw( writeAC encodeCert encodeAC readAC readCert decodeCert writeCertKey readPrivateKey writeCert writeKey);
11
12 # write DER AC $data as a PEM AC to file $file
13 writeAC($file,$data);
14
15 # encode DER Certificate $data as a PEM Certificate
16 $cert=encodeCert($data);
17
18 # encode DER AC $data as a PEM AC
19 $ac=encodeAC($data);
20
21 # read PEM AC in file $file and return DER AC
22 $data=readAC($file);
23
24 # read PEM Certificates in file $file and return DER Certificates
25 # in array
26 @certs=readCert($file);
27
28 # read PEM Certificates in file $file and return the first as a DER
29 # Certificate
30 $cert=readCert($file);
31
32 # takes a string and/or array of PEMs followsd by a type as arguments
33 # and decodes them into an array of DERs
34 @DERs=decodeCert(@PEMs,"CERTIFICATE");
35
36 # take DER certificate, private key and (optionally) a chain of
37 # signers and write them in PEM format to file $file
38 writeCert($file, $cert);
39
40 # take DERprivate key and write it in PEM format to file $file,
41 # encrypting with $password. If $password is undefined it will prompt
42 # for a password, if password is "" no encryption will be used.
43 writeKey($file, $privateKey, $password);
44
45 # take DER certificate, private key and (optionally) a chain of
46 # signers and write them in PEM format to file $file
47 writeCertKey($file, $cert, $privateKey, @chain);
48
49 # read in a PEM private key, prompt for a password if encrypted and
50 # return unencrypted DER private key.
51 $key=readPrivateKey($file);
52
54 VOMS::Lite::PEMHelper is primarily for internal use. But frankly I
55 don't mind if you use this package directly :-)
56
57 EXPORT
58 None by default.
59
60 By EXPORT_OK the following functions:
61 writeAC
62 encodeAC
63 readAC
64 readCert
65 decodeCert
66 writeCertKey
67 readPrivateKey
68 writeCert
69 writeKey
70
72 RFC 1421 RFC 3447
73
74 This module was originally designed for the SHEBANGS project at The
75 University of Manchester.
76 http://www.mc.manchester.ac.uk/projects/shebangs/ now
77 http://www.rcs.manchester.ac.uk/research/shebangs/
78
79 Mailing list, shebangs@listserv.manchester.ac.uk
80
81 Mailing list, voms-lite@listserv.manchester.ac.uk
82
84 Mike Jones <mike.jones@manchester.ac.uk>
85
87 Copyright (C) 2006 by Mike Jones
88
89 This library is free software; you can redistribute it and/or modify it
90 under the same terms as Perl itself, either Perl version 5.8.3 or, at
91 your option, any later version of Perl 5 you may have available.
92
93
94
95perl v5.12.3 2011-03-17 VOMS::Lite::PEMHelper(3)