tls-hkdf: Add method that allows exporting key material

This commit is contained in:
Tobias Brunner
2021-02-12 11:45:44 +01:00
parent 86cda1a3c0
commit d2fe921cf5
2 changed files with 62 additions and 0 deletions
+13
View File
@@ -113,6 +113,19 @@ struct tls_hkdf_t {
bool (*derive_finished)(tls_hkdf_t *this, bool is_server,
chunk_t *finished);
/**
* Export key material.
*
* @param label exporter label
* @param context optional context
* @param messages handshake messages
* @param length key length, in bytes
* @param key exported key material
* @return TRUE if key material successfully exported
*/
bool (*export)(tls_hkdf_t *this, char *label, chunk_t context,
chunk_t messages, size_t length, chunk_t *key);
/**
* Use the internal PRF to allocate data (mainly for the finished message
* where the key is from derive_finished() and the seed is the transcript