X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fstream.c;h=db6ec61bb443aaebf212a4118f7d3224f908e9a0;hb=1e86ae6f51bcc91d2fa36e4154bc6e540251eaf8;hp=d4f5de29ee3586a3e3ba6cf0290fd85f0ff2b1d6;hpb=539e96f62300e4afab00e5906a28e3b89301d62e;p=openvswitch diff --git a/lib/stream.c b/lib/stream.c index d4f5de29..db6ec61b 100644 --- a/lib/stream.c +++ b/lib/stream.c @@ -48,11 +48,17 @@ enum stream_state { static struct stream_class *stream_classes[] = { &tcp_stream_class, &unix_stream_class, +#ifdef HAVE_OPENSSL + &ssl_stream_class, +#endif }; static struct pstream_class *pstream_classes[] = { &ptcp_pstream_class, &punix_pstream_class, +#ifdef HAVE_OPENSSL + &pssl_pstream_class, +#endif }; /* Check the validity of the stream class structures. */ @@ -95,7 +101,8 @@ check_stream_classes(void) /* Prints information on active (if 'active') and passive (if 'passive') * connection methods supported by the stream. */ void -stream_usage(const char *name, bool active, bool passive) +stream_usage(const char *name, bool active, bool passive, + bool bootstrap OVS_UNUSED) { /* Really this should be implemented via callbacks into the stream * providers, but that seems too heavy-weight to bother with at the @@ -106,6 +113,10 @@ stream_usage(const char *name, bool active, bool passive) printf("Active %s connection methods:\n", name); printf(" tcp:IP:PORT " "PORT at remote IP\n"); +#ifdef HAVE_OPENSSL + printf(" ssl:IP:PORT " + "SSL PORT at remote IP\n"); +#endif printf(" unix:FILE " "Unix domain socket named FILE\n"); } @@ -114,9 +125,24 @@ stream_usage(const char *name, bool active, bool passive) printf("Passive %s connection methods:\n", name); printf(" ptcp:PORT[:IP] " "listen to TCP PORT on IP\n"); +#ifdef HAVE_OPENSSL + printf(" pssl:PORT[:IP] " + "listen for SSL on PORT on IP\n"); +#endif printf(" punix:FILE " "listen on Unix domain socket FILE\n"); } + +#ifdef HAVE_OPENSSL + printf("PKI configuration (required to use SSL):\n" + " -p, --private-key=FILE file with private key\n" + " -c, --certificate=FILE file with certificate for private key\n" + " -C, --ca-cert=FILE file with peer CA certificate\n"); + if (bootstrap) { + printf(" --bootstrap-ca-cert=FILE file with peer CA certificate " + "to read or create\n"); + } +#endif } /* Attempts to connect a stream to a remote peer. 'name' is a connection name