Separate the internal name from distinguished name

This commit is contained in:
Christian Hohnstaedt 2018-06-21 22:32:14 +02:00
parent 15d33fdcfc
commit 5703ad855a
3 changed files with 23 additions and 24 deletions

View File

@ -341,6 +341,24 @@
<string>Subject</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Internal Name</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="description">
<property name="toolTip">
<string>This name is only used internally and does not appear in the resulting certificate</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="distNameBox">
<property name="toolTip">
@ -353,13 +371,6 @@
<item>
<widget class="QWidget" name="dnWidget" native="true"/>
</item>
<item>
<widget class="Line" name="Line1_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
@ -423,7 +434,7 @@
<property name="title">
<string>Private key</string>
</property>
<layout class="QHBoxLayout">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="itemComboKey" name="keyList">
<property name="sizePolicy">
@ -813,8 +824,7 @@
</widget>
</item>
<item row="3" column="2">
<widget class="QComboBox" name="aiaOid">
</widget>
<widget class="QComboBox" name="aiaOid"/>
</item>
<item row="3" column="3">
<widget class="QLineEdit" name="authInfAcc">

View File

@ -47,7 +47,6 @@ void NewX509::setupExplicitDN(NIDlist my_dn_nid)
QGridLayout *dnLayout = dynamic_cast<QGridLayout *>(dnWidget->layout());
if (dnLayout) {
QLayoutItem *child;
dnLayout->removeWidget(description);
while ((child = dnLayout->takeAt(0))) {
delete child->widget();
delete child;
@ -57,17 +56,9 @@ void NewX509::setupExplicitDN(NIDlist my_dn_nid)
dnLayout->setAlignment(Qt::AlignTop);
dnLayout->setSpacing(6);
dnLayout->setMargin(0);
description = new QLineEdit(dnWidget);
description->setToolTip(tr("This name is only used internally and does not appear in the resulting certificate"));
}
int n = 1, col = 0;
QLabel *label = new QLabel(dnWidget);
label->setText(tr("Internal name"));
int n = 0, col = 0;
dnLayout->addWidget(label, 0, 0);
dnLayout->addWidget(description, 0, 1);
QWidget::setTabOrder(description, extDNlist);
QWidget *old = description;
expl_dn_nid = my_dn_nid + expl_dn_nid;
@ -99,8 +90,8 @@ void NewX509::setupExplicitDN(NIDlist my_dn_nid)
qDebug() << "addWidget" << OBJ_nid2sn(nid) << n << col;
n++;
if (n > expl_dn_nid.size()/2 && col == 0) {
col = 2;
n = expl_dn_nid.size() & 1 ? 0 : 1;
col += 2;
n = 0;
}
QWidget::setTabOrder(old, edit);
old = edit;
@ -190,7 +181,6 @@ NewX509::NewX509(QWidget *parent)
X509V3_set_ctx_nodb(&ext_ctx);
// Setup dnWidget
description = NULL;
setupExplicitDN(NIDlist());
// Setup Request Attributes

View File

@ -69,7 +69,6 @@ class NewX509: public QDialog, public Ui::NewX509
void setupExplicitDN(NIDlist my_dn_nid);
public:
QLineEdit *description;
NewX509(QWidget *parent);
virtual ~NewX509();
void initCtx();