[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 15:40:36 CEST 2022




Zoltán Fridrich commented on a discussion on lib/fips.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1562#note_894590595

> + * 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;

sorry, I got confused for some reason. should be good now

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1562#note_894590595
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/084bc24f/attachment.html>


More information about the Gnutls-devel mailing list