push the flags too
[openssl.git] / ssl / ssltest.c
index 39bfd67ae4ac1cd56e130aa8842f58564b3d4f90..77ac362c814bd0b60129252bdfdd7202aca2b92a 100644 (file)
@@ -74,6 +74,7 @@
 #include <openssl/err.h>
 #include <openssl/rand.h>
 #ifdef WINDOWS
+#include <winsock.h>
 #include "../crypto/bio/bss_file.c"
 #endif
 
@@ -228,7 +229,7 @@ int main(int argc, char *argv[])
        int print_time = 0;
        clock_t s_time = 0, c_time = 0;
        int comp = 0;
-       COMP_METHOD *cm;
+       COMP_METHOD *cm = NULL;
 
        verbose = 0;
        debug = 0;
@@ -398,11 +399,14 @@ bad:
                if (cm->type != NID_undef)
                        SSL_COMP_add_compression_method(comp, cm);
                else
+                       {
                        fprintf(stderr,
                                "Warning: %s compression not supported\n",
                                (comp == COMP_RLE ? "rle" :
                                        (comp == COMP_ZLIB ? "zlib" :
                                                "unknown")));
+                       ERR_print_errors_fp(stderr);
+                       }
                }
 
 #if !defined(NO_SSL2) && !defined(NO_SSL3)
@@ -514,6 +518,19 @@ bad:
        c_ssl=SSL_new(c_ctx);
        s_ssl=SSL_new(s_ctx);
 
+#ifndef NO_KRB5
+       if (c_ssl  &&  c_ssl->kssl_ctx)
+                {
+                char   localhost[257];
+
+               if (gethostname(localhost, 256) == 0)
+                        {
+                       kssl_ctx_setstring(c_ssl->kssl_ctx, KSSL_SERVER,
+                                localhost);
+                       }
+               }
+#endif    /* NO_KRB5  */
+
        for (i=0; i<number; i++)
                {
                if (!reuse) SSL_set_session(c_ssl,NULL);