You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
140 lines
3.4 KiB
140 lines
3.4 KiB
15 years ago
|
/* This file is part of the KDE project
|
||
|
*
|
||
|
* Copyright (C) 2001 George Staikos <staikos@kde.org>
|
||
|
*
|
||
|
* This library is free software; you can redistribute it and/or
|
||
|
* modify it under the terms of the GNU Library General Public
|
||
|
* License as published by the Free Software Foundation; either
|
||
|
* version 2 of the License, or (at your option) any later version.
|
||
|
*
|
||
|
* This library is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
* Library General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Library General Public License
|
||
|
* along with this library; see the file COPYING.LIB. If not, write to
|
||
|
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
* Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
#ifndef _INCLUDE_KCERTPART_H
|
||
|
#define _INCLUDE_KCERTPART_H
|
||
|
|
||
|
#ifdef HAVE_CONFIG_H
|
||
|
#include <config.h>
|
||
|
#endif
|
||
|
|
||
12 years ago
|
#include <tdeparts/part.h>
|
||
15 years ago
|
#include <tqptrlist.h>
|
||
|
#include <tqlistview.h>
|
||
15 years ago
|
#include <klistview.h>
|
||
|
|
||
|
class KSSLCertBox;
|
||
15 years ago
|
class TQFrame;
|
||
|
class TQLabel;
|
||
15 years ago
|
class KCertPartPrivate;
|
||
|
class KComboBox;
|
||
15 years ago
|
class TQButton;
|
||
15 years ago
|
class KSSLSigners;
|
||
|
class KSSLPKCS12;
|
||
|
class KSSLCertificate;
|
||
15 years ago
|
class TQTabWidget;
|
||
|
class TQMultiLineEdit;
|
||
12 years ago
|
class TDEAboutData;
|
||
15 years ago
|
class TQGridLayout;
|
||
15 years ago
|
|
||
|
|
||
|
class KX509Item : public KListViewItem {
|
||
|
public:
|
||
|
KX509Item(KListViewItem *parent, KSSLCertificate *x);
|
||
|
KX509Item(KListView *parent, KSSLCertificate *x);
|
||
|
void setup(KSSLCertificate *x);
|
||
|
~KX509Item();
|
||
|
virtual int rtti() const { return 1; }
|
||
|
KSSLCertificate *cert;
|
||
15 years ago
|
TQString _prettyName;
|
||
15 years ago
|
};
|
||
|
|
||
|
|
||
|
class KPKCS12Item : public KListViewItem {
|
||
|
public:
|
||
|
KPKCS12Item(KListViewItem *parent, KSSLPKCS12 *x);
|
||
|
~KPKCS12Item();
|
||
|
KSSLPKCS12 *cert;
|
||
15 years ago
|
TQString _prettyName;
|
||
15 years ago
|
};
|
||
|
|
||
|
|
||
|
class KCertPart : public KParts::ReadWritePart {
|
||
|
Q_OBJECT
|
||
|
public:
|
||
14 years ago
|
KCertPart(TQWidget *parentWidget, const char *widgetName,
|
||
15 years ago
|
TQObject *parent = 0L, const char *name = 0L,
|
||
|
const TQStringList &args = TQStringList() );
|
||
15 years ago
|
virtual ~KCertPart();
|
||
|
|
||
|
virtual void setReadWrite(bool readwrite);
|
||
|
|
||
12 years ago
|
static TDEAboutData *createAboutData();
|
||
15 years ago
|
|
||
|
protected slots:
|
||
|
void slotChain(int c);
|
||
|
void slotImport();
|
||
|
void slotSave();
|
||
|
void slotDone();
|
||
|
void slotLaunch();
|
||
15 years ago
|
void slotSelectionChanged(TQListViewItem *x);
|
||
15 years ago
|
void slotImportAll();
|
||
|
|
||
|
protected:
|
||
|
|
||
|
virtual bool openFile();
|
||
|
virtual bool saveFile();
|
||
|
|
||
|
void displayPKCS12Cert(KSSLCertificate *c);
|
||
|
void displayCACert(KSSLCertificate *c);
|
||
|
|
||
|
KListView *_sideList;
|
||
|
KListViewItem *_parentCA, *_parentP12;
|
||
15 years ago
|
TQFrame *_pkcsFrame, *_blankFrame, *_x509Frame, *_frame;
|
||
15 years ago
|
|
||
|
// for the PKCS12 widget
|
||
15 years ago
|
TQLabel *_p12_filenameLabel, *_p12_validFrom, *_p12_validUntil,
|
||
15 years ago
|
*_p12_serialNum, *_p12_certState;
|
||
15 years ago
|
TQLabel *_p12_digest;
|
||
15 years ago
|
KComboBox *_p12_chain;
|
||
15 years ago
|
TQMultiLineEdit *_p12_pubkey, *_p12_sig;
|
||
15 years ago
|
KSSLCertBox *_p12_subject, *_p12_issuer;
|
||
|
|
||
|
// for the CA widget
|
||
15 years ago
|
TQLabel *_ca_filenameLabel, *_ca_validFrom, *_ca_validUntil,
|
||
15 years ago
|
*_ca_serialNum, *_ca_certState;
|
||
15 years ago
|
TQLabel *_ca_digest;
|
||
|
TQMultiLineEdit *_ca_pubkey, *_ca_sig;
|
||
15 years ago
|
KSSLCertBox *_ca_subject, *_ca_issuer;
|
||
|
|
||
|
|
||
|
// The rest
|
||
12 years ago
|
TDEInstance *_instance;
|
||
15 years ago
|
TQButton *_import, *_save, *_done, *_launch, *_importAll;
|
||
15 years ago
|
// Store the pointer to the current item
|
||
|
KSSLPKCS12 *_p12;
|
||
|
KSSLCertificate *_ca;
|
||
15 years ago
|
TQTabWidget *_tabs;
|
||
|
TQGridLayout *_baseGrid;
|
||
15 years ago
|
KSSLSigners *_signers;
|
||
|
bool _silentImport;
|
||
15 years ago
|
TQString _curName;
|
||
15 years ago
|
|
||
|
private:
|
||
|
KCertPartPrivate *d;
|
||
|
void displayPKCS12();
|
||
|
};
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
#endif
|
||
|
|
||
|
|