ietf-openpgp
[Top] [All Lists]

Re: Proposed reason-for-revocation subpacket

1998-06-01 12:49:55
On Mon, 1 Jun 1998, Jon Callas wrote:

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.

Zero is not the empty set.  A zero length means no string, and a length of
1 would imply an empty but extant string.

I use the distinction for secret v.s. public keys - NULL means I want a
public key, "" means a non-passphrased secret key (or prompt if there is a
passphrase), and "passphrase" means a passphrase protected secret key. 

Since (almost) nothing else is null terminated, I would prefer
consistency.

--- reply to tzeruch - at - ceddec - dot - com ---