mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
extend templates
- they now contain the not-well-defined information
This commit is contained in:
parent
45ccf91a98
commit
205fa72305
@ -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() +
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
BIN
misc/CA.xca
BIN
misc/CA.xca
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user