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

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