mirror of
https://github.com/chris2511/xca.git
synced 2026-09-14 11:06:19 +05:00
default templates added
This commit is contained in:
parent
6b71f6615a
commit
bd97f2fea1
25
NewX509.cpp
25
NewX509.cpp
@ -153,13 +153,11 @@ NewX509::NewX509(QWidget *parent , const char *name, db_key *key, db_x509req *re
|
||||
// settings for the templates ....
|
||||
if (temps) {
|
||||
strings = temps->getDesc();
|
||||
if (strings.isEmpty()) {
|
||||
templateBox->setEnabled(false);
|
||||
}
|
||||
else {
|
||||
strings.prepend(tr("Empty Template"));
|
||||
tempList->insertStringList(strings);
|
||||
}
|
||||
strings.prepend(tr("Server Template"));
|
||||
strings.prepend(tr("Client Template"));
|
||||
strings.prepend(tr("CA Template"));
|
||||
strings.prepend(tr("Empty Template"));
|
||||
tempList->insertStringList(strings);
|
||||
}
|
||||
else {
|
||||
templateBox->setEnabled(false);
|
||||
@ -407,11 +405,22 @@ void NewX509::signerChanged()
|
||||
|
||||
void NewX509::templateChanged()
|
||||
{
|
||||
pki_temp *temp = NULL;
|
||||
int item;
|
||||
if (!appropriate(page1)) return;
|
||||
if (!tempList->isEnabled()) return;
|
||||
if ((item = tempList->currentItem())<4) {
|
||||
temp = new pki_temp("temp",item);
|
||||
if (temp) {
|
||||
fromTemplate(temp);
|
||||
CERR("using default template:"<< item);
|
||||
delete (temp);
|
||||
}
|
||||
return;
|
||||
}
|
||||
QString name = tempList->currentText();
|
||||
if (name == "" || !temps) return;
|
||||
pki_temp *temp = (pki_temp *)temps->getSelectedPKI(name.latin1());
|
||||
temp = (pki_temp *)temps->getSelectedPKI(name.latin1());
|
||||
if (!temp) return;
|
||||
CERR("CHANGING TEMPLATE");
|
||||
fromTemplate(temp);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user