/* tlsv1_server_get_keyblock_size - Get TLS key_block size @conn: TLSv1 server connection data from tlsv1_server_init() Returns: Size of the key_block for the negotiated cipher suite or -1 on failure  */
int tlsv1_server_get_keyblock_size(struct tlsv1_server *conn)
/* tlsv1_server_get_keyblock_size - Get TLS key_block size @conn: TLSv1 server connection data from tlsv1_server_init() Returns: Size of the key_block for the negotiated cipher suite or -1 on failure  */
int tlsv1_server_get_keyblock_size(struct tlsv1_server *conn)
{
	if (conn->state == CLIENT_HELLO || conn->state == SERVER_HELLO)
		return -1;
	return 2 * (conn->rl.hash_size + conn->rl.key_material_len +
		    conn->rl.iv_size);
}