Don't use ciphersuites for inflating the ClientHello in clienthellotest
[openssl.git] / test / handshake_helper.c
index 322957ad89ebe1c570c4ad008935f409c66658f2..dc020d90273a1ee6cf1ef9bb252effcf9c9635ea 100644 (file)
 #include <openssl/srp.h>
 #endif
 
-#ifndef OPENSSL_NO_SOCK
-# define USE_SOCKETS
-# include "internal/nelem.h"
-#endif
-
+#include "internal/sockets.h"
+#include "internal/nelem.h"
 #include "handshake_helper.h"
 #include "testutil.h"
 
@@ -156,7 +153,7 @@ static int early_select_server_ctx(SSL *s, void *arg, int ignore)
         remaining <= 2)
         return 0;
     /* Extract the length of the supplied list of names. */
-    len = (*(p++) << 1);
+    len = (*(p++) << 8);
     len += *(p++);
     if (len + 2 != remaining)
         return 0;
@@ -171,7 +168,7 @@ static int early_select_server_ctx(SSL *s, void *arg, int ignore)
     /* Now we can finally pull out the byte array with the actual hostname. */
     if (remaining <= 2)
         return 0;
-    len = (*(p++) << 1);
+    len = (*(p++) << 8);
     len += *(p++);
     if (len + 2 > remaining)
         return 0;