ksslpkcs12.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
#ifndef _KSSLPKCS12_H
00022
#define _KSSLPKCS12_H
00023
00024
#include "ksslconfig.h"
00025
00026
#ifdef KSSL_HAVE_SSL
00027
#define crypt _openssl_crypt
00028
#include <openssl/pkcs12.h>
00029
#undef crypt
00030
#else
00031
class PKCS12;
00032
class EVP_PKEY;
00033
class X509;
00034
#endif
00035
00036
#include <ksslcertificate.h>
00037
#include <ksslcertchain.h>
00038
00039
#ifndef STACK_OF
00040
#define STACK_OF(x) void
00041
#endif
00042
00043
class KSSL;
00044
class KSSLPKCS12Private;
00045
class KOpenSSLProxy;
00046
00057 class KSSLPKCS12 {
00058
friend class KSSL;
00059
00060
public:
00064
virtual ~KSSLPKCS12();
00065
00071
QString name();
00072
00079
static KSSLPKCS12*
fromString(
QString base64,
QString password =
"");
00080
00087
static KSSLPKCS12*
loadCertFile(
QString filename,
QString password =
"");
00088
00093
QString toString();
00094
00100
void setCert(PKCS12 *c);
00101
00108
bool changePassword(
QString pold,
QString pnew);
00109
00115 EVP_PKEY *
getPrivateKey();
00116
00121
KSSLCertificate *
getCertificate();
00122
00128
bool toFile(
QString filename);
00129
00135 KSSLCertificate::KSSLValidation
validate();
00136
00143 KSSLCertificate::KSSLValidation
validate(KSSLCertificate::KSSLPurpose p);
00144
00151 KSSLCertificate::KSSLValidation
revalidate();
00152
00160 KSSLCertificate::KSSLValidation
revalidate(KSSLCertificate::KSSLPurpose p);
00161
00166
bool isValid();
00167
00173
bool isValid(KSSLCertificate::KSSLPurpose p);
00174
00175
protected:
00176
KSSLPKCS12();
00177
bool parse(
QString pass);
00178
00179
private:
00180 KSSLPKCS12Private *d;
00181 PKCS12 *_pkcs;
00182
KOpenSSLProxy *kossl;
00183 EVP_PKEY *_pkey;
00184
KSSLCertificate *_cert;
00185 STACK_OF(X509) *_caStack;
00186 };
00187
00188
00189
#endif
00190
This file is part of the documentation for kio Library Version 3.2.3.