Delete duplicate entry.
[openssl.git] / ssl / t1_lib.c
index 741f10283112c01db15b15aca76659e4e6c72f32..d7f5f907123825b5efb1944fd34b0d8b10840806 100644 (file)
@@ -1472,6 +1472,22 @@ unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned cha
        s2n(TLSEXT_TYPE_encrypt_then_mac,ret);
        s2n(0,ret);
 #endif
+#ifdef TLSEXT_TYPE_wtf
+       {
+       /* Work out length which would be used in the TLS record:
+        * NB this should ALWAYS appear after all other extensions.
+        */
+       int hlen = ret - (unsigned char *)s->init_buf->data - 3;
+       if (hlen > 0xff && hlen < 0x200)
+               {
+               hlen = 0x200 - hlen;
+               s2n(TLSEXT_TYPE_wtf,ret);
+               s2n(hlen,ret);
+               memset(ret, 0, hlen);
+               ret += hlen;
+               }
+       }
+#endif
 
        if ((extdatalen = ret-p-2) == 0)
                return p;