Fix assertion abort when no CN is present in certificate

Triggered by Windows Server 2012 Admin-Mode with MS-recommended AD CA
Certificate setup, which would cause the CN to be absent, and a single
subjectAltName to be present.
Merge pull request #1697 from zeha/fix-ssl-no-common-name-crash

Fix assertion abort when no CN is present in certificate