1Mozilla::CA(3) User Contributed Perl Documentation Mozilla::CA(3)
2
3
4
6 Mozilla::CA - Mozilla's CA cert bundle in PEM format
7
9 use IO::Socket::SSL;
10 use Mozilla::CA;
11
12 my $host = "www.paypal.com";
13 my $client = IO::Socket::SSL->new(
14 PeerHost => "$host:443",
15 SSL_verify_mode => 0x02,
16 SSL_ca_file => Mozilla::CA::SSL_ca_file(),
17 )
18 || die "Can't connect: $@";
19
20 $client->verify_hostname($host, "http")
21 || die "hostname verification failure";
22
24 Mozilla::CA provides a copy of Mozilla's bundle of Certificate
25 Authority certificates in a form that can be consumed by modules and
26 libraries based on OpenSSL.
27
28 The module provide a single function:
29
30 SSL_ca_file()
31 Returns the absolute path to the Mozilla's CA cert bundle PEM file.
32
34 <http://curl.haxx.se/docs/caextract.html>
35
37 For the bundled Mozilla CA PEM file the following applies:
38
39 This Source Code Form is subject to the terms of the Mozilla Public
40 License, v. 2.0. If a copy of the MPL was not distributed with this
41 file, You can obtain one at http://mozilla.org/MPL/2.0/.
42
43 The Mozilla::CA distribution itself is available under the same
44 license.
45
46
47
48perl v5.38.0 2023-08-03 Mozilla::CA(3)