Hi,
I've been using the below method to create CA bundle certificate from a cpanel generated subdomain.
What I'd like to know, is how I create a single key and single bundle file that covers multiple subdomains?
Thanks
I've been using the below method to create CA bundle certificate from a cpanel generated subdomain.
What I'd like to know, is how I create a single key and single bundle file that covers multiple subdomains?
Perl:
my $output = `uapi --user=username SSL fetch_cert_info id=$certname 2>/dev/null`;
my $yaml = YAML::Tiny->read_string($output);
my $fh;
print "Updating Key: $main_key from [$cert]\n";
open($fh, ">$main_key") or die("Can't open for write $main_key, $!");
print $fh $yaml->[0]->{result}->{data}->{key}."\n";
close($fh);
print "Updating Bundle Key: $bundle_key\n";
open($fh, ">$bundle_key") or die("Can't open for write $bundle_key, $!");
print $fh $yaml->[0]->{result}->{data}->{key}."\n";
print $fh $yaml->[0]->{result}->{data}->{certificate}."\n";
print $fh $yaml->[0]->{result}->{data}->{cabundle}."\n";
close($fh);