define USE_SOCKETS so sys/param.h gets included (and thusly, MAXHOSTNAMELEN
[openssl.git] / ssl / ssltest.c
index 035a4d2deb71f0ec4a188fc9f59801a31ba18ef6..978516f1b7b9bbdf7d04d31f52c29fac46d02e9a 100644 (file)
 #include <string.h>
 #include <time.h>
 
+#define USE_SOCKETS
 #include "e_os.h"
 
 #include <openssl/bio.h>
@@ -385,7 +386,9 @@ int main(int argc, char *argv[])
        verbose = 0;
        debug = 0;
        cipher = 0;
-       
+
+       bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); 
+
        CRYPTO_set_locking_callback(lock_dbg_cb);
 
        /* enable memory leak checking unless explicitly disabled */
@@ -403,7 +406,6 @@ int main(int argc, char *argv[])
 
        RAND_seed(rnd_seed, sizeof rnd_seed);
 
-       bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
        bio_stdout=BIO_new_fp(stdout,BIO_NOCLOSE);
 
        argc--;
@@ -563,7 +565,7 @@ bad:
                        "the test anyway (and\n-d to see what happens), "
                        "or add one of -ssl2, -ssl3, -tls1, -reuse\n"
                        "to avoid protocol mismatch.\n");
-               exit(1);
+               EXIT(1);
                }
 
        if (print_time)
@@ -765,7 +767,7 @@ bad:
                        if(strlen(localhost) == sizeof localhost-1)
                                {
                                BIO_printf(bio_err,"localhost name too long\n");
-                               got end;
+                               goto end;
                                }
                        kssl_ctx_setstring(c_ssl->kssl_ctx, KSSL_SERVER,
                                 localhost);