[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] adding existing pubkey - incorrect invariant
From: |
Thomas Keller |
Subject: |
Re: [Monotone-devel] adding existing pubkey - incorrect invariant |
Date: |
Tue, 29 Dec 2009 23:30:52 +0100 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; de; rv:1.9.1.5) Gecko/20091204 Lightning/1.0b1pre Thunderbird/3.0 |
Am 29.12.09 10:27, schrieb Zbigniew Zagórski:
> Hello,
>
> Looks like we've got some small issue. You can't add pubkey to db/keystore
> when
> it is already known.
>
> It's minor but shall not be internal invariant as it is now. IMHO, mtn
> read shall ignore
> packets that contain already known information and here we have exception (and
> it ignores in all other cases)
>
> (BTW, when importing privkey everything works perfectly)
>
> Offending code:
> database::put_key(key_name const & pub_id,
> rsa_pub_key const & pub)
> {
> //(...)
> I(!public_key_exists(thash)); // BAD! to be removed
>
> if (public_key_exists(thash)) // never executed
Apparently this has been introduced in May this year in
6174b617c0a210e6e9260ef843aaddacf5973b08. I've just pushed a fix for it
(48585b4f49bbe3eb319ff944337b374107cb9556).
Thanks for the pointer,
Thomas.
--
GPG-Key 0x160D1092 | address@hidden | http://thomaskeller.biz
Please note that according to the EU law on data retention, information
on every electronic information exchange might be retained for a period
of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en
signature.asc
Description: OpenPGP digital signature