diff --git a/doc/rst/certificate-input.rst b/doc/rst/certificate-input.rst index c6250e26..60e112cf 100644 --- a/doc/rst/certificate-input.rst +++ b/doc/rst/certificate-input.rst @@ -147,7 +147,10 @@ Subject Alternative Name ........................ The subject alternative name accepts a special entry *DNS:copycn*. -This will copy the *commonName* entry frome th subject as DNS entry. +This will copy all *commonName* entries from the subject as DNS entries. + +Together with the issuer alternative name it accepts the special entry *UPN:* +as short form of *otherName:msUPN;UTF8:* .. index:: wizard_advanced (wizard_advanced) diff --git a/lib/pki_temp.cpp b/lib/pki_temp.cpp index 2dfab297..cd73ea1b 100644 --- a/lib/pki_temp.cpp +++ b/lib/pki_temp.cpp @@ -192,6 +192,15 @@ void pki_temp::fromExtList(extList *el, int nid, const char *item) { QString target; el->genConf(nid, &target, &adv_ext); + if (nid == NID_subject_alt_name || nid == NID_issuer_alt_name) { + QStringList sl = target.split(","); + for (int i=0; i 0) etext.replace(QString("DNS:copycn"), new_san.join(",")); } + if (nid == NID_subject_alt_name || nid == NID_issuer_alt_name) { + QStringList sl = etext.split(","); + for (int i=0; i