Name
SPVM::Mozilla::CA - Mozilla's CA cert bundle in PEM format
Description
Mozilla::CA class in SPVM has methods to get Mozilla's CA cert bundle in PEM format.
Usage
use Mozilla::CA;
my $ssl_ca = Mozilla::CA->SSL_ca;
Class Methods
static method SSL_ca : string ();
Returns the content of the Mozilla's CA cert bundle PEM file.
The return value is the same as the content of Mozilla::CA#SSL_ca_file method of the version 20240924.
Repository
Porting
This class is Perl's Mozilla::CA porting to SPVM.
FAQ
Why is there no SSL_ca_file method?
SPVM programming language does not have the ability to bundle files.
If you want to output it to a file, you need to use a temporary file.
my $ssl_ca = Mozilla::CA->SSL_ca;
my $tmp_dir = File::Temp->newdir;
my $ssl_ca_file = "$tmp_dir/cacert.pem";
my $fh = IO->open(">", $ssl_ca_file);
$fh->write($ssl_ca);
$fh->close;
See also File::Temp and IO.
Author
Yuki Kimoto kimoto.yuki@gmail.com
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License