Automatic SAN code for certificates does not work properly with additional SANs when the CN contains a space
When making a certificate, if there is a space in the CN the automatic code that copies the CN to a SAN fails to make a proper entry (no SAN types can contain a space). The result is a SAN array with a broken entry which generates SSL errors.
Change how SANs are generated from the CN, considering that not all CNs will produce a valid SAN. Fixes #8252