Fix seg-fault in case of viewing details of a Crl with unknown issuer

Additionally set the toolTip with the internal name
of the revoked certificate for all columns

Thanks to Patrick Monnerat <Patrick.Monnerat@datasphere.ch>
This commit is contained in:
Christian Hohnstaedt 2015-05-20 12:42:01 +02:00
parent 248367cf20
commit 812d6fea03

View File

@ -10,7 +10,7 @@
#include "lib/asn1int.h"
#include "lib/pki_x509.h"
enum revCol { Cnumber, Cserial, Cdate, Creason, CiDate };
enum revCol { Cnumber, Cserial, Cdate, Creason, CiDate, Cmax };
class revListItem : public QTreeWidgetItem
{
@ -41,10 +41,11 @@ static void addRevItem(QTreeWidget *certList, const x509rev &revit,
revListItem *current;
pki_x509 *rev;
a1time a;
rev = iss->getBySerial(revit.getSerial());
rev = iss ? iss->getBySerial(revit.getSerial()) : NULL;
current = new revListItem(certList);
if (rev != NULL) {
current->setToolTip(Cserial, rev->getIntName() );
for (int i = 0; i < Cmax; i++)
current->setToolTip(i, rev->getIntName());
}
current->setText(Cnumber, QString("%1").arg(no));
current->setText(Cserial, revit.getSerial().toHex());