3#ifndef ZT_TLS_HANDSHAKE_H
4#define ZT_TLS_HANDSHAKE_H
47 void StartHandshake(Ptr<Node> client, Ptr<Node> server, uint32_t clientId, uint32_t serverId);
80 void Log(
const std::string& msg)
const;
Simulates a Zero Trust-based TLS handshake mechanism between NS-3 nodes.
void StartHandshake(Ptr< Node > client, Ptr< Node > server, uint32_t clientId, uint32_t serverId)
Start a simulated TLS handshake between client and server nodes.
void SetExternalLogger(std::function< void(std::string)> logger)
Set an external logger for emitting TLS logs.
ZtTlsHandshake()
Constructor.
std::function< void(std::string)> m_logger
Optional external logger.
static TypeId GetTypeId()
Get the NS-3 TypeId.
std::string GetSessionKey(uint32_t peerId) const
Retrieve the session key for a peer in hexadecimal string format.
std::map< uint32_t, std::string > m_sessionKeys
Maps node IDs to session keys.
std::function< bool(uint32_t, std::string)> m_policyValidator
Optional external policy validator.
bool HasSession(uint32_t peerId) const
Check if a session exists for a given peer.
void Log(const std::string &msg) const
Emit a log message using the external logger or NS_LOG fallback.
void SetPolicyValidator(std::function< bool(uint32_t, std::string)> validator)
Set a policy validator for enforcing Zero Trust identity checks.