@@ -2994,7 +2994,7 @@ do_init_frame_tls(struct context *c)
}
if (c->c2.tls_auth_standalone)
{
- tls_auth_standalone_finalize(c->c2.tls_auth_standalone, &c->c2.frame);
+ tls_init_control_channel_frame_parameters(&c->c2.frame, &c->c2.tls_auth_standalone->frame);
frame_print(&c->c2.tls_auth_standalone->frame, D_MTU_INFO,
"TLS-Auth MTU parms");
}
@@ -295,11 +295,7 @@ tls_limit_reneg_bytes(const char *ciphername, int *reneg_bytes)
}
}
-/*
- * Max number of bytes we will add
- * to control channel packet.
- */
-static void
+void
tls_init_control_channel_frame_parameters(const struct frame *data_channel_frame,
struct frame *frame)
{
@@ -1284,7 +1280,6 @@ void
tls_multi_init_finalize(struct tls_multi *multi, const struct frame *frame)
{
tls_init_control_channel_frame_parameters(frame, &multi->opt.frame);
-
/* initialize the active and untrusted sessions */
tls_session_init(multi, &multi->session[TM_ACTIVE]);
@@ -1322,13 +1317,6 @@ tls_auth_standalone_init(struct tls_options *tls_options,
return tas;
}
-void
-tls_auth_standalone_finalize(struct tls_auth_standalone *tas,
- const struct frame *frame)
-{
- tls_init_control_channel_frame_parameters(frame, &tas->frame);
-}
-
/*
* Set local and remote option compatibility strings.
* Used to verify compatibility of local and remote option
@@ -209,10 +209,11 @@ struct tls_auth_standalone *tls_auth_standalone_init(struct tls_options *tls_opt
struct gc_arena *gc);
/*
- * Finalize a standalone tls-auth verification object.
+ * Setups up the control channel frame size parameters from the data channel
+ * parameters
*/
-void tls_auth_standalone_finalize(struct tls_auth_standalone *tas,
- const struct frame *frame);
+void tls_init_control_channel_frame_parameters(const struct frame *data_channel_frame,
+ struct frame *frame);
/*
* Set local and remote option compatibility strings.
While calling this wrapper function is strictly more correct, these indirection layer with tiny wrapper make the code more complex and going through more layer than it really needs to. Signed-off-by: Arne Schwabe <arne@rfc2549.org> --- src/openvpn/init.c | 2 +- src/openvpn/ssl.c | 14 +------------- src/openvpn/ssl.h | 7 ++++--- 3 files changed, 6 insertions(+), 17 deletions(-)