Question about SSL Certificates

I have an Openfire server with FQDN of the form “”. There are SRV records in place that supply this server name when a user connects as "", the XMPP clients resolve this and connect to the correct server. We do not wish to have to have the clients manually set the server to “”. So far, so good. I have a SSL certificate in place for “”, which is what the XMPP spec says I should use; it states that the SSL certificate negotiation should be done using the resource as speficied by the user (in this case “” and not the actual server name “”). This seems to make most XMPP clients happy, except those that did put in the FQ server name. And, when I connect via SSL to the Openfire administrative interface it complains that the certificate is not valid (since it’s using the cert). So, I install a second certificate for, but this does not seem to solve the problem.

My questions are: What is the correct FQDN that you want to purchase a SSL certificate for? How do you avoid SSL certificate errors for XMPP and HTTPS connections? Is there a way to use different certs depending on the hostname that the connection is made with?