Rework SCTP auth pipeline to allow dynamic key change
The SCTP key sharing mechanism won't be using a file to communicate
the active authentication key anymore as we will be receiving
it directly into message bridge through an AOS channel instead.
Change-Id: I46e079b98cbb6a0ed52fca36c67f7fa724ba249c
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/network/sctp_server.cc b/aos/network/sctp_server.cc
index 1bcbebd..f90b21b 100644
--- a/aos/network/sctp_server.cc
+++ b/aos/network/sctp_server.cc
@@ -22,8 +22,8 @@
namespace message_bridge {
SctpServer::SctpServer(int streams, std::string_view local_host, int local_port,
- std::vector<uint8_t> sctp_auth_key)
- : sctp_(std::move(sctp_auth_key)) {
+ SctpAuthMethod requested_authentication)
+ : sctp_(requested_authentication) {
bool use_ipv6 = Ipv6Enabled();
sockaddr_local_ = ResolveSocket(local_host, local_port, use_ipv6);
while (true) {