mirror of https://github.com/wolfSSL/wolfssh.git
wolfSSH_CTX_SetChannelReqAnyCb() and wolfSSH_CTX_SetGlobalReqAnyCb() register a callback consulted first for a channel or global request, with the name, the type-specific part, and whether a reply is wanted. A tri-state answer grants, refuses, or leaves it to the handling already there, so a policy reaches the types with no hook of their own. - the name is the one that arrived, since a copy into a buffer truncates a long name and ends it at an embedded NUL, and a policy has to answer on what the peer sent - a grant still parses and records what the library needs, so a granted session request commits the session, the typed callbacks are not consulted, and a granted unknown type is answered CHANNEL_SUCCESS - a port-0 tcpip-forward skips the callback, since only the forward callback can report the port bound and a policy that had bound a listener would then have to be refused, per RFC 4254 7.1 - a client refuses tcpip-forward and cancel-tcpip-forward ahead of any policy, matched on the name that arrived so it holds in a build with no forwarding, where neither name is in the name table - window-change, exit-status and exit-signal are cleared of a reply before the handling runs, so a refusal leaves them unanswered too, per RFC 4254 6.7 and 6.10 - regress.c covers the answers, the data delivered, the names that do not fit a copy, and which callbacks each answer leaves out |
||
|---|---|---|
| .. | ||
| agent.c | ||
| certman.c | ||
| include.am | ||
| internal.c | ||
| io.c | ||
| keygen.c | ||
| log.c | ||
| misc.c | ||
| ossh.c | ||
| port.c | ||
| ssh.c | ||
| wolfscp.c | ||
| wolfsftp.c | ||
| wolfterm.c | ||