NNTPConnection::NNTPConnection(NewsServer* pNewsServer) : Connection(pNewsServer->GetHost(), pNewsServer->GetPort(), pNewsServer->GetTLS()) { m_pNewsServer = pNewsServer; m_szActiveGroup = NULL; m_szLineBuf = (char*)malloc(CONNECTION_LINEBUFFER_SIZE); m_bAuthError = false; SetCipher(pNewsServer->GetCipher()); }
CZNCSock::CZNCSock(int timeout) : Csock(timeout), m_HostToVerifySSL(""), m_ssTrustedFingerprints(), m_ssCertVerificationErrors() { #ifdef HAVE_LIBSSL DisableSSLCompression(); FollowSSLCipherServerPreference(); DisableSSLProtocols(CZNC::Get().GetDisabledSSLProtocols()); CString sCipher = CZNC::Get().GetSSLCiphers(); if (sCipher.empty()) { sCipher = ZNC_DefaultCipher(); } SetCipher(sCipher); #endif }
CZNCSock::CZNCSock(int timeout) : Csock(timeout) { #ifdef HAVE_LIBSSL DisableSSLCompression(); FollowSSLCipherServerPreference(); DisableSSLProtocols(CZNC::Get().GetDisabledSSLProtocols()); CString sCipher = CZNC::Get().GetSSLCiphers(); if (sCipher.empty()) { sCipher = ZNC_DefaultCipher(); } SetCipher(sCipher); #endif }
void CPBEncryptParms::ConstructL() /** Initialize this object with default cipher, kdf (PKCS#5,) salt length, iteration count, and IV. */ { iData = new(ELeave) TParamsData; iData->iKdf = EKdfPkcs5; iSalt = HBufC8::NewMaxL(KPBEDefaultSaltBytes); TPtr8 saltDes = iSalt->Des(); TRandom::RandomL(saltDes); iIterations = KDefaultIterations; iIV = HBufC8::NewMaxL(KPBEMaxCipherIVBytes); SetCipher( (TCrypto::Strength() == TCrypto::EStrong) ? KPBEDefaultStrongCipher : KPBEDefaultWeakCipher ); }
NntpConnection::NntpConnection(NewsServer* newsServer) : Connection(newsServer->GetHost(), newsServer->GetPort(), newsServer->GetTls()), m_newsServer(newsServer) { m_lineBuf.Reserve(CONNECTION_LINEBUFFER_SIZE); SetCipher(newsServer->GetCipher()); }