CSecurityTLS::CSecurityTLS(CConnection* cc, bool _anon)
: CSecurity(cc), session(NULL), anon_cred(NULL), cert_cred(NULL),
- anon(_anon), tlsis(NULL), tlsos(NULL)
+ anon(_anon), tlsis(NULL), tlsos(NULL), rawis(NULL), rawos(NULL)
{
cafile = X509CA.getData();
crlfile = X509CRL.getData();
cert_cred = 0;
}
+ if (rawis && rawos) {
+ cc->setStreams(rawis, rawos);
+ rawis = NULL;
+ rawos = NULL;
+ }
+
if (tlsis) {
delete tlsis;
tlsis = NULL;
// for GnuTLS
tlsis = new rdr::TLSInStream(is, session);
tlsos = new rdr::TLSOutStream(os, session);
+
+ rawis = is;
+ rawos = os;
}
int err;
SSecurityTLS::SSecurityTLS(SConnection* sc, bool _anon)
: SSecurity(sc), session(NULL), dh_params(NULL), anon_cred(NULL),
- cert_cred(NULL), anon(_anon), tlsis(NULL), tlsos(NULL)
+ cert_cred(NULL), anon(_anon), tlsis(NULL), tlsos(NULL),
+ rawis(NULL), rawos(NULL)
{
certfile = X509_CertFile.getData();
keyfile = X509_KeyFile.getData();
cert_cred = 0;
}
+ if (rawis && rawos) {
+ sc->setStreams(rawis, rawos);
+ rawis = NULL;
+ rawos = NULL;
+ }
+
if (tlsis) {
delete tlsis;
tlsis = NULL;
// for GnuTLS
tlsis = new rdr::TLSInStream(is, session);
tlsos = new rdr::TLSOutStream(os, session);
+
+ rawis = is;
+ rawos = os;
}
int err;