Implemented key derivation, output record signing and encryption

This commit is contained in:
Martin Willi
2010-08-03 15:39:25 +02:00
parent 18010de23d
commit 84543e6efa
7 changed files with 485 additions and 39 deletions
@@ -60,6 +60,17 @@ struct tls_protection_t {
status_t (*build)(tls_protection_t *this,
tls_content_type_t *type, chunk_t *data);
/**
* Set a new cipher, including encryption and integrity algorithms.
*
* @param inbound TRUE to use cipher for inbound data, FALSE for outbound
* @param signer new signer to use, gets owned by protection layer
* @param crypter new crypter to use, gets owned by protection layer
* @param iv initial IV for crypter, gets owned by protection layer
*/
void (*set_cipher)(tls_protection_t *this, bool inbound, signer_t *signer,
crypter_t *crypter, chunk_t iv);
/**
* Destroy a tls_protection_t.
*/
@@ -69,9 +80,11 @@ struct tls_protection_t {
/**
* Create a tls_protection instance.
*
* @param tls TLS context
* @param compression compression layer of TLS stack
* @return TLS protection layer.
*/
tls_protection_t *tls_protection_create(tls_compression_t *compression);
tls_protection_t *tls_protection_create(tls_t *tls,
tls_compression_t *compression);
#endif /** TLS_PROTECTION_H_ @}*/