Re: Base64 and line breaks
Chris Newman <[email protected]> Mon, 19 May 2003 17:57:09 -0700
| Newsgroups | gmane.ietf.beep |
|---|---|
| Message-ID | <[email protected]> |
Actually most of the SASL profiles which use base64 encoding do not permit line
breaks in the format.
This includes RFC 3501, 1734, 2554, etc.
For example, RFC 3501 has this ABNF:
-----
authenticate = "AUTHENTICATE" SP auth-type *(CRLF base64)
auth-type = atom
; Defined by [SASL]
base64 = *(4base64-char) [base64-terminal]
base64-char = ALPHA / DIGIT / "+" / "/"
; Case-sensitive
base64-terminal = (2base64-char "==") / (3base64-char "=")
-----
So I could argue that the failure to explicitly include the ABNF for the base64
left the specification ambiguous and it should be clarified to be consistent
with other protocols that base64 encode the SASL exchange.
But if there's deployed Java code which generates unnecessary characters in the
base64 stream, perhaps it's too late to make it consistent with other protocols
and we just need to document the more permissive syntax for BEEP...
- Chris
begin quotation by Tony Hansen on 2003/5/19 15:55 -0400:
> The base64 spec requires that any characters that are not in the base64
> alphabet are to be ignored and allows such characters to be inserted anywhere
> in the stream. That includes line breaks. (Your C side is wrong.)
>
> Tony Hansen
> [email protected]
>
> Paul Andrews wrote:
>> Hi,
>>
>> I'm running into an interoperability problem regarding the base64
>> encoding of blob data during a SASL profile exchange. One side (the Java
>> side) is using the mime encoding rules and inserting a line break after
>> every 76 characters of base64 encoded data. The other side (the C side)
>> is expecting a continuous stream of base64 data with no line breaks.
>>
>> Which side is right (the BEEP RFC simply states that blob data must be
>> base64 encoded for SASL exchanges, it doesn't say whether the blob
>> should follow mime rules for that data or not)?
>
> _______________________________________________
> BEEPwg mailing list
> [email protected]
> http://lists.beepcore.org/mailman/listinfo/beepwg