OpenVPN: Extract the CN correctly and remain compatible with incorrectly saved CNs
This addresses Bugzilla issue #10552
The regex that was used to extract the CN from the certificate subject extracted
everything after the 'CN=' part which included possible other attributes in
the subject, e.g. an emailAddress. This commit does mainly fix the regex.
But since the same issue occurred when client certificates were saved, some
compatibility code had to be added to still support previously and incorrectly
saved certificates.