-/* $OpenBSD: radius.c,v 1.4 2023/07/08 08:53:26 yasuoka Exp $ */
+/* $OpenBSD: radius.c,v 1.5 2024/08/08 09:16:37 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
uint8_t authenticator[16];
radius_calc_response_authenticator(authenticator, packet, secret);
- return (memcmp(authenticator, packet->pdata->authenticator, 16));
+ return (timingsafe_memcmp(authenticator, packet->pdata->authenticator,
+ 16));
}
void
radius_calc_accounting_request_authenticator(authenticator, packet,
secret);
- return (memcmp(authenticator, packet->pdata->authenticator, 16));
+ return (timingsafe_memcmp(authenticator, packet->pdata->authenticator,
+ 16));
}
-/* $OpenBSD: radius_msgauth.c,v 1.3 2024/07/24 08:19:16 yasuoka Exp $ */
+/* $OpenBSD: radius_msgauth.c,v 1.4 2024/08/08 09:16:37 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
if (len != sizeof(ma1))
return (-1);
- return (memcmp(ma0, ma1, sizeof(ma1)));
+ return (timingsafe_memcmp(ma0, ma1, sizeof(ma1)));
}