Re: pgcrypto: PGP armor headers

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgcrypto: PGP armor headers
Date: 2014-09-30 14:45:57
Message-ID: 542AC225.6050209@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 9/30/14 4:37 PM, Heikki Linnakangas wrote:
> On 09/29/2014 05:38 PM, Marko Tiikkaja wrote:
>> Maybe I just suck at $SEARCH_ENGINE, but extracting armor headers
>> programmatically doesn't seem to be very popular. I could only find one
>> example, which returned the last instance of the key. But that seemed
>> to be more an accident than anything else; it wasn't documented and the
>> source code didn't say anything about it. I also think that's the worst
>> behaviour. If we can't agree on concatenation, I'd rather see an error.
>
> May I ask you why you wrote this patch? What are you doing with the headers?

We're sending arbitrary messages between systems over HTTP(S), and a
special header is used to tell the recipient system what type of message
it is. The message types are specific to the domain, but you can think
of them to be roughly equivalent to MIME types.

If what you're trying to get a sense of is why I'd prefer to see
concatenation, I can't really help you. For our use case (and perhaps
for everyone else as well) it would actually make more sense to throw an
error if pgp_armor_header() is used on a key which appears more than
once. The concatenation behaviour was an attempt at a "one size fits
all" interface, but now that we're going to also have a
pgp_armor_headers() function for users to implement the behaviour they
want themselves, there's no real reason to try and guess what everyone
wants. I think I'd prefer to see an ERROR in this case now.

.marko

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bogdan Pilch 2014-09-30 14:52:57 Re: Time measurement format - more human readable
Previous Message Heikki Linnakangas 2014-09-30 14:37:01 Re: pgcrypto: PGP armor headers