KIO
Go to the documentation of this file.
23 #include <ksslconfig.h>
27 #include <QtCore/QString>
28 #include <QtCore/QFile>
38 #define sk_new kossl->sk_new
39 #define sk_push kossl->sk_push
40 #define sk_free kossl->sk_free
41 #define sk_value kossl->sk_value
42 #define sk_num kossl->sk_num
43 #define sk_dup kossl->sk_dup
50 kossl = KOSSL::self();
57 if (_pkcs) kossl->PKCS7_free(_pkcs);
68 if (base64.isEmpty())
return NULL;
69 QByteArray qba = QByteArray::fromBase64(base64.toLatin1());
83 PKCS7 *newpkcs = NULL;
85 if (!qf.open(QIODevice::ReadOnly))
88 FILE *
fp = fdopen(qf.handle(),
"r");
91 newpkcs = KOSSL::self()->d2i_PKCS7_fp(fp, &newpkcs);
93 if (!newpkcs)
return NULL;
130 len = kossl->i2d_PKCS7(_pkcs, NULL);
132 char *buf =
new char[len];
133 p = (
unsigned char *)buf;
134 kossl->i2d_PKCS7(_pkcs, &p);
135 base64 = QByteArray::fromRawData(buf,len).toBase64();
148 if (!out.open(QIODevice::WriteOnly))
return false;
150 int fd = out.handle();
151 FILE *
fp = fdopen(fd,
"w");
154 unlink(filename.toLatin1());
158 kossl->i2d_PKCS7_fp(fp, _pkcs);
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Wed Jun 5 2013 18:38:49 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.