From owner-freebsd-ports-bugs@freebsd.org Mon Jun 5 20:55:19 2017 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15275B7A4E8 for ; Mon, 5 Jun 2017 20:55:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 026406A92C for ; Mon, 5 Jun 2017 20:55:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v55KtIaQ037874 for ; Mon, 5 Jun 2017 20:55:18 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 219805] openssl s_client and xmpp Date: Mon, 05 Jun 2017 20:55:19 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: fbsd98816551@avksrv.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jun 2017 20:55:19 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219805 Bug ID: 219805 Summary: openssl s_client and xmpp Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: fbsd98816551@avksrv.org Hello! I tried t check SSL cert from XMPP server. Acording to documentaion command like=20 /usr/local/bin/openssl s_client -servername "xmpp.google.com" -connect "xmpp.google.com":"5222" -starttls "xmpp" will connect to XMPP server start TLS sessiona and return the SSL cert to STDOUT. But under FreeBSD I got the error instead CONNECTED(00000004) --- no peer certificate available --- No client certificate CA names sent --- SSL handshake has read 385 bytes and written 120 bytes --- New, (NONE), Cipher is (NONE) Secure Renegotiation IS NOT supported Compression: NONE Expansion: NONE No ALPN negotiated When I tried run same command under Fedora, it returns expected cert. FreeBSD version from ports: /usr/local/bin/openssl version OpenSSL 1.0.2l 25 May 2017 and Fedora: OpenSSL 1.0.2k-fips 26 Jan 2017 If we check the SRPM from fedora package, we will see patch openssl-1.0.2a-xmpp-starttls.patch=20 --- openssl-1.0.2a/apps/s_client.c.starttls 2015-04-22 18:23:12.964387157 +0200 +++ openssl-1.0.2a/apps/s_client.c 2015-04-22 18:23:56.496414820 +0200 @@ -134,7 +134,8 @@ * OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR * OTHERWISE. */ - +/* for strcasestr */ +#define _GNU_SOURCE #include #include #include @@ -1626,8 +1627,11 @@ int MAIN(int argc, char **argv) "xmlns=3D'jabber:client' to=3D'%s' version=3D'1.0'>", h= ost); seen =3D BIO_read(sbio, mbuf, BUFSIZZ); mbuf[seen] =3D 0; - while (!strstr - (mbuf, "")) goto shut; seen =3D BIO_read(sbio, mbuf, BUFSIZZ); --- and we can see same changes in 1.1 (not 1.0.X) open SSL tree in the GIT (5 years ago!) https://github.com/openssl/openssl/commit/4e48c77572a9a96a301e362a3646cd3cc= 7eca0f9 They simple added second check with extra " in the string fedora patch also added non case sens. test. Can we merge such simple patch to the ports tree ? --=20 You are receiving this mail because: You are the assignee for the bug.=