MCPcopy Create free account
hub / github.com/chris2511/xca / Revocation

Method Revocation

widgets/RevocationList.cpp:189–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189Revocation::Revocation(QModelIndexList indexes, QWidget *w) : QDialog(w ? w : mainwin)
190{
191 setupUi(this);
192 setWindowTitle(XCA_TITLE);
193 mainwin->helpdlg->register_ctxhelp_button(this, "crlrevocation");
194
195 reason->addItems(x509rev::crlreasons());
196 invalid->setNow();
197
198 if (indexes.size() > 1) {
199 QList<a1int> serials;
200 QStringList sl;
201 serial->setText(QString("Batch revocation of %1 Certificates").
202 arg(indexes.size()));
203 foreach(QModelIndex idx, indexes) {
204 pki_x509 *cert = db_base::fromIndex<pki_x509>(idx);
205 if (cert)
206 serials << cert->getSerial();
207 }
208 std::sort(serials.begin(), serials.end());
209 foreach(a1int a, serials)
210 sl << a;
211 serial->setToolTip(sl.join("\n"));
212 serial->setEnabled(false);
213 } else if (indexes.size() == 1) {
214 pki_x509 *cert = db_base::fromIndex<pki_x509>(indexes[0]);
215 serial->setText(cert->getSerial());
216 serial->setEnabled(false);
217 } else {
218 serial->setValidator(
219 new QRegularExpressionValidator(
220 QRegularExpression("[A-Fa-f0-9]+"), serial));
221 }
222}
223
224x509rev Revocation::getRevocation()
225{

Callers

nothing calls this directly

Calls 7

addItemsMethod · 0.80
setNowMethod · 0.80
sizeMethod · 0.80
beginMethod · 0.80
QStringClass · 0.50
getSerialMethod · 0.45

Tested by

no test coverage detected