mirror of
https://github.com/QuasarApp/qca.git
synced 2025-05-09 09:19:33 +00:00
ssl server hook
svn path=/trunk/kdesupport/qca/; revision=238855
This commit is contained in:
parent
3cddc6f10b
commit
f2987fbada
@ -508,7 +508,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
QCA_RSAKeyContext *clone()
|
||||
QCA_RSAKeyContext *clone() const
|
||||
{
|
||||
// deep copy
|
||||
RSAKeyContext *c = new RSAKeyContext;
|
||||
@ -967,7 +967,7 @@ public:
|
||||
vr = QCA::SSL::Unknown;
|
||||
}
|
||||
|
||||
bool begin(const QString &_host, const QPtrList<QCA_CertContext> &list)
|
||||
bool startClient(const QString &_host, const QPtrList<QCA_CertContext> &list)
|
||||
{
|
||||
reset();
|
||||
|
||||
@ -1017,6 +1017,11 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool startServer(const QCA_CertContext &, const QCA_RSAKeyContext &)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int doConnect()
|
||||
{
|
||||
int ret = SSL_connect(ssl);
|
||||
|
@ -743,7 +743,7 @@ bool SSL::startClient(const QString &host, const QPtrList<Cert> &store)
|
||||
list.append(cert->d->c);
|
||||
|
||||
// begin!
|
||||
if(!d->c->begin(host, list))
|
||||
if(!d->c->startClient(host, list))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ class QCA_RSAKeyContext
|
||||
public:
|
||||
virtual ~QCA_RSAKeyContext() {}
|
||||
|
||||
virtual QCA_RSAKeyContext *clone()=0;
|
||||
virtual QCA_RSAKeyContext *clone() const=0;
|
||||
virtual bool isNull() const=0;
|
||||
virtual bool havePublic() const=0;
|
||||
virtual bool havePrivate() const=0;
|
||||
@ -103,7 +103,8 @@ class QCA_SSLContext : public QObject
|
||||
public:
|
||||
virtual ~QCA_SSLContext() {}
|
||||
|
||||
virtual bool begin(const QString &host, const QPtrList<QCA_CertContext> &store)=0;
|
||||
virtual bool startClient(const QString &host, const QPtrList<QCA_CertContext> &store)=0;
|
||||
virtual bool startServer(const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
|
||||
|
||||
virtual void writeIncoming(const QByteArray &a)=0;
|
||||
virtual QByteArray readOutgoing()=0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user