|
OpenVPN 3 Core Library
|
Wrap an out-of-band SERVER_PROBE / unwrap the matching PROBE_REPLY. More...
#include <proto.hpp>
Public Member Functions | |
| ProbeWrap (const ProtoConfig::Ptr &config_arg, const SessionStats::Ptr &stats) | |
Pick the wrap mode from config_arg and build the crypto contexts for it. | |
| const ProtoSessionID & | self_psid () const |
| the client session id carried in the probe (echoed back in the reply) | |
| void | wrap (BufferAllocated &buf, BufferAllocated &work) |
| Wrap an already-encoded SERVER_PROBE payload in place. | |
| UnwrapStatus | unwrap (BufferAllocated &recv, BufferAllocated &work, ProtoSessionID &src_psid, PacketIDControl &pid) |
| Unwrap a received PROBE_REPLY in place. | |
Static Private Attributes | |
| static constexpr unsigned int | KEY_ID = 0 |
Wrap an out-of-band SERVER_PROBE / unwrap the matching PROBE_REPLY.
Applies whichever control-channel protection is configured (tls-auth, tls-crypt, tls-crypt-v2 or plaintext), built directly from a ProtoConfig – no session exists yet. The on-wire framing is identical to an in-session control packet (the wrap_ / unwrap_ helpers), so a standard server accepts it. The probe is always sent by the client; for tls-crypt-v2 the wrapped client key (WKc) is appended (opcode CONTROL_OOB_WKC_V1) so a stateless server can derive the session key and unwrap the probe.
|
inline |
|
inline |
|
inline |
Unwrap a received PROBE_REPLY in place.
| recv | the wrapped packet on entry, the plaintext OOB payload on return (when OK) |
| work | scratch buffer (used only by the tls-crypt paths) |
| src_psid | set to the server's session id |
| pid | set to the packet id (unset for plaintext) |
recv holds the payload Definition at line 2069 of file proto.hpp.
|
inline |
|
private |
|
private |
|
staticconstexprprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |