mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-18 10:46:23 +00:00
Fix bug in 'keyring list' command
Revealed by recent rhizomeprotocol test improvements. Was always printing
empty DID and name fields.
(cherry picked from commit 7452c215e2
)
This commit is contained in:
parent
c2b515347f
commit
c1695a67b2
@ -1350,7 +1350,7 @@ int keyring_find_sid(const keyring_file *k, int *cn, int *in, int *kp, const uns
|
|||||||
|
|
||||||
void keyring_identity_extract(const keyring_identity *id, const unsigned char **sidp, const char **didp, const char **namep)
|
void keyring_identity_extract(const keyring_identity *id, const unsigned char **sidp, const char **didp, const char **namep)
|
||||||
{
|
{
|
||||||
int todo = (sidp ? 1 : 0) | (didp ? 2 : 0) || (namep ? 4 : 0);
|
int todo = (sidp ? 1 : 0) | (didp ? 2 : 0) | (namep ? 4 : 0);
|
||||||
int kpn;
|
int kpn;
|
||||||
for (kpn = 0; todo && kpn < id->keypair_count; ++kpn) {
|
for (kpn = 0; todo && kpn < id->keypair_count; ++kpn) {
|
||||||
keypair *kp = id->keypairs[kpn];
|
keypair *kp = id->keypairs[kpn];
|
||||||
|
Loading…
Reference in New Issue
Block a user