ietf-openpgp
[Top] [All Lists]

Re: Proposed reason-for-revocation subpacket

1998-06-02 06:45:31
At 11:33 01.06.98 -0700, Jon Callas wrote:
At 11:57 PM 5/29/98 -0700, Bill Stewart wrote:

  Null-terminating the string would be a nice touch; it's not necessary,
  since there's a length field, but it would probably reduce accidents,
  and it also makes it convenient for tools such as "strings" to find.

Bill, I didn't mean to ignore your comment in my comment I just sent.
Obviously, I needed another cup of coffee this morning. How nice is it to
make it null-terminated?

With counted strings, someone has to go and terminate them anyway, and the
only place where a null-terminated string is specified in the whole draft
is in the regular expression subpacket (and I don't know why it's there). 

When I put on my developer's hat, I look at it and think that I'd write to
code to look at the length of the subpacket, and if it's greater than 1,
then I have text. If the string is null-terminated, how do I handle the
bizarre case of a specified comment that is a null string? Do I treat it
the same as no specified string, or as a blank comment? There's an easy
answer (treat it as no comment), but the question goes away if we just use
the count.

The SNMPv3 group just had a dustup where they had an example where
the text said that it was a hash over "tanstaafl", while the example
hash was actually computed over "tanstaafl\0".

If you go with counted strings, null terminators are just trouble, IMHO.

Besides, what is the meaning of (len=12)"tan\0staafl\0" if you do
both NULL termination and bytecounts?

Take care,

                   Harald A

-- 
Harald Tveit Alvestrand, Maxware, Norway
Harald(_dot_)Alvestrand(_at_)maxware(_dot_)no