New functions and option to use NEW in certificate requests.
[openssl.git] / apps / s_server.c
index ac86a8ab4dd31b97f6b909c86763bbd98ef4f7ec..a92db5cd1bfdafcb894f28d63cd1cbccff0fc7b5 100644 (file)
@@ -239,7 +239,7 @@ static void sv_usage(void)
 #ifndef NO_DH
        BIO_printf(bio_err," -no_dhe       - Disable ephemeral DH\n");
 #endif
-       BIO_printf(bio_err," -bugs         - Turn on SSL bug compatability\n");
+       BIO_printf(bio_err," -bugs         - Turn on SSL bug compatibility\n");
        BIO_printf(bio_err," -www          - Respond to a 'GET /' with a status page\n");
        BIO_printf(bio_err," -WWW          - Respond to a 'GET /<path> HTTP/1.0' with file ./<path>\n");
        }
@@ -397,6 +397,8 @@ static int ebcdic_puts(BIO *bp, char *str)
 }
 #endif
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char *argv[])
        {
        short port=PORT;
@@ -605,7 +607,7 @@ bad:
                }
 
        SSL_load_error_strings();
-       SSLeay_add_ssl_algorithms();
+       OpenSSL_add_ssl_algorithms();
 
        ctx=SSL_CTX_new(meth);
        if (ctx == NULL)
@@ -698,7 +700,7 @@ bad:
 
        if (cipher != NULL)
                if(!SSL_CTX_set_cipher_list(ctx,cipher)) {
-               BIO_printf(bio_err,"error seting cipher list\n");
+               BIO_printf(bio_err,"error setting cipher list\n");
                ERR_print_errors(bio_err);
                goto end;
        }
@@ -782,7 +784,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
 #endif
 
        if (con == NULL) {
-               con=(SSL *)SSL_new(ctx);
+               con=SSL_new(ctx);
                if(context)
                      SSL_set_session_id_context(con, context,
                                                 strlen((char *)context));
@@ -1150,7 +1152,7 @@ static int www_body(char *hostname, int s, unsigned char *context)
        /* lets make the output buffer a reasonable size */
        if (!BIO_set_write_buffer_size(io,bufsize)) goto err;
 
-       if ((con=(SSL *)SSL_new(ctx)) == NULL) goto err;
+       if ((con=SSL_new(ctx)) == NULL) goto err;
        if(context) SSL_set_session_id_context(con, context,
                                               strlen((char *)context));
 
@@ -1448,7 +1450,7 @@ end:
        /* make sure we re-use sessions */
        SSL_set_shutdown(con,SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN);
 #else
-       /* This kills performace */
+       /* This kills performance */
 /*     SSL_shutdown(con); A shutdown gets sent in the
  *     BIO_free_all(io) procession */
 #endif