Re: [jose] "x5c" - JSON Compatible?

Mike Jones <Michael.Jones@microsoft.com> Tue, 13 January 2015 18:33 UTC

Return-Path: <Michael.Jones@microsoft.com>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 91E721A9034 for <jose@ietfa.amsl.com>; Tue, 13 Jan 2015 10:33:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 51YX5zK3AaQv for <jose@ietfa.amsl.com>; Tue, 13 Jan 2015 10:33:50 -0800 (PST)
Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0113.outbound.protection.outlook.com [65.55.169.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 595151A902F for <jose@ietf.org>; Tue, 13 Jan 2015 10:33:50 -0800 (PST)
Received: from BY2PR03CA074.namprd03.prod.outlook.com (10.141.249.47) by BY1PR0301MB1205.namprd03.prod.outlook.com (25.161.203.154) with Microsoft SMTP Server (TLS) id 15.1.59.20; Tue, 13 Jan 2015 18:33:47 +0000
Received: from BN1BFFO11FD024.protection.gbl (2a01:111:f400:7c10::1:152) by BY2PR03CA074.outlook.office365.com (2a01:111:e400:2c5d::47) with Microsoft SMTP Server (TLS) id 15.1.53.17 via Frontend Transport; Tue, 13 Jan 2015 18:33:48 +0000
Received: from mail.microsoft.com (131.107.125.37) by BN1BFFO11FD024.mail.protection.outlook.com (10.58.144.87) with Microsoft SMTP Server (TLS) id 15.1.49.13 via Frontend Transport; Tue, 13 Jan 2015 18:33:47 +0000
Received: from TK5EX14MBXC287.redmond.corp.microsoft.com ([169.254.2.242]) by TK5EX14HUBC102.redmond.corp.microsoft.com ([157.54.7.154]) with mapi id 14.03.0210.003; Tue, 13 Jan 2015 18:33:10 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
Thread-Topic: [jose] "x5c" - JSON Compatible?
Thread-Index: AQHQLxhCM1/fN/n2b0mOsciOpTn2bpy96+mAgAAKoQCAAE37AIAAGviw
Date: Tue, 13 Jan 2015 18:33:09 +0000
Message-ID: <4E1F6AAD24975D4BA5B16804296739439BC6C0D3@TK5EX14MBXC287.redmond.corp.microsoft.com>
References: <54B4ED80.2060501@gmail.com> <CAL02cgRQEnM+d4CnwxR=HL1QOQbS6fQyU894spv2Wj-zFhi4Hg@mail.gmail.com> <54B50BF4.5080709@gmail.com> <CAEnTvdA853xqpzJb0_Skjbg1RT3zngAwzU6iEiB0OQzDP5hUVQ@mail.gmail.com>
In-Reply-To: <CAEnTvdA853xqpzJb0_Skjbg1RT3zngAwzU6iEiB0OQzDP5hUVQ@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [157.54.51.32]
Content-Type: multipart/alternative; boundary="_000_4E1F6AAD24975D4BA5B16804296739439BC6C0D3TK5EX14MBXC287r_"
MIME-Version: 1.0
X-EOPAttributedMessage: 0
Received-SPF: Pass (protection.outlook.com: domain of microsoft.com designates 131.107.125.37 as permitted sender) receiver=protection.outlook.com; client-ip=131.107.125.37; helo=mail.microsoft.com;
Authentication-Results: spf=pass (sender IP is 131.107.125.37) smtp.mailfrom=Michael.Jones@microsoft.com;
X-Forefront-Antispam-Report: CIP:131.107.125.37; CTRY:US; IPV:CAL; IPV:NLI; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(438002)(377454003)(24454002)(199003)(377424004)(189002)(106466001)(81156004)(46102003)(106116001)(33656002)(19625215002)(26826002)(16236675004)(97736003)(54356999)(76176999)(93886004)(16601075003)(50986999)(64706001)(86612001)(66066001)(69596002)(19580405001)(6806004)(84326002)(87936001)(2656002)(19617315012)(104016003)(512874002)(86362001)(68736005)(102836002)(15975445007)(2950100001)(2920100001)(92566002)(55846006)(110136001)(15974865002)(19580395003)(19300405004)(77156002)(62966003)(2900100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR0301MB1205; H:mail.microsoft.com; FPR:; SPF:Pass; MLV:ovrnspm; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en;
X-DmarcStatus-Test: Passed
X-DmarcAction-Test: None
X-Microsoft-Antispam: UriScan:;
X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(3003003)(3005003); SRVR:BY1PR0301MB1205;
X-O365ENT-EOP-Header: Message processed by - O365_ENT: Allow from ranges (Engineering ONLY)
X-Exchange-Antispam-Report-Test: UriScan:;
X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:BY1PR0301MB1205;
X-Forefront-PRVS: 045584D28C
X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:; SRVR:BY1PR0301MB1205;
X-OriginatorOrg: microsoft.onmicrosoft.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2015 18:33:47.3222 (UTC)
X-MS-Exchange-CrossTenant-Id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=72f988bf-86f1-41af-91ab-2d7cd011db47; Ip=[131.107.125.37]
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0301MB1205
Archived-At: <http://mailarchive.ietf.org/arch/msg/jose/BzMqRu5Qv5n1tG8aJ7EHf_tzhUY>
Cc: "jose@ietf.org" <jose@ietf.org>
Subject: Re: [jose] "x5c" - JSON Compatible?
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Javascript Object Signing and Encryption <jose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jose>, <mailto:jose-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/jose/>
List-Post: <mailto:jose@ietf.org>
List-Help: <mailto:jose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jose>, <mailto:jose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 13 Jan 2015 18:33:53 -0000

We should add the standard disclaimer “(with line breaks within values for display purposes only)” to the description of the example.

                                                            -- Mike

From: jose [mailto:jose-bounces@ietf.org] On Behalf Of Mark Watson
Sent: Tuesday, January 13, 2015 8:53 AM
To: Anders Rundgren
Cc: Richard Barnes; jose@ietf.org
Subject: Re: [jose] "x5c" - JSON Compatible?



On Tue, Jan 13, 2015 at 4:13 AM, Anders Rundgren <anders.rundgren.net@gmail.com<mailto:anders.rundgren.net@gmail.com>> wrote:
On 2015-01-13 12:35, Richard Barnes wrote:


On Tuesday, January 13, 2015, Anders Rundgren <anders.rundgren.net@gmail.com<mailto:anders.rundgren.net@gmail.com> <mailto:anders.rundgren.net@gmail.com<mailto:anders.rundgren.net@gmail.com>>> wrote:

    The spec claims the following:

       "Note that since these strings contain base64 encoded
       (not base64url encoded) values, they are allowed to contain
       white space and line breaks."

    Is this really JSON compliant?

    I didn't interpret the JSON spec in that way and Python and Chrome seems to agree with me.

    What's I'm missing here?


Are you seriously suggesting that JSON strings can't contain white space?

Control characters have to be escaped, but they can definitely be there.

JSON.parse('["this is...\\u000A...a string"]')

Sure, but the example in appendix B wouldn't parse.
Shouldn't a proper text say that possible line-breaks MUST be properly escaped.

​Line breaks in JSON do have to be escaped, either as above or with \r \n. This is clear at www.json.org<http://www.json.org>.

…Mark​



Anders

--Richard


    Cheers
    Anders

    _________________________________________________
    jose mailing list
    jose@ietf.org<mailto:jose@ietf.org>
    https://www.ietf.org/mailman/__listinfo/jose <https://www.ietf.org/mailman/listinfo/jose>

_______________________________________________
jose mailing list
jose@ietf.org<mailto:jose@ietf.org>
https://www.ietf.org/mailman/listinfo/jose