1Web::ID::Certificate(3)User Contributed Perl DocumentatioWneb::ID::Certificate(3)
2
3
4
6 Web::ID::Certificate - an x509 certificate
7
9 my $cert = Web::ID::Certificate->new(pem => $pem_encoded_x509);
10 foreach (@{ $cert->subject_alt_names })
11 {
12 say "SAN: ", $_->type, " = ", $_->value;
13 }
14
16 Constructor
17 "new"
18 Standard Moose-style constructor.
19
20 Attributes
21 "pem"
22 A PEM-encoded string for the certificate.
23
24 This is usually the only attribute you want to pass to the
25 constructor. Allow the others to be built automatically.
26
27 "public_key"
28 A Web::ID::RSAKey object.
29
30 "fingerprint"
31 A string identifier for the certificate. It is the lower-cased
32 hexadecimal SHA1 hash of the DER-encoded certificate.
33
34 This is not used in WebID authentication, but may be used as an
35 identifier for the certificate if you need to keep it in a cache.
36
37 "not_before"
38 DateTime object indicating when the certificate started (or will
39 start) to be valid.
40
41 "not_after"
42 DateTime object indicating when the certificate will cease (or has
43 ceased) to be valid.
44
45 "subject_alt_names"
46 An arrayref containing a list of subject alt names (Web::ID::SAN
47 objects) associated with the certificate. These are sorted in the
48 order they'll be tried for WebID authentication.
49
50 "san_factory"
51 A coderef used for building Web::ID::SAN objects. It's very
52 unlikely you need to play with this - the default is probably OK.
53 But changing this is "supported" (in so much as any of this is
54 supported).
55
56 The coderef is passed a hash (not hashref) along the lines of:
57
58 (
59 type => 'uniformResourceIdentifier',
60 value => 'http://example.com/id/alice',
61 )
62
63 Methods
64 "timely"
65 Checks "not_before" and "not_after" against the current system time
66 to indicate whether the certifixate is temporally valid. Returns a
67 boolean.
68
69 You can optionally pass it a DateTime object to use instead of the
70 current system time.
71
72 "exponent"
73 Delegated to the "public_key" attribute.
74
75 "modulus"
76 Delegated to the "public_key" attribute.
77
79 Please report any bugs to
80 <http://rt.cpan.org/Dist/Display.html?Queue=Web-ID>.
81
83 Web::ID, Web::ID::SAN, Web::ID::RSAKey.
84
85 Web::ID::Certificate::Generator - augments this class to add the
86 ability to generate new WebID certificates.
87
88 Crypt::X509 provides a pure Perl X.509 certificate parser, and is used
89 internally by this module.
90
92 Toby Inkster <tobyink@cpan.org>.
93
95 This software is copyright (c) 2012 by Toby Inkster.
96
97 This is free software; you can redistribute it and/or modify it under
98 the same terms as the Perl 5 programming language system itself.
99
101 THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
102 WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
103 MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
104
105
106
107perl v5.32.0 2020-07-28 Web::ID::Certificate(3)