Adding some more examples how to use socat. - nonhttpd - A httpd serving nothing.
       
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit 74616be5713bcb27e622082589323d6b9f78c7c5
 (DIR) parent 2e38ff9cdec602aae0b5470ea81f73d691960153
 (HTM) Author: Christoph Lohmann <20h@r-36.net>
       Date:   Wed, 21 Nov 2012 11:16:47 +0100
       
       Adding some more examples how to use socat.
       
       Diffstat:
         examples/gencert.sh                 |      14 ++++++++++++++
         examples/gencerts.sh                |       5 +++++
         examples/socat-nonhttpd-cert-clien… |       4 ++++
         examples/socat-nonhttpd-cert.sh     |       5 +++++
         examples/socat-nonhttpd-ssl-client… |       4 ++++
         examples/socat-nonhttpd-ssl.sh      |       5 +++++
         examples/socat-nonhttpd.sh          |       4 ++++
       
       7 files changed, 41 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/examples/gencert.sh b/examples/gencert.sh
       @@ -0,0 +1,14 @@
       +#!/bin/sh
       +
       +if [ $# -gt 0 ];
       +tthen
       +        KEY="$1"
       +else
       +        KEY="nonhttpd"
       +fi
       +
       +openssl genrsa -out "${KEY}.key" 1024
       +openssl req -new -key "${KEY}.key" -x509 -days 3653 -out "${KEY}.crt"
       +cat "${KEY}.key" "${KEY}.crt" > "${KEY}.pem"
       +chmod 600 "${KEY}.key" "${KEY}.pem"
       +
 (DIR) diff --git a/examples/gencerts.sh b/examples/gencerts.sh
       @@ -0,0 +1,5 @@
       +#!/bin/sh
       +
       +./gencert.sh server
       +./gencert.sh client
       +
 (DIR) diff --git a/examples/socat-nonhttpd-cert-client.sh b/examples/socat-nonhttpd-cert-client.sh
       @@ -0,0 +1,4 @@
       +#!/bin/sh
       +
       +socat stdio openssl-connect:localhost:4433,cert=client.pem,cafile=server.crt
       +
 (DIR) diff --git a/examples/socat-nonhttpd-cert.sh b/examples/socat-nonhttpd-cert.sh
       @@ -0,0 +1,5 @@
       +#!/bin/sh
       +
       +socat openssl-listen:4433,reuseaddr,fork,cert=server.pem,cafile=client.crt \
       +        exec:/usr/bin/nonhttpd
       +
 (DIR) diff --git a/examples/socat-nonhttpd-ssl-client.sh b/examples/socat-nonhttpd-ssl-client.sh
       @@ -0,0 +1,4 @@
       +#!/bin/sh
       +
       +socat stdio openssl-connect:localhost:4433,verify=0
       +
 (DIR) diff --git a/examples/socat-nonhttpd-ssl.sh b/examples/socat-nonhttpd-ssl.sh
       @@ -0,0 +1,5 @@
       +#!/bin/sh
       +
       +socat openssl-listen:4433,reuseaddr,fork,cert=server.pem,verify=0 \
       +        exec:/usr/bin/nonhttpd
       +
 (DIR) diff --git a/examples/socat-nonhttpd.sh b/examples/socat-nonhttpd.sh
       @@ -0,0 +1,4 @@
       +#!/bin/sh
       +
       +socat tcp-l:8080,reuseaddr,fork exec:/usr/bin/nonhttpd
       +