mirror of
https://gitlab.com/chrony/chrony.git
synced 2026-01-20 21:00:20 -05:00
cmac+hash: change parameter types
For consistency and safety, change the CMC and HSH functions to accept signed lengths and handle negative values as errors. Also, change the input data type to void * to not require casting in the caller.
This commit is contained in:
9
stubs.c
9
stubs.c
@@ -438,21 +438,20 @@ NSD_SignAndSendPacket(uint32_t key_id, NTP_Packet *packet, NTP_PacketInfo *info,
|
||||
|
||||
#ifndef HAVE_CMAC
|
||||
|
||||
unsigned int
|
||||
int
|
||||
CMC_GetKeyLength(CMC_Algorithm algorithm)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
CMC_Instance
|
||||
CMC_CreateInstance(CMC_Algorithm algorithm, const unsigned char *key, unsigned int length)
|
||||
CMC_CreateInstance(CMC_Algorithm algorithm, const unsigned char *key, int length)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
CMC_Hash(CMC_Instance inst, const unsigned char *in, unsigned int in_len,
|
||||
unsigned char *out, unsigned int out_len)
|
||||
int
|
||||
CMC_Hash(CMC_Instance inst, const void *in, int in_len, unsigned char *out, int out_len)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user