Ssl – Mixed Content and SSL Sites / Protocol Relative URLs

apache-2.2httpsssl

I have a site that was all HTTP until recently, when it was requested that we add an SSL cert because there was a concern about MIM attacks with a login applet on the home page. I bought the cert, but realized that there are a lot of protocol specific links in the HTML. I know using protocol relative links is one suggested technique, but that means every one of my sites which I link to for a JS include or image will need a cert as well, right? I assume a wildcard cert might be useful if every include was from the same domain, but I have multiple domains, and the includes span across several of them, so I can't just have CN=*.mydomain.com

How do I handle this? RHEL 6, Apache 2.2.15 (RHEL backported version), SNI is enabled, mod_ssl, etc.

Best Answer

All content needs to be served through HTTPS to avoid warnings. What good would SSL do if an attacker could still do a MITM attack and alter say, the jquery js you are loading? They could still change everything through javascript.

So your options are:

  • Move/copy everything to the same domain. By moving the files, or reverse proxy, or other tricks.

  • Get seperate SSL certs for each domain (which also often means seperate IP addresses if they are on the same server)

  • Get a SAN (Subject Alternate Name) certificate. This allows you to have one cert that covers several specified domains and/or subdomains. How many domains depends on the provider and how much you pay. They can often be combined with wildcards to cover all subdomains.

Related Topic