Exemplo n.º 1
0
QVariant pki_x509req::getIcon(dbheader *hd)
{
	int pixnum = -1;
	pki_key *k;

	switch (hd->id) {
	case HD_internal_name:
		pixnum = 0;
		k = getRefKey();
		if (k && k->isPrivKey())
			pixnum = 1;
		if (spki != NULL)
			 pixnum = 2;
		break;
	case HD_req_signed:
		if (done)
			pixnum = 3;
		break;
	}
	if (pixnum == -1)
		return QVariant();
	return QVariant(*icon[pixnum]);
}
Exemplo n.º 2
0
bool pki_x509super::hasPrivKey() const
{
	pki_key *k = getRefKey();
	return k && k->isPrivKey();
}