[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EGO subsystem inconsistency

From: Christian Grothoff
Subject: Re: EGO subsystem inconsistency
Date: Fri, 17 Jul 2020 17:46:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Good point, I've removed the 'const' from the ego_get_anonymous()
function. That solution is also not 'perfect', but should avoid the
weirdness you reported.


On 7/17/20 5:20 PM, TheJackiMonster wrote:
> Hi,
> I'm currently working on a library to make it easier for others to
> create messengers using CADET and being compatible with each other
> (proving direct chats, server-client-groupchats and decentralized
> group-chats).
> Now I'm integrating EGO keys for authentication via signatures of
> messages and verification but the API in C seems a little inconsistent.
> For example:
> GNUNET_IDENTITY_ego_get_anonymous() returns a const struct pointer
> and
> GNUNET_IDENTITY_ego_get_private_key(ego) expects a const struct pointer
> for ego
> but
> GNUNET_IDENTITY_ego_get_public_key(ego, &pub_key) expects a struct
> pointer for ego (so it is not possible to retrieve the public key from
> the anonymous default key formally).
> I still found a solution
> using GNUNET_CRYPTO_ecdsa_key_get_public(priv_key, &pub_key) but it's
> definitely weird that some methods which I wouldn't expect to use any
> write accesses require non-const pointer.
> Maybe this can be patched soon. I would assume, it shouldn't require
> any major changes.
> Happy hacking
> Jacki

Attachment: 0x939E6BE1E29FC3CC.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]