3
* Copyright (C) 2001 - 2007 Christian Hohnstaedt.
11
#include "pki_x509req.h"
12
#include "pki_pkcs7.h"
13
#include "pki_pkcs12.h"
14
#include "pki_multi.h"
15
#include "widgets/MainWindow.h"
17
load_base::load_base()
19
filter = QObject::tr("All files ( * )");
23
pki_base *load_base::loadItem(QString s)
25
pki_base *pki = newItem();
38
pki_base * load_base::newItem()
43
load_base::~load_base()
51
filter = QObject::tr("PKI Keys ( *.pem *.der *.key );;"
52
"PKCS#8 Keys ( *.p8 *.pk8 );;") + filter;
53
caption = QObject::tr("Import RSA key");
56
pki_base * load_key::newItem()
65
filter = QObject::tr("PKCS#10 CSR ( *.pem *.der *.csr );;"
66
"Netscape Request ( *.spkac *.spc );;") + filter;
67
caption = QObject::tr("Import Request");
70
pki_base * load_req::newItem()
72
return new pki_x509req();
76
load_cert::load_cert()
79
filter = QObject::tr("Certificates ( *.pem *.der *.crt *.cer );;") + filter;
80
caption = QObject::tr("Import X.509 Certificate");
83
pki_base * load_cert::newItem()
85
return new pki_x509();
88
/* PKCS#7 Certificates */
89
load_pkcs7::load_pkcs7()
92
filter = QObject::tr("PKCS#7 data ( *.p7s *.p7m *.p7b );;") + filter;
93
caption = QObject::tr("Import PKCS#7 Certificates");
96
pki_base * load_pkcs7::newItem()
98
return new pki_pkcs7();
101
/* PKCS#12 Certificates */
102
load_pkcs12::load_pkcs12()
105
filter = QObject::tr("PKCS#12 Certificates ( *.p12 *.pfx );;") + filter;
106
caption = QObject::tr("Import PKCS#12 Private Certificate");
109
pki_base * load_pkcs12::loadItem(QString s)
111
pki_base *p12 = new pki_pkcs12(s, MainWindow::passRead);
116
load_temp::load_temp()
119
filter = QObject::tr("XCA templates ( *.xca );;") + filter;
120
caption = QObject::tr("Import XCA Templates");
123
pki_base * load_temp::newItem()
125
return new pki_temp();
132
filter = QObject::tr("Revocation lists ( *.pem *.der *.crl );;") + filter;
133
caption = QObject::tr("Import Certificate Revocation List");
136
pki_base * load_crl::newItem()
138
return new pki_crl();
145
filter = QObject::tr("XCA Databases ( *.xdb );;") + filter;
146
caption = QObject::tr("Open XCA Database");
149
/* General PEM loader */
153
filter = QObject::tr("PEM files ( *.pem );;") + filter;
154
caption = QObject::tr("Load PEM encoded file");
157
pki_base *load_pem::newItem()
159
return new pki_multi();