From ced687be5b384bbe5cb0124de0e69e641e18d550 Mon Sep 17 00:00:00 2001 From: Christian Hohnstaedt Date: Sat, 31 Jul 2010 15:19:34 +0200 Subject: [PATCH] Improve column handling right-align numeric columns and make them monospaced. Save their current state in the database. Also add column-menu to the other context menu fix minor bugs Support for "Unstructured Name" and "challange password" columns in the request-table Support for name hash as used by OpenSSL to lookup certs. As table column and as distinguished name information --- changelog | 3 ++ lib/db_base.cpp | 68 +++++++++++++++++++++++++++++++++++++++-- lib/db_base.h | 6 ++++ lib/db_crl.cpp | 5 ++- lib/db_key.cpp | 3 +- lib/db_temp.cpp | 3 +- lib/db_x509.cpp | 7 +++-- lib/db_x509req.cpp | 7 +++-- lib/db_x509super.cpp | 7 +++-- lib/headerlist.h | 6 ++++ lib/pki_base.h | 4 +++ lib/pki_crl.cpp | 5 +-- lib/pki_x509.cpp | 9 ++++-- lib/pki_x509req.cpp | 29 ++++++++++++++++-- lib/pki_x509super.cpp | 14 ++++++--- lib/x509name.cpp | 5 +++ lib/x509name.h | 1 + widgets/XcaTreeView.cpp | 44 +++++++++++++++++++++++--- widgets/XcaTreeView.h | 7 ++++- widgets/distname.cpp | 45 +++++++++++++-------------- widgets/distname.h | 8 ++--- 21 files changed, 222 insertions(+), 64 deletions(-) diff --git a/changelog b/changelog index 986c3208..f41bc12e 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,7 @@ + * Add de/selection of columns and add a lot of new possible columns + All Subject entries, the subject hash and whole name, + Certificate fingerprints, dates, CA info, CRL number * Improve CRL generation [3035294] CRLNumber, CRLReason * improve creating templates from cert - enhance parsing of CRL-DP, SAN, IAN and AuthInfoAcc diff --git a/lib/db_base.cpp b/lib/db_base.cpp index 6cbe213f..dc925524 100644 --- a/lib/db_base.cpp +++ b/lib/db_base.cpp @@ -7,6 +7,7 @@ #include "db_base.h" +#include "func.h" #include "exception.h" #include #include @@ -17,6 +18,7 @@ db_base::db_base(QString db, MainWindow *mw) :QAbstractItemModel(NULL) { + fixedHeaders= false; dbName = db; rootItem = newPKI(); mainwin = mw; @@ -67,6 +69,7 @@ void db_base::loadContainer() unsigned char *p = NULL; db_header_t head; pki_base *pki; + bool loaded = false; for (int i=0; pkitype[i] != none; i++) { mydb.first(); @@ -100,16 +103,52 @@ void db_base::loadContainer() pki = NULL; } free(p); - if (pki) + if (pki) { inToCont(pki); + loaded = true; + } next: if (mydb.next()) break; } } + if (!loaded) + fixedHeaders = false; view->columnsResize(); } +bool db_base::loadHeaderState(QHeaderView *hv) +{ + QByteArray ba; + db_header_t u_header; + db mydb(dbName); + char *p; + if (!mydb.find(setting, class_name + "_hdView")) { + if ((p = (char *)mydb.load(&u_header))) { + ba = QByteArray(p, u_header.len - sizeof(db_header_t)); + free(p); + } + if (!((XcaHeaderView*)hv)->setState(ba)) + return false; + int max = MIN(hv->count(), allHeaders.count()); + for (int i=0; ishow = !hv->isSectionHidden(i); + } + if (rootItem->childCount()) + fixedHeaders = true; + return true; + } + return false; +} + +void db_base::saveHeaderState(QHeaderView *hv) +{ + QByteArray ba = hv->saveState(); + db mydb(dbName); + mydb.set((const unsigned char *)ba.constData(), ba.size(), 1, + setting, class_name + "_hdView"); +} + void db_base::insertPKI(pki_base *pki) { QString name; @@ -409,6 +448,13 @@ QVariant db_base::data(const QModelIndex &index, int role) const return item->column_data(hd->id); case Qt::DecorationRole: return item->getIcon(hd->id); + case Qt::TextAlignmentRole: + return hd->isNumeric() ? Qt::AlignRight : Qt::AlignLeft; + case Qt::FontRole: { + if (hd->isNumeric()) + return QVariant(QFont("Monospace")); + return QVariant(QApplication::font()); + } } return QVariant(); } @@ -524,6 +570,11 @@ bool db_base::isNumericCol(int col) const } void db_base::showHeaderMenu(QContextMenuEvent *e, int sect) +{ + contextMenu(e, NULL, sect); +} + +void db_base::contextMenu(QContextMenuEvent *e, QMenu *parent, int sect) { int shown = 0; QMenu *menu = new QMenu(mainwin); @@ -535,7 +586,7 @@ void db_base::showHeaderMenu(QContextMenuEvent *e, int sect) foreach(hd, allHeaders) { if (hd->isNid()) { if (!dn) - dn = menu->addMenu(tr("Subject")); + dn = menu->addMenu(tr("Subject entries")); a = dn->addAction(hd->name); } else { a = menu->addAction(hd->name); @@ -546,8 +597,16 @@ void db_base::showHeaderMenu(QContextMenuEvent *e, int sect) a->setToolTip(hd->tooltip); hd->action = a; } - menu->exec(e->globalPos()); + + if (parent) { + parent->addMenu(menu)->setText(tr("Columns")); + parent->exec(e->globalPos()); + } else { + menu->exec(e->globalPos()); + } foreach(hd, allHeaders) { + if (!hd->action) + continue; hd->show = hd->action->isChecked(); shown += hd->show ? 1 : 0; hd->action = NULL; @@ -555,4 +614,7 @@ void db_base::showHeaderMenu(QContextMenuEvent *e, int sect) if (!shown) allHeaders[0]->show = true; delete menu; + if (parent) + delete parent; + emit updateHeader(); } diff --git a/lib/db_base.h b/lib/db_base.h index 42bbc1ac..89f5be0d 100644 --- a/lib/db_base.h +++ b/lib/db_base.h @@ -43,6 +43,7 @@ class db_base: public QAbstractItemModel QString class_name; dbheaderList allHeaders; public: + bool fixedHeaders; pki_base *rootItem; db_base(QString db, MainWindow *mw); virtual ~db_base(); @@ -83,6 +84,10 @@ class db_base: public QAbstractItemModel void showHeaderMenu(QContextMenuEvent *e, int sect); bool columnHidden(int col) const; bool isNumericCol(int col) const; + bool loadHeaderState(QHeaderView *hv); + void saveHeaderState(QHeaderView *hv); + void contextMenu(QContextMenuEvent *e, + QMenu *parent = NULL, int sect = -1); public slots: void deletePKI(); @@ -98,6 +103,7 @@ class db_base: public QAbstractItemModel signals: void connNewX509(NewX509 *dlg); void resetHeader(); + void updateHeader(); }; #endif diff --git a/lib/db_crl.cpp b/lib/db_crl.cpp index a8d469a5..51404e25 100644 --- a/lib/db_crl.cpp +++ b/lib/db_crl.cpp @@ -198,8 +198,8 @@ pki_crl *db_crl::newItem(pki_x509 *cert) } crl->setLastUpdate(dlg->lastUpdate->getDate()); crl->setNextUpdate(dlg->nextUpdate->getDate()); - cert->setCrlExpiry(dlg->nextUpdate->getDate()); crl->sign(cert->getRefKey(), dlg->hashAlgo->currentHash()); + cert->setCrlExpiry(dlg->nextUpdate->getDate()); mainwin->certs->updatePKI(cert); createSuccess(insert(crl)); } @@ -224,8 +224,7 @@ void db_crl::showContextMenu(QContextMenuEvent *e, const QModelIndex &index) menu->addAction(tr("Export"), this, SLOT(store())); menu->addAction(tr("Delete"), this, SLOT(delete_ask())); } - menu->exec(e->globalPos()); - delete menu; + contextMenu(e, menu); currentIdx = QModelIndex(); return; } diff --git a/lib/db_key.cpp b/lib/db_key.cpp index dcaf0173..2975d76c 100644 --- a/lib/db_key.cpp +++ b/lib/db_key.cpp @@ -260,8 +260,7 @@ void db_key::showContextMenu(QContextMenuEvent *e, const QModelIndex &index) this, SLOT(toToken())); } } - menu->exec(e->globalPos()); - delete menu; + contextMenu(e, menu); currentIdx = QModelIndex(); return; } diff --git a/lib/db_temp.cpp b/lib/db_temp.cpp index efea6245..e1ce74a1 100644 --- a/lib/db_temp.cpp +++ b/lib/db_temp.cpp @@ -242,8 +242,7 @@ void db_temp::showContextMenu(QContextMenuEvent *e, const QModelIndex &index) SLOT(certFromTemp())); menu->addAction(tr("Create request"), this, SLOT(reqFromTemp())); } - menu->exec(e->globalPos()); - delete menu; + contextMenu(e, menu); currentIdx = QModelIndex(); return; } diff --git a/lib/db_x509.cpp b/lib/db_x509.cpp index 2e72bf07..20c45f83 100644 --- a/lib/db_x509.cpp +++ b/lib/db_x509.cpp @@ -38,7 +38,7 @@ db_x509::db_x509(QString DBfile, MainWindow *mw) tr("not Before")) << new dbheader(HD_cert_notAfter, true, tr("Expiry date"), tr("not After")) << - new dbheader(HD_cert_trust, true, tr("Trust state")) << + new dbheader(HD_cert_trust, false,tr("Trust state")) << new dbheader(HD_cert_revokation,true, tr("Revocation")); view = mw->certView; @@ -121,6 +121,7 @@ void db_x509::changeView() return; temproot = new pki_base(); + mainwin->certView->hide(); mainwin->certView->setModel(NULL); beginRemoveRows(QModelIndex(), 0, rows -1); pki_base *pki = rootItem; @@ -147,6 +148,7 @@ void db_x509::changeView() } delete temproot; mainwin->certView->setModel(this); + mainwin->certView->show(); } void db_x509::calcEffTrust() @@ -672,8 +674,7 @@ void db_x509::showContextMenu(QContextMenuEvent *e, const QModelIndex &index) subP7->setEnabled(privkey); #endif } - menu->exec(e->globalPos()); - delete menu; + contextMenu(e, menu); currentIdx = QModelIndex(); return; } diff --git a/lib/db_x509req.cpp b/lib/db_x509req.cpp index 2a2d7f2f..350948a6 100644 --- a/lib/db_x509req.cpp +++ b/lib/db_x509req.cpp @@ -19,7 +19,9 @@ db_x509req::db_x509req(QString DBfile, MainWindow *mw) :db_x509super(DBfile, mw) { allHeaders << new dbheader(HD_req_signed, true, tr("Signed"), - tr("whether the request is already signed or not")); + tr("whether the request is already signed or not")) << + new dbheader(HD_req_unstr_name, false, tr("Unstructured name")) << + new dbheader(HD_req_chall_pass, false, tr("Challange password")); view = mw->reqView; class_name = "requests"; pkitype[0] = x509_req; @@ -185,8 +187,7 @@ void db_x509req::showContextMenu(QContextMenuEvent *e, const QModelIndex &index) expItem->setEnabled(!req->isSpki()); } - menu->exec(e->globalPos()); - delete menu; + contextMenu(e, menu); currentIdx = QModelIndex(); return; } diff --git a/lib/db_x509super.cpp b/lib/db_x509super.cpp index 443c1ec7..78bf6a7e 100644 --- a/lib/db_x509super.cpp +++ b/lib/db_x509super.cpp @@ -14,8 +14,11 @@ db_x509name::db_x509name(QString db, MainWindow *mw) :db_base(db, mw) { NIDlist dn_nid = *MainWindow::dn_nid; - allHeaders << new dbheader(HD_subject_name, false, tr("Full name"), - tr("Complete distinguished name")); + allHeaders << new dbheader(HD_subject_name, false, tr("Subject"), + tr("Complete distinguished name")) << + new dbheader(HD_subject_hash, false, tr("Subject hash"), + tr("Hash to lookup certs in directories")); + for (int i=0; i < dn_nid.count(); i++) { int nid = dn_nid[i]; allHeaders << new dbheader(nid, nid == NID_commonName); diff --git a/lib/headerlist.h b/lib/headerlist.h index 73d7be97..5a47a408 100644 --- a/lib/headerlist.h +++ b/lib/headerlist.h @@ -7,6 +7,7 @@ #define HD_undef NID_undef #define HD_internal_name -2 #define HD_subject_name -3 +#define HD_subject_hash -4 #define HD_cert_serial -10 #define HD_cert_notBefore -11 @@ -18,6 +19,8 @@ #define HD_cert_sha1fp -17 #define HD_req_signed -20 +#define HD_req_unstr_name -21 +#define HD_req_chall_pass -22 #define HD_temp_type -30 #define HD_crl_signer -40 @@ -82,6 +85,9 @@ class dbheader case HD_cert_serial: case HD_crl_revoked: case HD_crl_crlnumber: + case HD_subject_hash: + case HD_cert_md5fp: + case HD_cert_sha1fp: return true; } return false; diff --git a/lib/pki_base.h b/lib/pki_base.h index ffc90e8b..a550c40b 100644 --- a/lib/pki_base.h +++ b/lib/pki_base.h @@ -94,6 +94,10 @@ class pki_base : public QObject { return 0; }; + QByteArray i2d() + { + return QByteArray(); + } }; #endif diff --git a/lib/pki_crl.cpp b/lib/pki_crl.cpp index 45516bf2..77383caa 100644 --- a/lib/pki_crl.cpp +++ b/lib/pki_crl.cpp @@ -157,14 +157,11 @@ QByteArray pki_crl::toData() bool pki_crl::compare(pki_base *refcrl) { bool ret; - ret = X509_CRL_cmp(crl, ((pki_crl *)refcrl)->crl) == 0 && - getLastUpdate() == ((pki_crl *)refcrl)->getLastUpdate() && - getNextUpdate() == ((pki_crl *)refcrl)->getNextUpdate() ; + ret = i2d() != refcrl->i2d(); pki_openssl_error(); return ret; } - void pki_crl::addRev(const x509rev &xrev) { sk_X509_REVOKED_push(crl->crl->revoked, xrev.get()); diff --git a/lib/pki_x509.cpp b/lib/pki_x509.cpp index ccaa7232..f9462ef2 100644 --- a/lib/pki_x509.cpp +++ b/lib/pki_x509.cpp @@ -778,9 +778,9 @@ QVariant pki_x509::column_data(int id) case HD_cert_serial: return QVariant(getSerial().toHex()); case HD_cert_notBefore: - return QVariant(getNotBefore().qDateTime()); + return QVariant(getNotBefore().toSortable()); case HD_cert_notAfter: - return QVariant(getNotAfter().qDateTime()); + return QVariant(getNotAfter().toSortable()); case HD_cert_trust: return QVariant(truststatus[getTrust()]); case HD_cert_revokation: @@ -797,9 +797,12 @@ QVariant pki_x509::column_data(int id) case HD_cert_ca: { a1int len; bool ca, haslen; - if (caAndPathLen(&ca, &len, &haslen)) + if (caAndPathLen(&ca, &len, &haslen)) { if (ca && haslen) return QVariant(len.toDec()); + if (!ca) + return QVariant(tr("No")); + } return QVariant(); } } diff --git a/lib/pki_x509req.cpp b/lib/pki_x509req.cpp index e07e05a2..5e9f7b3b 100644 --- a/lib/pki_x509req.cpp +++ b/lib/pki_x509req.cpp @@ -396,11 +396,36 @@ ASN1_IA5STRING *pki_x509req::spki_challange() return NULL; } +static QString getAttribute(X509_REQ *req, int nid) +{ + int n; + n = X509_REQ_get_attr_by_NID(req, nid, -1); + if (n == -1) + return QString(); + X509_ATTRIBUTE *att = X509_REQ_get_attr(req, n); + if (!att) + return QString(); + if (att->single) + return asn1ToQString(att->value.single->value.asn1_string); + + int count = sk_ASN1_TYPE_num(att->value.set); + QStringList ret; + for (int j=0; jvalue.set, j)-> + value.asn1_string); + } + return ret.join(", "); +} + QVariant pki_x509req::column_data(int id) { switch (id) { - case HD_req_signed: - return QVariant(done ? tr("Signed") : tr("Unhandled")); + case HD_req_signed: + return QVariant(done ? tr("Signed") : tr("Unhandled")); + case HD_req_unstr_name: + return getAttribute(request, NID_pkcs9_unstructuredName); + case HD_req_chall_pass: + return getAttribute(request, NID_pkcs9_challengePassword); } return pki_x509super::column_data(id); } diff --git a/lib/pki_x509super.cpp b/lib/pki_x509super.cpp index e7e2fb9c..f32b4d79 100644 --- a/lib/pki_x509super.cpp +++ b/lib/pki_x509super.cpp @@ -61,9 +61,15 @@ void pki_x509name::autoIntName() QVariant pki_x509name::column_data(int id) { - if (id == HD_subject_name) - return QVariant(getSubject().oneLine(XN_FLAG_ONELINE)); - if (dbheader::isNid(id)) - return QVariant(getSubject().getEntryByNid(id)); + switch (id) { + case HD_subject_name: + return QVariant(getSubject().oneLine( + XN_FLAG_ONELINE & ~ASN1_STRFLGS_ESC_MSB)); + case HD_subject_hash: + return QVariant(getSubject().hash()); + default: + if (dbheader::isNid(id)) + return QVariant(getSubject().getEntryByNid(id)); + } return pki_base::column_data(id); } diff --git a/lib/x509name.cpp b/lib/x509name.cpp index 6c08fbfa..dbc5d593 100644 --- a/lib/x509name.cpp +++ b/lib/x509name.cpp @@ -127,6 +127,11 @@ QString x509name::popEntryByNid(int nid) return n; } +QString x509name::hash() const +{ + return QString("%1").arg(X509_NAME_hash(xn), 8, 16, QChar('0')); +} + QStringList x509name::entryList(int i) const { QStringList sl; diff --git a/lib/x509name.h b/lib/x509name.h index dc8f1762..1faef481 100644 --- a/lib/x509name.h +++ b/lib/x509name.h @@ -42,6 +42,7 @@ class x509name X509_NAME *get() const; QString getMostPopular() const; QString taggedValues() const; + QString hash() const; }; #endif diff --git a/widgets/XcaTreeView.cpp b/widgets/XcaTreeView.cpp index e8c7ef37..ef628334 100644 --- a/widgets/XcaTreeView.cpp +++ b/widgets/XcaTreeView.cpp @@ -31,6 +31,9 @@ XcaTreeView::XcaTreeView(QWidget *parent) proxy->setDynamicSortFilter(true); sortByColumn(0, Qt::AscendingOrder); basemodel = NULL; + connect(header(), SIGNAL(sectionHandleDoubleClicked(int)), + this, SLOT(resizeColumnToContents(int))); + header()->setClickable(true); } XcaTreeView::~XcaTreeView() @@ -38,7 +41,7 @@ XcaTreeView::~XcaTreeView() delete proxy; } -void XcaTreeView::contextMenuEvent(QContextMenuEvent * e ) +void XcaTreeView::contextMenuEvent(QContextMenuEvent * e) { if (!basemodel) return; @@ -57,22 +60,34 @@ void XcaTreeView::showHideSections() header()->showSection(i); } columnsResize(); + header()->update(); } void XcaTreeView::setModel(QAbstractItemModel *model) { - basemodel = (db_base *)model; + QByteArray ba; if (basemodel) + basemodel->saveHeaderState(header()); + + basemodel = (db_base *)model; + + if (basemodel) { connect(basemodel, SIGNAL(resetHeader()), header(), SLOT(resetMoves())); + connect(basemodel, SIGNAL(resetHeader()), + this, SLOT(columnsForceResize())); + connect(basemodel, SIGNAL(updateHeader()), + this, SLOT(showHideSections())); + basemodel->loadHeaderState(header()); + } proxy->setSourceModel(model); QTreeView::setModel(proxy); showHideSections(); } + void XcaTreeView::headerEvent(QContextMenuEvent *e, int col) { basemodel->showHeaderMenu(e, col); - showHideSections(); } QModelIndex XcaTreeView::getIndex(const QModelIndex &index) @@ -91,7 +106,7 @@ QModelIndexList XcaTreeView::getSelectedIndexes() return proxy->mapSelectionToSource(indexes).indexes(); } -void XcaTreeView::columnsResize() +void XcaTreeView::columnsForceResize() { int cnt, i; if (basemodel) { @@ -101,6 +116,12 @@ void XcaTreeView::columnsResize() } } +void XcaTreeView::columnsResize() +{ + if (basemodel && !basemodel->fixedHeaders) + columnsForceResize(); +} + XcaProxyModel::XcaProxyModel(QWidget *parent) :QSortFilterProxyModel(parent) { @@ -146,3 +167,18 @@ void XcaHeaderView::resetMoves() } } } + +bool XcaHeaderView::setState(const QByteArray &state) +{ + setting = state; + return QHeaderView::restoreState(setting); +} + +void XcaHeaderView::showEvent(QShowEvent *event) +{ + if (setting.size()) { + if (QHeaderView::restoreState(setting)) + setting.clear(); + setStretchLastSection(false); + } +} diff --git a/widgets/XcaTreeView.h b/widgets/XcaTreeView.h index e6ad59a0..f900ab30 100644 --- a/widgets/XcaTreeView.h +++ b/widgets/XcaTreeView.h @@ -19,14 +19,17 @@ class db_base; class XcaHeaderView: public QHeaderView { Q_OBJECT + QByteArray setting; + protected: + void showEvent(QShowEvent *event); public: XcaHeaderView() :QHeaderView(Qt::Horizontal) { - setStretchLastSection(true); setMovable(true); } void contextMenuEvent(QContextMenuEvent *e); + bool setState(const QByteArray &state); public slots: void resetMoves(); }; @@ -47,7 +50,9 @@ class XcaTreeView: public QTreeView QModelIndexList getSelectedIndexes(); void columnsResize(); void headerEvent(QContextMenuEvent *e, int col); + public slots: void showHideSections(); + void columnsForceResize(); }; class XcaProxyModel: public QSortFilterProxyModel diff --git a/widgets/distname.cpp b/widgets/distname.cpp index 5041837a..a026ab4f 100644 --- a/widgets/distname.cpp +++ b/widgets/distname.cpp @@ -1,6 +1,6 @@ /* vi: set sw=4 ts=4: * - * Copyright (C) 2001 - 2007 Christian Hohnstaedt. + * Copyright (C) 2001 - 2010 Christian Hohnstaedt. * * All rights reserved. */ @@ -17,24 +17,32 @@ DistName::DistName(QWidget* parent) : QWidget(parent) { - QHBoxLayout *h = new QHBoxLayout(); - QVBoxLayout *v = new QVBoxLayout(this); - QLabel *l = new QLabel(QString("RFC 2253:"), this); - lineEdit = new QLineEdit(this); - DistNameLayout = new QGridLayout(); DistNameLayout->setAlignment(Qt::AlignTop); DistNameLayout->setSpacing(6); DistNameLayout->setMargin(11); + + QGridLayout *g = new QGridLayout(); + g->setAlignment(Qt::AlignTop); + g->setSpacing(6); + g->setMargin(11); + + QVBoxLayout *v = new QVBoxLayout(this); v->setSpacing(6); v->setMargin(11); v->addLayout(DistNameLayout); - v->addLayout(h); + v->addStretch(); + v->addLayout(g); - v->setSpacing(6); - h->addWidget(l); - h->addWidget(lineEdit); - lineEdit->setReadOnly(true); + rfc2253 = new QLineEdit(this); + rfc2253->setReadOnly(true); + g->addWidget(new QLabel(QString("RFC 2253:"), this), 0, 0); + g->addWidget(rfc2253, 0, 1); + + namehash = new QLineEdit(this); + namehash->setReadOnly(true); + g->addWidget(new QLabel(QString("Hash:"), this), 1, 0); + g->addWidget(namehash, 1, 1); } void DistName::setX509name(const x509name &n) @@ -56,17 +64,8 @@ void DistName::setX509name(const x509name &n) DistNameLayout->addWidget( l1, i, 0 ); DistNameLayout->addWidget( l2, i, 1 ); } - lineEdit->setText(n.oneLine(XN_FLAG_RFC2253)); - lineEdit->setCursorPosition(0); + rfc2253->setText(n.oneLine(XN_FLAG_RFC2253)); + rfc2253->setCursorPosition(0); + namehash->setText(n.hash()); updateGeometry(); } - -DistName::~DistName() -{ - // no need to delete child widgets, Qt does it all for us -} - -void DistName::resizeEvent( QResizeEvent *e) -{ - QWidget::resizeEvent(e); -} diff --git a/widgets/distname.h b/widgets/distname.h index 7e1a65e6..bb921059 100644 --- a/widgets/distname.h +++ b/widgets/distname.h @@ -22,14 +22,12 @@ class DistName : public QWidget Q_OBJECT public: - DistName(QWidget* parent); - ~DistName(); + DistName(QWidget *parent); void setX509name(const x509name &n); protected: QGridLayout* DistNameLayout; - QLineEdit *lineEdit; - void resizeEvent( QResizeEvent *e); - + QLineEdit *rfc2253; + QLineEdit *namehash; }; #endif