ietf-openpgp
[Top] [All Lists]

Re: Tailing whitespace, armor lines, and clearsigned messages

2002-03-21 15:19:18

David Shaw writes:
Now here's the part I don't quite get - if it is okay to allow
trailing whitespace in the message contents, why is it not okay to
allow trailing whitespace after the armor header?

The reason for specifying the treatment of trailing whitespace in the
message contents is because that portion is hashed.  What the spec
means here is that trailing whitespace is not included in the hash.
The BEGIN line is not hashed so there is no need to say what to do with
trailing whitespace there.

Technically an implementation could reject messages with trailing
whitespace on the BEGIN line.  However this would violate the principle
of "be liberal in what you accept and conservative in what you send".
The right thing to do, according to this principle, is to create the BEGIN
line with no trailing whitespace, and to ignore any trailing whitespace
on incoming BEGIN lines.

Hal

<Prev in Thread] Current Thread [Next in Thread>