]> 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>
Mon, 29 Mar 2021 02:27:01 +0000 (19:27 -0700)
commita8ef9fa75e2bb4ec65cdb53d2f437a400654f95d
tree4e4fcf20c81914b19f321efc824ddd0f9b078112
parenta47406b43c5cb48c0647d3961229f460229da593
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