Fix various typos.
[openssl.git] / demos / bio / saccept.c
index 933d6699ee344940c68cdbc6fa6cc39dc14efac4..02479edc032eea6108b0bd87c4c9863395b7d2a0 100644 (file)
@@ -1,13 +1,13 @@
 /* NOCW */
 /* demos/bio/saccept.c */
 
-/* A minimal program to server an SSL connection.
+/* A minimal program to serve an SSL connection.
  * It uses blocking.
  * saccept host:port
  * host is the interface IP to use.  If any interface, use *:port
  * The default it *:4433
  *
- * cc -I../../include saccept.c -L../.. -lssl -lcrypto
+ * cc -I../../include saccept.c -L../.. -lssl -lcrypto -ldl
  */
 
 #include <stdio.h>
@@ -25,14 +25,11 @@ void close_up()
                BIO_free(in);
        }
 
-int main(argc,argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
        {
        char *port=NULL;
        BIO *ssl_bio,*tmp;
        SSL_CTX *ctx;
-       SSL *ssl;
        char buf[512];
        int ret=1,i;
 
@@ -57,13 +54,12 @@ char *argv[];
                goto err;
 
        /* Setup server side SSL bio */
-       ssl=SSL_new(ctx);
        ssl_bio=BIO_new_ssl(ctx,0);
 
        if ((in=BIO_new_accept(port)) == NULL) goto err;
 
-       /* This means that when a new connection is acceptede on 'in',
-        * The ssl_bio will be 'dupilcated' and have the new socket
+       /* This means that when a new connection is accepted on 'in',
+        * The ssl_bio will be 'duplicated' and have the new socket
         * BIO push into it.  Basically it means the SSL BIO will be
         * automatically setup */
        BIO_set_accept_bios(in,ssl_bio);