Function read_ts_server_challenge

Source
pub fn read_ts_server_challenge(stream: &[u8]) -> RdpResult<Vec<u8>>
Expand description

This is the second step in CSSP handshake this is the challenge message from server to client

This function will parse the request and extract the negoToken which use as payload field

https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-cssp/6aac4dea-08ef-47a6-8747-22ea7f6d8685?redirectedfrom=MSDN https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-cssp/9664994d-0784-4659-b85b-83b8d54c2336

ยงExample

use rdp::nla::cssp::read_ts_server_challenge;
let challenge = [48, 18, 160, 3, 2, 1, 2, 161, 11, 48, 9, 48, 7, 160, 5, 4, 3, 0, 1, 2];
let payload = read_ts_server_challenge(&challenge).unwrap();
assert_eq!(payload, [0, 1, 2])