mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-18 02:39:44 +00:00
Fix bug in "rhizome add file" command
Was not opening keyring file properly
This commit is contained in:
parent
990db1d275
commit
41583c1011
@ -1083,7 +1083,7 @@ int app_rhizome_add_file(int argc, const char *const *argv, struct command_line_
|
||||
cli_arg(argc, argv, o, "manifestpath", &manifestpath, NULL, "");
|
||||
if (create_serval_instance_dir() == -1)
|
||||
return -1;
|
||||
if (!keyring_open_with_pins(pin))
|
||||
if (!(keyring = keyring_open_with_pins((char *)pin)))
|
||||
return -1;
|
||||
if (rhizome_opendb() == -1)
|
||||
return -1;
|
||||
@ -1323,8 +1323,7 @@ int app_keyring_set_did(int argc, const char *const *argv, struct command_line_o
|
||||
if (strlen(did)>31) return WHY("DID too long (31 digits max)");
|
||||
if (strlen(name)>63) return WHY("Name too long (31 char max)");
|
||||
|
||||
keyring = keyring_open_with_pins((char *)pin);
|
||||
if (!keyring)
|
||||
if (!(keyring = keyring_open_with_pins((char *)pin)))
|
||||
return -1;
|
||||
|
||||
unsigned char packedSid[SID_SIZE];
|
||||
|
16
keyring.c
16
keyring.c
@ -1360,15 +1360,15 @@ int keyring_enter_pins(keyring_file *k, const char *pinlist)
|
||||
keyring_file *keyring_open_with_pins(const char *pinlist)
|
||||
{
|
||||
keyring_file *k = NULL;
|
||||
if (create_serval_instance_dir() == -1)
|
||||
if (create_serval_instance_dir() == -1)
|
||||
return NULL;
|
||||
char keyringFile[1024];
|
||||
if (!FORM_SERVAL_INSTANCE_PATH(keyringFile, "serval.keyring"))
|
||||
return NULL;
|
||||
if ((k = keyring_open(keyringFile)) == NULL)
|
||||
return NULL;
|
||||
keyring_enter_pins(k,pinlist);
|
||||
return k;
|
||||
char keyringFile[1024];
|
||||
if (!FORM_SERVAL_INSTANCE_PATH(keyringFile, "serval.keyring"))
|
||||
return NULL;
|
||||
if ((k = keyring_open(keyringFile)) == NULL)
|
||||
return NULL;
|
||||
keyring_enter_pins(k,pinlist);
|
||||
return k;
|
||||
}
|
||||
|
||||
/* If no identities, create an initial identity with a phone number.
|
||||
|
Loading…
Reference in New Issue
Block a user