Generate an optimal intermediate SSL certificate chain