KIO
Go to the documentation of this file.
24 #include <ksslconfig.h>
32 #define crypt _openssl_crypt
33 #include <openssl/ssl.h>
34 #include <openssl/x509.h>
35 #include <openssl/x509v3.h>
36 #include <openssl/x509_vfy.h>
37 #include <openssl/pem.h>
38 #include <openssl/stack.h>
39 #include <openssl/safestack.h>
45 #include <QtCore/QStringList>
48 #define sk_new d->kossl->sk_new
49 #define sk_push d->kossl->sk_push
50 #define sk_free d->kossl->sk_free
51 #define sk_value d->kossl->sk_value
52 #define sk_num d->kossl->sk_num
53 #define sk_dup d->kossl->sk_dup
54 #define sk_pop d->kossl->sk_pop
57 class KSSLCertChainPrivate {
59 KSSLCertChainPrivate() {
60 kossl = KOSSL::self();
63 ~KSSLCertChainPrivate() {
70 :d(new KSSLCertChainPrivate)
82 X509* x5 = sk_X509_pop(x);
84 d->kossl->X509_free(x5);
94 return (_chain &&
depth() > 0);
100 QList<KSSLCertificate *> ch =
getChain();
109 return sk_X509_num((
STACK_OF(X509)*)_chain);
121 QList<KSSLCertificate *> cl;
122 if (!_chain)
return cl;
126 for (
int i = 0; i < sk_X509_num(x); i++) {
127 X509* x5 = sk_X509_value(x, i);
130 nc->
setCert(d->kossl->X509_dup(x5));
145 X509* x5 = sk_X509_pop(x);
147 d->kossl->X509_free(x5);
153 if (chain.isEmpty())
return;
154 _chain = (
void *)
sk_new(NULL);
156 sk_X509_push((
STACK_OF(X509)*)_chain, d->kossl->X509_dup(x->
getCert()));
169 X509* x5 = sk_X509_pop(x);
171 d->kossl->X509_free(x5);
177 if (!stack_of_x509)
return;
179 _chain = (
void *)
sk_new(NULL);
182 for (
int i = 0; i < sk_X509_num(x); i++) {
183 X509* x5 = sk_X509_value(x, i);
185 sk_X509_push((
STACK_OF(X509)*)_chain,d->kossl->X509_dup(x5));
195 QList<KSSLCertificate *> cl;
196 for (QStringList::ConstIterator s = chain.begin(); s != chain.end(); ++s) {
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 23 2013 22:00:57 by
doxygen 1.8.1.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.