delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=nV1QrSJQU2kcEnqiVLbyC7+Y1COGRwBvavQx/wYP/JnsiC4ew+P+o | |
8D8Gu/jL/Ut2suTqy2WHwagb4UUNeGDqdq+tMFsQ6ZrR3zIpTiybwm9+PDcO7g2Z | |
XOtEYO2gI5Ggkts04URLNQlYVY9aNVTTKqK8riPKcjf0AjBsKV2uwc= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=z/hpArXU0osxrm73LJGSL194xbY=; b=YGrDn8ZcGiBWAYwKSWhhknkmNEMO | |
Zf3yiRu5s2mYp0wHBz16/K1mo7+mHb8gm8xS0uEKuScJYmP2IJyixrZjocmwuAQC | |
tghc3sNstaWJhk2LLMyvhR1QFzuVqKPdy3ue4ZRwo2VR69bF2uUb8DqEBw3NyPLk | |
O6LXBW/+JV6vFOc= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Spam-SWARE-Status: | No, score=-98.9 required=5.0 tests=BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,UNSUBSCRIBE_BODY autolearn=ham version=3.3.2 spammy=openssl-1.1.1a, o_text, BIO, bio |
X-HELO: | mout.kundenserver.de |
Date: | Fri, 15 Feb 2019 11:22:51 +0100 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: textmode for stdout, what is "correct" now? |
Message-ID: | <20190215102251.GA2702@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <739ed5ce-6902-d702-e152-65dc2c1da667 AT ssi-schaefer DOT com> <20190214162002 DOT GA4950 AT calimero DOT vinschen DOT de> <6aa280c2-4769-0772-91d9-c73a3a3d9680 AT ssi-schaefer DOT com> |
MIME-Version: | 1.0 |
In-Reply-To: | <6aa280c2-4769-0772-91d9-c73a3a3d9680@ssi-schaefer.com> |
User-Agent: | Mutt/1.10.1 (2018-07-13) |
--2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Feb 15 08:56, Michael Haubenwallner wrote: > On 2/14/19 5:20 PM, Corinna Vinschen wrote: > > On Feb 14 16:23, Michael Haubenwallner wrote: > >> Hi, > >> > >> so I find myself struggling with textmode versus binmode for stdio aga= in. > >> > >> Running the openssl command (from within the apps/ build directory her= e) does > >> yield different results regarding carriage return depending on the ver= sion: > >> > >> $ ./apps/openssl version > >> OpenSSL 1.0.2p 14 Aug 2018 > >> $ ./apps/openssl x509 -hash -noout -in /etc/pki/tls/cert.pem | xxd > >> 00000000: 6139 3464 3039 6535 0a a94d09e5. > >> > >> > >> $ ./apps/openssl version > >> OpenSSL 1.1.0j 20 Nov 2018 > >> $ ./apps/openssl x509 -hash -noout -in /etc/pki/tls/cert.pem | xxd > >> 00000000: 6139 3464 3039 6535 0d0a a94d09e5.. > >> > >> Some subsequent shell script does create wrong symlink filenames > >> (with embedded CR) when used with openssl-1.1.x. > >> > >> The commit that changed this behaviour in openssl-1.1 is: > >> https://github.com/openssl/openssl/commit/bdd58d98467e9f0f6635c1628e1e= ae304383afb1 > >> > >> >From an openssl developer's point of view, I can understand to set > >> textmode when the intent is to output some text, and to set > >> binmode when the intent is to output some binary data. > >=20 > > How do you create \r\n in this case? The upstream patch never > > adds the explicit 't' flag. It only adds 'b' or nothing. So > > the output should be \n only unless you write to a file on a > > text mode mount. What am I missing? >=20 > Down the line in their BIO module they do use setmode(fd, O_TEXT), > which is the one that does introduce the \r, as far as I know. This one is not so nice. Somebody should tell upstream we only want explicit O_BINARY these days, but no explicit O_TEXT. > The backtrace in openssl-1.1.1a in this use case is: > [...] > >> Question now is: These days, what is the correct way to handle this? Telling upstream not to use O_TEXT on Cygwin in the first place, I think. For scripting, d2u should help. Corinna --=20 Corinna Vinschen Cygwin Maintainer --2fHTh5uZTiUOsy+g Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlxmkvoACgkQ9TYGna5E T6AJ7A/9HcaqWAMYvcjAET1xK0UyGe2kfU8GuTwOk3W/Nq+UOkW47cmmdiEjTYL9 Y6fj2nETLg3Dh+l3V1j996KqDhSSV1aiS4bIoqLjk7ZhFNRGxseb2YUgP6FY/NAl DvZsoIYL83rzTRK9vDQhQaHJ3xpFy32Snj7tZz3Y1jKwiZUCsJvN11NdTOqwLZ2R Qi1YrZTlodGwaoh/cxSHfrk4drqo+VbGbHA4ZCXUPdyDhI8JoQulAWLMLFkSpDMM Tf2OVLfaTHQ81w4Gy/Oo9loxGpyYwKFE0lJo+00EZqs5wmbDZQTqCFfh5E4Tsacz jMqbTBbu+BIFVO/VFeu4ptUjZv3zggpBa5Ryxu7+hoUxstvQ7tjO82n206OZRWJY wpFgqRHgzITWfXxu+Vg20KHQkH87bquM8IBbEaPQ1smuvK4KH+W43WMR2r2QNyvz uV455mzshnHy+AwPHplOB1DEN7/37cxfLhGmOijr9Q4V5e2glJciaqlVE69umeW6 yvQsu4uBoWrqIGbEV6isAafu2VcL03bu/TWmCxpJJw/eywd2BAjrKmNn//cYW1cQ 8wfVnY3OwmMPSYipvG1Pp+aY1hJjeVPjQFOkt8yXnGpb1nsTnFgr/rCK0d71xIeo PpwKpyRszIXv9b+0mtcxrM454MziewwhMiinM96eE+kukP1BdJY= =aiFK -----END PGP SIGNATURE----- --2fHTh5uZTiUOsy+g--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |