]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
add 'nullppp' protocol for testing
authorDaniel Lenski <dlenski@gmail.com>
Tue, 19 May 2020 21:36:48 +0000 (14:36 -0700)
committerDaniel Lenski <dlenski@gmail.com>
Wed, 20 May 2020 00:36:25 +0000 (17:36 -0700)
commitc649d85f70f1a968dfa1f7f70413edc400a91990
tree58ebbdae6dae066e0c408f9a76847b1a870d0843
parent13a4cb2abeedbd3f4ee1e05c0a19107958a77d14
add 'nullppp' protocol for testing

Use `socat` to set up a PTY connected to a TLS socket (listening only on the local interface):

    socat -s -d -d \
      PTY,raw,b9600 \
      OPENSSL-LISTEN:5556,cert=tests/certs/server-cert.pem,key=tests/certs/server-key.pem,verify=0,so-bindtodevice=lo
    [ N PTY is /dev/pts/X ]

Connect the PTY to `pppd` (requires root):

    # Add 'sync' to disable HDLC framing
    sudo pppd /dev/pts/X 10.0.0.1:10.0.0.101 noauth debug dump logfd 2 local nodetach passive persist ms-dns 1.1.1.1 ms-wins 5.5.5.5 +ipv6

Connect OpenConnect to the TLS socket, and watch it negotiate LCP/IPCP/IP6CP with its peer, and reject CCP:

    # Add noipv4,noipv6 to cookie to try those
    ./openconnect --protocol=nullppp --cookie hdlc --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --dump localhost:5556

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
Makefile.am
library.c
nullppp.c [new file with mode: 0644]
openconnect-internal.h