Creating combined SSL certificate from cPanel generated individual sub-domains
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?
[CODE=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);
Thanks
Thanks
-
Hello again! Wildcard certificates renewals via 3rd party providers would require removing the old certificate and replacing it with the new certificate details, which is not handled automatically. If the certificate was purchased via the cPanel store, the process is still the same but handled automatically. You can enable the cPanel Store in WHM " Market " Market Provider Manager. Then you can purchase a wildcard certificate for the domain from within the cPanel account using the SSL/TLS interface. Additionally, I wanted to mention a free wildcard SSL option available, but it does have a few caveats. You can find more on the free wildcard SSLs here: 0 -
Thanks, I didn't want to have to purchase the certificate, will look into the Lets Encrypt link, cheers! 0
Please sign in to leave a comment.
Comments
4 comments