diff --git a/lib/pki_temp.cpp b/lib/pki_temp.cpp index b813a98c..e5c10794 100644 --- a/lib/pki_temp.cpp +++ b/lib/pki_temp.cpp @@ -49,13 +49,14 @@ pki_temp::pki_temp(const pki_temp *pk) keyUse=pk->keyUse; eKeyUse=pk->eKeyUse; adv_ext=pk->adv_ext; + noWellDefined=pk->noWellDefined; } pki_temp::pki_temp(const QString d) :pki_base(d) { class_name = "pki_temp"; - dataVersion=3; + dataVersion=4; pkiType=tmpl; cols=2; @@ -85,6 +86,7 @@ pki_temp::pki_temp(const QString d) keyUse=0; eKeyUse=0; adv_ext=""; + noWellDefined=false; } @@ -130,6 +132,8 @@ void pki_temp::fromData(const unsigned char *p, int size, int version) validMidn=db::boolFromData(&p1); if (version>2) adv_ext=db::stringFromData(&p1); + if (version>3) + noWellDefined=db::boolFromData(&p1); if (p1-p != size) { my_error(tr("Wrong Size of template: ") + getIntName()); } @@ -172,7 +176,7 @@ unsigned char *pki_temp::toData(int *size) db::stringToData(&p1, certPol); db::boolToData(&p1, validMidn); db::stringToData(&p1, adv_ext); - + db::boolToData(&p1, noWellDefined); *size = p1-p; return p; } @@ -256,7 +260,7 @@ pki_temp::~pki_temp() int pki_temp::dataSize() { - int s = 9 * sizeof(int) + 8 * sizeof(char) + + int s = 9 * sizeof(int) + 9 * sizeof(char) + xname.derSize() + ( subAltName.length() + issAltName.length() + diff --git a/lib/pki_temp.h b/lib/pki_temp.h index 70539c24..c9dcaec7 100644 --- a/lib/pki_temp.h +++ b/lib/pki_temp.h @@ -23,7 +23,8 @@ class pki_temp: public pki_base QString nsComment, nsBaseUrl, nsRevocationUrl, nsCARevocationUrl, nsRenewalUrl, nsCaPolicyUrl, nsSslServerName, destination, adv_ext; - bool bcCrit, keyUseCrit, eKeyUseCrit, subKey, authKey, validMidn; + bool bcCrit, keyUseCrit, eKeyUseCrit, subKey, authKey, + validMidn, noWellDefined; int nsCertType, pathLen, keyUse, eKeyUse, ca; int validN, validM; diff --git a/misc/CA.xca b/misc/CA.xca index 718a0410..9b53b06e 100644 Binary files a/misc/CA.xca and b/misc/CA.xca differ diff --git a/misc/HTTPS_client.xca b/misc/HTTPS_client.xca index afbc19d5..16e3925d 100644 Binary files a/misc/HTTPS_client.xca and b/misc/HTTPS_client.xca differ diff --git a/misc/HTTPS_server.xca b/misc/HTTPS_server.xca index 5b91338a..e7d258f8 100644 Binary files a/misc/HTTPS_server.xca and b/misc/HTTPS_server.xca differ diff --git a/widgets/NewX509.cpp b/widgets/NewX509.cpp index 5bcc9521..5d8ebc91 100644 --- a/widgets/NewX509.cpp +++ b/widgets/NewX509.cpp @@ -303,6 +303,7 @@ void NewX509::fromTemplate(pki_temp *temp) basicPath->setText(QString::number(temp->pathLen)); } nconf_data->document()->setPlainText(temp->adv_ext); + noWellDefinedExpDate->setChecked(temp->noWellDefined); notBefore->setNow(); on_applyTime_clicked(); } @@ -340,6 +341,7 @@ void NewX509::toTemplate(pki_temp *temp) } else { temp->adv_ext = nconf_data->toPlainText(); } + temp->noWellDefined = noWellDefinedExpDate->isChecked(); } void NewX509::on_fromReqCB_clicked()