Blame SOURCES/openssl-1.0.2a-xmpp-starttls.patch

557317
diff -up openssl-1.0.2a/apps/s_client.c.starttls openssl-1.0.2a/apps/s_client.c
557317
--- openssl-1.0.2a/apps/s_client.c.starttls	2015-04-22 18:23:12.964387157 +0200
557317
+++ openssl-1.0.2a/apps/s_client.c	2015-04-22 18:23:56.496414820 +0200
557317
@@ -134,7 +134,8 @@
557317
  * OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR
557317
  * OTHERWISE.
557317
  */
557317
-
557317
+/* for strcasestr */
557317
+#define _GNU_SOURCE
557317
 #include <assert.h>
557317
 #include <ctype.h>
557317
 #include <stdio.h>
557317
@@ -1626,8 +1627,11 @@ int MAIN(int argc, char **argv)
557317
                    "xmlns='jabber:client' to='%s' version='1.0'>", host);
557317
         seen = BIO_read(sbio, mbuf, BUFSIZZ);
557317
         mbuf[seen] = 0;
557317
-        while (!strstr
557317
-               (mbuf, "
557317
+        while (!strcasestr
557317
+               (mbuf, "
557317
+               && !strcasestr(mbuf,
557317
+                              "
557317
+        {
557317
             if (strstr(mbuf, "/stream:features>"))
557317
                 goto shut;
557317
             seen = BIO_read(sbio, mbuf, BUFSIZZ);