RC4_SHA cipher suite

This commit is contained in:
orignal 2015-04-01 20:23:06 -04:00
parent ec68338a20
commit 0a15088572
2 changed files with 82 additions and 27 deletions

View file

@ -57,6 +57,7 @@ namespace data
virtual void CalculateMAC (uint8_t type, const uint8_t * buf, size_t len, uint8_t * mac) = 0;
virtual size_t Encrypt (const uint8_t * in, size_t len, const uint8_t * mac, uint8_t * out) = 0;
virtual size_t Decrypt (uint8_t * buf, size_t len) = 0;
virtual size_t GetIVSize () const { return 0; }; // override for AES
};
@ -68,10 +69,7 @@ namespace data
~TlsSession ();
void Send (const uint8_t * buf, size_t len);
bool Receive (std::ostream& rs);
static void PRF (const uint8_t * secret, const char * label, const uint8_t * random, size_t randomLen,
size_t len, uint8_t * buf);
private:
void Handshake ();
@ -79,6 +77,9 @@ namespace data
void SendFinishedMsg ();
CryptoPP::RSA::PublicKey ExtractPublicKey (const uint8_t * certificate, size_t len);
void PRF (const uint8_t * secret, const char * label, const uint8_t * random, size_t randomLen,
size_t len, uint8_t * buf);
private:
boost::asio::ip::tcp::iostream m_Site;