I need to create a range of hostnames for clients of the format (live|test).(clientname).clients.example.org (e.g. live.xyzltd.clients.example.org) which each have their own separate VirtualHost container and run over HTTPS on Apache. Due to the number of sites and the scarcity of addresses, I can't assign one IPv4 per host, nor can I use Server Name Indication (support in current libraries is almost non-existant), and the number of changes to the hostnames means Subject Alternative Name is also out.
Ideally I'd just have a certificate for *.clients.example.org, as that would in theory cover everything, but isn't permitted by RFC 2818. However, since I know that the hostnames will always be of the form * . * .clients.example.org, is it possible to create a certificate which contains multiple wildcards to achieve this? I'll be using a self-signed certificate, so it doesn't matter if this isn't something which is offered on a commercial basis, so long as it's technically possible.