Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keyring_open_with_pins() is gone (plus Makefile spiff-up) #5

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/mdp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ PLUGIN_VER = 0.1
TOPDIR = ../..
include $(TOPDIR)/Makefile.inc

SERVALD_ROOT=/home/hawkinsw/serval/serval-dna
SERVALD_ROOT?=/home/hawkinsw/serval/serval-dna
SERVALD_LIB_ROOT?=/home/hawkinsw/serval/serval-dna

CPPFLAGS+=-I$(SERVALD_ROOT)/ -I$(SERVALD_ROOT)/nacl/include
LIBS+=-L$(SERVALD_ROOT) -lservald
LIBS+=-L$(SERVALD_LIB_ROOT) -lserval

default_target: $(PLUGIN_FULLNAME)

Expand Down
5 changes: 2 additions & 3 deletions lib/mdp/src/olsrd_mdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ print_data(const char *label, const uint8_t *data, size_t len)
static void
mdp_checksum(uint8_t *data, const uint16_t data_len, uint8_t *hashbuf)
{
unsigned long long signature_bytes = SIGNATURE_BYTES;
int signature_bytes = SIGNATURE_BYTES;
print_data("Key", servald_key, servald_key_len);
print_data("Data", data, data_len);

Expand Down Expand Up @@ -1079,13 +1079,12 @@ timeout_timestamps(void *foo __attribute__ ((unused)))
static int
read_key_from_servald(const char *sid)
{
const char *pins = {"",};
unsigned char stowedSid[SID_SIZE];
unsigned char *found_private_key = NULL;
int found_private_key_len = 0;
int cn = 0, in = 0, kp = 0;

keyring = keyring_open_with_pins(pins);
keyring = keyring_open_instance();
stowSid(stowedSid, 0, sid);

if (!keyring_find_sid(keyring, &cn, &in, &kp, stowedSid))
Expand Down