[gnutls-devel] GnuTLS | [WIP] Consolidate FIPS .hmac files (!1562)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Wed Mar 30 08:00:28 CEST 2022
Daiki Ueno commented on a discussion on lib/fips.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1562#note_893837675
> + * dest must point to at least HMAC_SIZE amount of memory */
> +static int get_hmac(uint8_t *dest, const char *value)
> {
> -char* p;
> + int ret;
> + size_t hmac_size;
> + gnutls_datum_t data;
>
> - p = strrchr(orig, '/');
> - if (p==NULL) {
> - snprintf(mac_file, mac_file_size, ".%s"HMAC_SUFFIX, orig);
> - return;
> + data.size = strlen(value);
> + if (hex_data_size(data.size) != HMAC_SIZE) {
> + _gnutls_debug_log("Invalid size of hmac data\n");
> + return -1;
I still see `-1` is returned in quite a few places. Could you fix them as well?
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1562#note_893837675
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20220330/3985c04e/attachment.html>
More information about the Gnutls-devel
mailing list