mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-04-07 11:08:36 +00:00
Only log debug statements if a keyring identity cannot be opened
This commit is contained in:
parent
ce2131870c
commit
848f01e7d3
@ -1179,7 +1179,8 @@ static int keyring_identity_mac(const keyring_identity *id, unsigned char *pkrsa
|
||||
unsigned __len = (len); \
|
||||
if (__len > sizeof work - ofs) { \
|
||||
bzero(work, ofs); \
|
||||
return WHY("Input too long"); \
|
||||
DEBUG(keyring, "Input too long"); \
|
||||
return -1; \
|
||||
} \
|
||||
bcopy((buf), &work[ofs], __len); \
|
||||
ofs += __len; \
|
||||
@ -1195,8 +1196,10 @@ static int keyring_identity_mac(const keyring_identity *id, unsigned char *pkrsa
|
||||
}
|
||||
kp = kp->next;
|
||||
}
|
||||
if (!found)
|
||||
return WHY("Identity does not have a primary key");
|
||||
if (!found){
|
||||
DEBUG(keyring,"Identity does not have a primary key");
|
||||
return -1;
|
||||
}
|
||||
APPEND(id->PKRPin, strlen(id->PKRPin));
|
||||
#undef APPEND
|
||||
crypto_hash_sha512(mac, work, ofs);
|
||||
|
Loading…
x
Reference in New Issue
Block a user