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

Richard Barnes <rlb@ipv.sx> Tue, 13 January 2015 11:35 UTC

Return-Path: <rlb@ipv.sx>
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 0945C1A8A8F for <jose@ietfa.amsl.com>; Tue, 13 Jan 2015 03:35:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level:
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 cH4ElRr5gjN6 for <jose@ietfa.amsl.com>; Tue, 13 Jan 2015 03:35:39 -0800 (PST)
Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3B0661A8A8B for <jose@ietf.org>; Tue, 13 Jan 2015 03:35:39 -0800 (PST)
Received: by mail-lb0-f175.google.com with SMTP id z11so2059107lbi.6 for <jose@ietf.org>; Tue, 13 Jan 2015 03:35:37 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Ukb24NErWXZNifR0YRKWYNAwwBvwkUB2jHsH8wwQx0s=; b=E+GYq3FtRlPyxLAEbQExoLycl41JZuJYW4HY81jrYRttSefwZ5LfRfRymCLUGgThlr nnsP2f0kxN1kx4Z4DQpvBwjq8naAJPuiKkO1Zw+ftQJzcg3puBGyI4ZZPbW0T7ZFo59K WtCETX0ItN2smALPHwArZMMZzZVJc6x2bdR38cQncsjvfeVbWWqbm+GviFUEkZHjntlB ZkLdRecTYWy4ufL6I31TuGzUGmsqAwlWwR8hz6M7MvOGUdrH7VTddwXaDGQtUO0MSV1k XVXflNIcGN/5puMfJiWHz9rhAYjgChdDEQOd3C+xJvLnMgRgYvoYF326Ui8QnJoUHIvg WUuA==
X-Gm-Message-State: ALoCoQmxVAUPhcO1IfseNj3Yo/f/YgJGMqW2S7FORjc6+4ecLLJtViheLooTQnGsMi3jgoYPua20
MIME-Version: 1.0
X-Received: by 10.112.47.135 with SMTP id d7mr41599758lbn.54.1421148937690; Tue, 13 Jan 2015 03:35:37 -0800 (PST)
Received: by 10.25.12.215 with HTTP; Tue, 13 Jan 2015 03:35:37 -0800 (PST)
In-Reply-To: <54B4ED80.2060501@gmail.com>
References: <54B4ED80.2060501@gmail.com>
Date: Tue, 13 Jan 2015 11:35:37 +0000
Message-ID: <CAL02cgRQEnM+d4CnwxR=HL1QOQbS6fQyU894spv2Wj-zFhi4Hg@mail.gmail.com>
From: Richard Barnes <rlb@ipv.sx>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
Content-Type: multipart/alternative; boundary="001a1134d2e69ab3e1050c870584"
Archived-At: <http://mailarchive.ietf.org/arch/msg/jose/tPDY-CpVsW4BEgYj37HGI4P31_M>
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 11:35:42 -0000

On Tuesday, January 13, 2015, Anders Rundgren <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"]')

--Richard



>
> Cheers
> Anders
>
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://www.ietf.org/mailman/listinfo/jose
>