diff --git a/lib/pk11_attribute.cpp b/lib/pk11_attribute.cpp index e097a65a..a8666055 100644 --- a/lib/pk11_attribute.cpp +++ b/lib/pk11_attribute.cpp @@ -141,4 +141,3 @@ void pk11_attlist::reset() attlen = 0; } - diff --git a/lib/pki_key.cpp b/lib/pki_key.cpp index 39b79ce4..ec22c0a8 100644 --- a/lib/pki_key.cpp +++ b/lib/pki_key.cpp @@ -61,7 +61,7 @@ void pki_key::autoIntName(const QString &file) void pki_key::d2i(QByteArray &ba) { EVP_PKEY *k = (EVP_PKEY*)d2i_bytearray(D2I_VOID(d2i_PUBKEY), ba); - pki_openssl_error(); + pki_openssl_error(); if (k) { if (key) EVP_PKEY_free(key); @@ -75,19 +75,19 @@ void pki_key::d2i_old(QByteArray &ba, int type) p = p1 = (const unsigned char *)ba.constData(); EVP_PKEY *k = d2i_PublicKey(type, NULL, &p1, ba.size()); - pki_openssl_error(); + pki_openssl_error(); if (k) { if (key) EVP_PKEY_free(key); key = k; } - ba = ba.mid(p1-p); + ba = ba.mid(p1-p); } QByteArray pki_key::i2d() const { - return i2d_bytearray(I2D_VOID(i2d_PUBKEY), key); + return i2d_bytearray(I2D_VOID(i2d_PUBKEY), key); } void pki_key::write_SSH2_ed25519_private(BIO *b, diff --git a/lib/pki_lookup.h b/lib/pki_lookup.h index 3cf06a62..9224b97c 100644 --- a/lib/pki_lookup.h +++ b/lib/pki_lookup.h @@ -122,7 +122,7 @@ class pki_lookup void flush() { qDeleteAll(lookup); - lookup.clear(); + lookup.clear(); } }; #endif diff --git a/lib/pki_pkcs7.cpp b/lib/pki_pkcs7.cpp index 831b5a69..72d9e95d 100644 --- a/lib/pki_pkcs7.cpp +++ b/lib/pki_pkcs7.cpp @@ -63,7 +63,7 @@ void pki_pkcs7::signBio(pki_x509 *crt, BIO *bio) signer = NULL; while (signer != NULL ) { sk_X509_push(certstack, signer->getCert()); - openssl_error(); + openssl_error(); if (signer == signer->getSigner() ) signer = NULL; else @@ -91,7 +91,7 @@ void pki_pkcs7::signCert(pki_x509 *crt, pki_x509 *contCert) BioByteArray bba; i2d_X509_bio(bba, contCert->getCert()); signBio(crt, bba); - openssl_error(); + openssl_error(); } void pki_pkcs7::writeP7(XFile &file, bool PEM) @@ -122,7 +122,7 @@ void pki_pkcs7::append_certs(PKCS7 *myp7, const QString &name) pki_openssl_error(); - if (myp7 == NULL) + if (myp7 == NULL) return; setFilename(name); diff --git a/lib/pki_temp.cpp b/lib/pki_temp.cpp index 3175d499..fd76e11d 100644 --- a/lib/pki_temp.cpp +++ b/lib/pki_temp.cpp @@ -302,7 +302,7 @@ static QString old_eKeyUse2QString(int old) { QStringList sl; - for (int i = 0; i < extkeyuse_nid.size(); i++) { + for (int i = 0; i < extkeyuse_nid.size(); i++) { if (old & (1<(q.value(0)); qDebug() << "Possibvle Issuer of" << *this << *an_issuer << an_issuer->getNotAfter(); if (!an_issuer) { - qDebug("Certificate with id %d not found", - q.value(0).toInt()); + qDebug("Certificate with id %d not found", q.value(0).toInt()); continue; } if (verify_only(an_issuer)) { @@ -331,7 +330,7 @@ void pki_x509::load_token(pkcs11 &p11, CK_OBJECT_HANDLE object) void pki_x509::d2i(QByteArray &ba) { - X509 *c = (X509*)d2i_bytearray(D2I_VOID(d2i_X509), ba); + X509 *c = (X509*)d2i_bytearray(D2I_VOID(d2i_X509), ba); if (c) { X509_free(cert); cert = c; @@ -418,10 +417,10 @@ void pki_x509::deleteFromToken() pk11_attlist pki_x509::objectAttributes() { pk11_attlist attrs; - attrs << - pk11_attr_ulong(CKA_CLASS, CKO_CERTIFICATE) << - pk11_attr_ulong(CKA_CERTIFICATE_TYPE, CKC_X_509) << - pk11_attr_data(CKA_VALUE, i2d()); + attrs << + pk11_attr_ulong(CKA_CLASS, CKO_CERTIFICATE) << + pk11_attr_ulong(CKA_CERTIFICATE_TYPE, CKC_X_509) << + pk11_attr_data(CKA_VALUE, i2d()); return attrs; } @@ -461,7 +460,7 @@ int pki_x509::renameOnToken(const slotid &slot, const QString &name) pk11_attr_data label(CKA_LABEL, name.toUtf8()); tkInfo ti = p11.tokenInfo(); if (p11.tokenLogin(ti.label(), false).isNull()) - return 0; + return 0; p11.storeAttribute(label, objs[0]); return 1; } diff --git a/lib/pki_x509req.cpp b/lib/pki_x509req.cpp index 968b9850..dad626ab 100644 --- a/lib/pki_x509req.cpp +++ b/lib/pki_x509req.cpp @@ -303,7 +303,7 @@ QString pki_x509req::getAttribute(int nid) const count = X509_ATTRIBUTE_count(att); for (int j = 0; j < count; j++) ret << asn1ToQString(X509_ATTRIBUTE_get0_type(att, j)-> - value.asn1_string); + value.asn1_string); return ret.join(", "); } diff --git a/lib/x509rev.cpp b/lib/x509rev.cpp index 4770f39b..75189777 100644 --- a/lib/x509rev.cpp +++ b/lib/x509rev.cpp @@ -258,7 +258,7 @@ bool x509revList::sqlUpdate(QVariant caId) return false; } - merged = false; + merged = false; TransCommit(); return true; } diff --git a/lib/x509v3ext.cpp b/lib/x509v3ext.cpp index 83cf9395..13dd1940 100644 --- a/lib/x509v3ext.cpp +++ b/lib/x509v3ext.cpp @@ -226,7 +226,7 @@ static const char *asn1Type2Name(int type) { #define ASN1_GEN_STR(x,y) { x,y } struct { - const char *strnam; + const char *strnam; int tag; } tags[] = { ASN1_GEN_STR("BOOL", V_ASN1_BOOLEAN), @@ -332,10 +332,10 @@ genName2conf(GENERAL_NAME *gen, QString tag, QString *single, QString *sect) arg(p[0]).arg(p[1]).arg(p[2]).arg(p[3]); return true; } else if(gen->d.ip->length == 8) { - *single = QString("IP:%1.%2.%3.%4/%5.%6.%7.%8"). - arg(p[0]).arg(p[1]).arg(p[2]).arg(p[3]). - arg(p[4]).arg(p[5]).arg(p[6]).arg(p[7]); - return true; + *single = QString("IP:%1.%2.%3.%4/%5.%6.%7.%8"). + arg(p[0]).arg(p[1]).arg(p[2]).arg(p[3]). + arg(p[4]).arg(p[5]).arg(p[6]).arg(p[7]); + return true; } else if(gen->d.ip->length == 16) { *single = "IP:" + ipv6_from_binary(gen->d.ip->data); return true; @@ -482,7 +482,7 @@ bool x509v3ext::parse_ainfo(QString *single, QString *adv) const { bool retval = true; QString sect, ret; - QString tag = OBJ_nid2sn(nid()); + QString tag = OBJ_nid2sn(nid()); QStringList sl; int i; @@ -632,11 +632,11 @@ static void gen_cpol_notice(QString tag, USERNOTICE *notice, QString *adv) QStringList sl; int i; *adv += QString("organization=%1\n"). - arg(asn1ToQString(ref->organization, true)); + arg(asn1ToQString(ref->organization, true)); for (i = 0; i < sk_ASN1_INTEGER_num(ref->noticenos); i++) { a1int num(sk_ASN1_INTEGER_value(ref->noticenos, i)); sl << num.toDec(); - } + } if (sl.size()) *adv += QString("noticeNumbers=%1\n"). arg(sl.join(", ")); @@ -661,7 +661,7 @@ static bool gen_cpol_qual_sect(QString tag, POLICYINFO *pinfo, QString *adv) for (i = 0; i < sk_POLICYQUALINFO_num(quals); i++) { POLICYQUALINFO *qualinfo = sk_POLICYQUALINFO_value(quals, i); - switch (OBJ_obj2nid(qualinfo->pqualid)) { + switch (OBJ_obj2nid(qualinfo->pqualid)) { case NID_id_qt_cps: polsect += QString("CPS.%1=%2\n").arg(i). arg(asn1ToQString(qualinfo->d.cpsuri, true)); @@ -778,7 +778,7 @@ bool x509v3ext::parse_bitstring(QString *single, QString *adv) const else if (adv) *adv = QString("%1=%2\n").arg(OBJ_nid2sn(nid())).arg(ret) +*adv; ASN1_BIT_STRING_free(bs); - return true; + return true; } bool x509v3ext::parse_sKeyId(QString *, QString *adv) const diff --git a/widgets/CertTreeView.cpp b/widgets/CertTreeView.cpp index 040c584c..881c921f 100644 --- a/widgets/CertTreeView.cpp +++ b/widgets/CertTreeView.cpp @@ -191,7 +191,7 @@ void CertTreeView::caProperties() pki_temp *templ = Store.lookupPki(tmplId); ui.temp->insertPkiItems(Store.getAll()); - ui.temp->setNullItem(tr("No template")); + ui.temp->setNullItem(tr("No template")); ui.temp->setCurrentIndex(0); if (templ) ui.temp->setCurrentPkiItem(templ); @@ -201,9 +201,9 @@ void CertTreeView::caProperties() if (dlg->exec()) { templ = ui.temp->currentPkiItem(); - tmplId = templ ? templ->getSqlItemId() : QVariant(); + tmplId = templ ? templ->getSqlItemId() : QVariant(); cert->setTemplateSqlId(tmplId); - cert->setCrlDays(ui.days->value()); + cert->setCrlDays(ui.days->value()); certs()->updateCaProperties(cert); columnsChanged(); @@ -242,5 +242,5 @@ ExportDialog *CertTreeView::exportDialog(const QModelIndexList &indexes) tr("X509 Certificates ( *.pem *.cer *.crt *.p12 *.pfx *.p7b )"), indexes, QPixmap(":certImg"), pki_export::select(x509, basemodel->exportFlags(indexes)), - "certexport"); + "certexport"); } diff --git a/widgets/KeyTreeView.cpp b/widgets/KeyTreeView.cpp index 3865c287..306d5a28 100644 --- a/widgets/KeyTreeView.cpp +++ b/widgets/KeyTreeView.cpp @@ -183,7 +183,7 @@ void KeyTreeView::toToken() } } catch (errorEx &err) { XCA_ERROR(err); - } + } delete card; } diff --git a/widgets/MW_menu.cpp b/widgets/MW_menu.cpp index a8ad890b..b52c40f4 100644 --- a/widgets/MW_menu.cpp +++ b/widgets/MW_menu.cpp @@ -98,7 +98,7 @@ void MainWindow::init_menu() update_history_menu(); connect(historyMenu, SIGNAL(triggered(QAction*)), - this, SLOT(open_database(QAction*))); + this, SLOT(open_database(QAction*))); file = menuBar()->addMenu(tr("&File")); diff --git a/widgets/MainWindow.cpp b/widgets/MainWindow.cpp index a66e0210..54193cb4 100644 --- a/widgets/MainWindow.cpp +++ b/widgets/MainWindow.cpp @@ -299,7 +299,7 @@ void MainWindow::initToken() p11.initToken(slot, pin.constUchar(), pin.size(), label); } catch (errorEx &err) { XCA_ERROR(err); - } + } } void MainWindow::changePin(bool so) @@ -315,7 +315,7 @@ void MainWindow::changePin(bool so) p11.changePin(slot, so); } catch (errorEx &err) { XCA_ERROR(err); - } + } } void MainWindow::changeSoPin() @@ -336,7 +336,7 @@ void MainWindow::initPin() p11.initPin(slot); } catch (errorEx &err) { XCA_ERROR(err); - } + } } @@ -406,7 +406,7 @@ void MainWindow::manageToken() } } catch (errorEx &err) { XCA_ERROR(err); - } + } delete card; delete cert; delete dlgi; diff --git a/widgets/MainWindow.h b/widgets/MainWindow.h index 81251737..f1b2a0d3 100644 --- a/widgets/MainWindow.h +++ b/widgets/MainWindow.h @@ -40,12 +40,11 @@ class tipMenu : public QMenu tipMenu(QString n, QWidget *w) : QMenu(n, w) {} bool event (QEvent * e) { - - if (e->type() == QEvent::ToolTip && activeAction() && - activeAction()->toolTip() != activeAction()->text()) { - const QHelpEvent *helpEvent = static_cast (e); - QToolTip::showText(helpEvent->globalPos(), - activeAction()->toolTip()); + if (e->type() == QEvent::ToolTip && activeAction() && + activeAction()->toolTip() != activeAction()->text()) { + const QHelpEvent *helpEvent = static_cast (e); + QToolTip::showText(helpEvent->globalPos(), + activeAction()->toolTip()); } else { QToolTip::hideText(); } diff --git a/widgets/NewX509.cpp b/widgets/NewX509.cpp index 1f977453..220fb31b 100644 --- a/widgets/NewX509.cpp +++ b/widgets/NewX509.cpp @@ -92,7 +92,7 @@ QList NewX509::setupExplicitInputs(NIDlist nid_list, } label->setClickText(OBJ_nid2sn(nid)); connect(label, SIGNAL(doubleClicked(QString)), - MainWindow::getResolver(), SLOT(searchOid(QString))); + MainWindow::getResolver(), SLOT(searchOid(QString))); edit = new QLineEdit(parent); setupLineEditByNid(nid, edit); edits << nameEdit(nid, edit, label); @@ -133,15 +133,15 @@ NewX509::NewX509(QWidget *w) : XcaDetail(w) extDNlist->setInfoLabel(extDNinfo); connect(extDNlist->itemDelegateForColumn(1), SIGNAL(setupLineEdit(const QString &, QLineEdit *)), - this, SLOT(setupExtDNwidget(const QString &, QLineEdit *))); + this, SLOT(setupExtDNwidget(const QString &, QLineEdit *))); connect(subAltName, SIGNAL(textChanged(const QString &)), - this, SLOT(checkSubAltName(const QString &))); + this, SLOT(checkSubAltName(const QString &))); connect(issAltName, SIGNAL(textChanged(const QString &)), - this, SLOT(checkIssAltName(const QString &))); + this, SLOT(checkIssAltName(const QString &))); connect(crlDist, SIGNAL(textChanged(const QString &)), - this, SLOT(checkCrlDist(const QString &))); + this, SLOT(checkCrlDist(const QString &))); connect(authInfAcc, SIGNAL(textChanged(const QString &)), - this, SLOT(checkAuthInfAcc(const QString &))); + this, SLOT(checkAuthInfAcc(const QString &))); if (keymodel) connect(keymodel, SIGNAL(keyDone(pki_key*)), this, SLOT(newKeyDone(pki_key*))); @@ -237,7 +237,7 @@ NewX509::NewX509(QWidget *w) : XcaDetail(w) QString tt = w->toolTip(); if (Settings["translate_dn"]) - text.swap(tooltip); + text.swap(tooltip); if (!tt.isEmpty()) tooltip = QString("%1 (%2)").arg(tt).arg(tooltip); @@ -1071,7 +1071,7 @@ int NewX509::validateExtensions(QString nconf, QString &result) el.clear(); if (fromReqCB->isChecked() && copyReqExtCB->isChecked()) { req_el = getSelectedReq()->getV3ext(); - for (int i=0; iaddV3ext(req_el[i], true)) el += req_el[i]; } @@ -1317,7 +1317,7 @@ void NewX509::accept() reject(); } return; - } + } if (hashAlgo->count() > 0 && hashAlgo->current().isInsecure()) { gotoTab(0); xcaWarningBox msg(this, tr("The currently selected hash algorithm '%1' is insecure and should not be used.").arg(hashAlgo->current().name())); diff --git a/widgets/NewX509_ext.cpp b/widgets/NewX509_ext.cpp index 3dc2f499..e44ab0cd 100644 --- a/widgets/NewX509_ext.cpp +++ b/widgets/NewX509_ext.cpp @@ -297,6 +297,6 @@ extList NewX509::getExtDuplicates() } } - } + } return el_dup; } diff --git a/widgets/PwDialog.h b/widgets/PwDialog.h index c16b7b37..d548e8ee 100644 --- a/widgets/PwDialog.h +++ b/widgets/PwDialog.h @@ -40,6 +40,6 @@ class PwDialog: public QDialog, public Ui::PwDialog class PwDialogUI: public PwDialogUI_i { enum open_result execute(pass_info *p, Passwd *passwd, - bool write = false, bool abort = false); + bool write = false, bool abort = false); }; #endif diff --git a/widgets/RevocationList.cpp b/widgets/RevocationList.cpp index 48bbabad..346ae2c6 100644 --- a/widgets/RevocationList.cpp +++ b/widgets/RevocationList.cpp @@ -131,7 +131,7 @@ const x509revList &RevocationList::getRevList() void RevocationList::on_addRev_clicked() { Revocation *revoke = new Revocation(QModelIndexList(), this); - if (revoke->exec()) { + if (revoke->exec()) { x509rev revit = revoke->getRevocation(); revList << revit; addRevItem(certList, revit, revList.size(), issuer); @@ -150,8 +150,8 @@ void RevocationList::on_delRev_clicked() certList->takeTopLevelItem(idx); rev.setSerial(a1int(current->text(Cserial))); idx = revList.indexOf(rev); - if (idx != -1) - revList.takeAt(idx); + if (idx != -1) + revList.takeAt(idx); } void RevocationList::on_editRev_clicked() @@ -169,14 +169,14 @@ void RevocationList::on_certList_itemDoubleClicked(QTreeWidgetItem *current) rev.setSerial(a1int(current->text(Cserial))); idx = revList.indexOf(rev); - if (idx == -1) + if (idx == -1) return; rev = revList[idx]; Revocation *revoke = new Revocation(QModelIndexList(), this); revoke->setRevocation(rev); - if (revoke->exec()) { + if (revoke->exec()) { a1time a1 = rev.getDate(); rev = revoke->getRevocation(); rev.setDate(a1); diff --git a/widgets/TempTreeView.cpp b/widgets/TempTreeView.cpp index f4457da6..0b61cafb 100644 --- a/widgets/TempTreeView.cpp +++ b/widgets/TempTreeView.cpp @@ -125,5 +125,5 @@ ExportDialog *TempTreeView::exportDialog(const QModelIndexList &indexes) tr("XCA Templates ( *.xca )"), indexes, QPixmap(":tempImg"), pki_export::select(tmpl, basemodel->exportFlags(indexes)), - "templateexport"); + "templateexport"); } diff --git a/widgets/XcaProxyModel.cpp b/widgets/XcaProxyModel.cpp index f7bd342d..e4c30d35 100644 --- a/widgets/XcaProxyModel.cpp +++ b/widgets/XcaProxyModel.cpp @@ -49,7 +49,7 @@ bool XcaProxyModel::lessThan(const QModelIndex &left, } bool XcaProxyModel::filterAcceptsRow(int sourceRow, - const QModelIndex &sourceParent) const + const QModelIndex &sourceParent) const { if (!sourceModel()) return false; diff --git a/widgets/XcaTreeView.cpp b/widgets/XcaTreeView.cpp index a9ffc36b..16aabf01 100644 --- a/widgets/XcaTreeView.cpp +++ b/widgets/XcaTreeView.cpp @@ -460,7 +460,7 @@ void XcaTreeView::contextMenu(QContextMenuEvent *e, QMenu *parent, int col) } if (!shown) allHeaders[0]->show = true; - delete menu; + delete menu; delete parent; showHideSections(); } diff --git a/widgets/kvView.h b/widgets/kvView.h index 4f0a883d..c96df50a 100644 --- a/widgets/kvView.h +++ b/widgets/kvView.h @@ -109,7 +109,7 @@ public: } QVariant data(const QModelIndex &index, int role) const; QVariant headerData(int section, Qt::Orientation orientation, - int role) const; + int role) const; bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()); bool removeRows(int row, int count, diff --git a/widgets/v3ext.cpp b/widgets/v3ext.cpp index 925338b5..cf8f18d0 100644 --- a/widgets/v3ext.cpp +++ b/widgets/v3ext.cpp @@ -82,7 +82,7 @@ void v3ext::setupLineEdit(const QString &s, QLineEdit *l) } else if (s == "URI") { tt = tr("A uniform resource indicator"); QRegularExpression rx("[a-z][a-z0-9\\.\\+\\-]*://.*"); - v = new QRegularExpressionValidator(rx, this); + v = new QRegularExpressionValidator(rx, this); } else if (s == "DNS") { if (nid == NID_subject_alt_name) tt = tr("A DNS domain name or 'copycn'"); @@ -100,7 +100,7 @@ void v3ext::setupLineEdit(const QString &s, QLineEdit *l) l->setText(QString("copy")); l->setReadOnly(true); QRegularExpression rx("copy"); - v = new QRegularExpressionValidator(rx, this); + v = new QRegularExpressionValidator(rx, this); } l->setToolTip(tt); l->setValidator(v);