Skip to content

Commit

Permalink
ProtoContext: Allow external clients to enable dynamic TLS-crypt
Browse files Browse the repository at this point in the history
Signed-off-by: Razvan Cojocaru <[email protected]>
  • Loading branch information
Razvan Cojocaru authored and Jenkins-dev committed Dec 19, 2024
1 parent ee4395c commit c749836
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions openvpn/ssl/proto.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,16 @@ class ProtoContext : public logging::LoggingMixin<OPENVPN_DEBUG_PROTO,
load_common(opt, pco, server ? LOAD_COMMON_SERVER : LOAD_COMMON_CLIENT);
}

/**
* Fire up the infrastructure needed in order to be able to process dynamic
* TLS-crypt renegotiation.
*/
void enable_dynamic_tls_crypt()
{
set_tls_crypt_algs();
tls_crypt_ |= TLSCrypt::Dynamic;
}

// load options string pushed by server
void process_push(const OptionList &opt, const ProtoContextCompressionOptions &pco)
{
Expand Down Expand Up @@ -823,8 +833,7 @@ class ProtoContext : public logging::LoggingMixin<OPENVPN_DEBUG_PROTO,
}
else if (flag == "dyn-tls-crypt")
{
set_tls_crypt_algs();
tls_crypt_ |= Dynamic;
enable_dynamic_tls_crypt();
}
else if (flag == "tls-ekm")
{
Expand Down

0 comments on commit c749836

Please sign in to comment.