I'm looking to do something, but I'm not sure it's even possible. Maybe someone
can steer me in the right direction.
Let's say that I have a copy of apache running on my server. I also have a
brand new SSL certificate that was signed by a CA. I'd like to write some code
to programmatically
This seems about 180deg from normal. Install Apache with mod_ssl.
Start it without invoking SSL .. if you get a certificate, you'll want
to hand-walk it into the right place, chown it to root, and make it
perm'd to 0400 anyway .. then a quick graceful stop and startssl ..
*poof*, Bob's yer unc