On 2015-01-13 19:33, Mike Jones wrote:
We should add the standard disclaimer “(with line breaks within values for 
display purposes only)” to the description of the example.

Hi Mike,
I would consider something along these lines since Base64 differs from
the other elements:

   The JSON array below is an example of a certificate chain that could
   be used as the value of an "x5c" (X.509 Certificate Chain) Header
   Parameter, per Section 4.1.6.  Note that since these strings contain
   base64 encoded (not base64url encoded) values, they are allowed to
   contain white space and line breaks but JSON [RFC7159] character
   escape rules MUST still be honored.  In the example line breaks
   were added for display purposes only.

     ["MIIE3jCCA8agAwIBAgICAwEwDQYJKoZIhvcNAQEFBQAwYzELMAkGA1UEBhMCVVM
       xITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR2
       8gRGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExM


Anders


                                                             -- Mike

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

On Tue, Jan 13, 2015 at 4:13 AM, Anders Rundgren <[email protected] 
<mailto:[email protected]>> wrote:

On 2015-01-13 12:35, Richard Barnes wrote:



On Tuesday, January 13, 2015, Anders Rundgren <[email protected] 
<mailto:[email protected]> <mailto:[email protected] 
<mailto:[email protected]>>> 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
    [email protected] <mailto:[email protected]>
    https://www.ietf.org/mailman/__listinfo/jose 
<https://www.ietf.org/mailman/listinfo/jose>


    _______________________________________________
    jose mailing list
    [email protected] <mailto:[email protected]>
    https://www.ietf.org/mailman/listinfo/jose


_______________________________________________
jose mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/jose

Reply via email to