aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/tls_record.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-01-27 14:10:37 +0000
committerlloyd <[email protected]>2015-01-27 14:10:37 +0000
commitb8fa304ec981d273c45d7ef31705d65ccfb00cc1 (patch)
tree86a0c03ddcf3f6b331a73170167bbf1e429e3d79 /src/lib/tls/tls_record.h
parent5ca89c642f19b747b965a22db87e7af2d13d0f35 (diff)
Add typedefs for function signatures/types used in TLS for easier reading
Diffstat (limited to 'src/lib/tls/tls_record.h')
-rw-r--r--src/lib/tls/tls_record.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/tls/tls_record.h b/src/lib/tls/tls_record.h
index c9bf8aade..46f87a9af 100644
--- a/src/lib/tls/tls_record.h
+++ b/src/lib/tls/tls_record.h
@@ -113,6 +113,9 @@ void write_record(secure_vector<byte>& write_buffer,
Connection_Cipher_State* cipherstate,
RandomNumberGenerator& rng);
+// epoch -> cipher state
+typedef std::function<std::shared_ptr<Connection_Cipher_State> (u16bit)> get_cipherstate_fn;
+
/**
* Decode a TLS record
* @return zero if full message, else number of bytes still needed
@@ -127,7 +130,7 @@ size_t read_record(secure_vector<byte>& read_buffer,
Protocol_Version* record_version,
Record_Type* record_type,
Connection_Sequence_Numbers* sequence_numbers,
- std::function<std::shared_ptr<Connection_Cipher_State> (u16bit)> get_cipherstate);
+ get_cipherstate_fn get_cipherstate);
}