示例#1
0
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());
}
示例#2
0
文件: Socket.cpp 项目: TuffLuck/znc
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
}
示例#3
0
文件: Socket.cpp 项目: James-TR/znc
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
}
示例#4
0
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 );
	}
示例#5
0
NntpConnection::NntpConnection(NewsServer* newsServer) : Connection(newsServer->GetHost(), newsServer->GetPort(), newsServer->GetTls()), m_newsServer(newsServer)
{
    m_lineBuf.Reserve(CONNECTION_LINEBUFFER_SIZE);
    SetCipher(newsServer->GetCipher());
}