3
* Copyright (C) 2001 - 2007 Christian Hohnstaedt.
11
#include <openssl/err.h>
13
#include <qlistview.h>
17
class pki_base : public QObject
22
static int pki_counter;
25
const char *class_name;
28
enum pki_type pkiType;
32
void my_error(const QString myerr) const;
33
void check_oom(const void *ptr) const;
34
void fopen_error(const QString fname);
37
static bool ign_openssl_error();
38
QList<pki_base*> childItems;
39
pki_base(const QString d = "", pki_base *p = NULL);
40
virtual void fload(const QString) {};
41
virtual void writeDefault(const QString){};
42
static int get_pki_counter(void);
43
virtual void fromData(const unsigned char *, db_header_t *){};
44
virtual void oldFromData(unsigned char *p, int size);
45
virtual unsigned char *toData(int *) { return NULL; }
46
virtual bool compare(pki_base *) { return false; };
48
QString getIntName() const;
49
QString getUnderlinedName() const;
50
void setIntName(const QString &d);
51
QString getClassName();
52
static QString rmslashdot(const QString &fname);
54
void openssl_error(const QString myerr = "") const;
56
enum pki_type getType();
57
void setParent(pki_base *p);
58
virtual pki_base *getParent();
59
pki_base *child(int row);
60
void append(pki_base *item);
61
void insert(int row, pki_base *item);
64
pki_base *iterate(pki_base *pki = NULL);
65
void takeChild(pki_base *pki);
66
pki_base *takeFirst();
68
virtual QVariant column_data(int col);
69
virtual QVariant getIcon();
70
const char *className() { return class_name; };
71
uint32_t intFromData(const unsigned char **p);
72
virtual void fromPEM_BIO(BIO *, QString) {};