[gnutls-devel] GnuTLS | Add compress_certificate extension (RFC8879) (!1512)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Thu Feb 17 13:58:17 CET 2022




Zoltán Fridrich commented on a discussion on lib/tls13/certificate.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1512#note_846425324

> +
> +	plain.data = buf->data + cert_pos_mark;
> +	plain.size = buf->length - cert_pos_mark;
> +
> +	comp_bound = _gnutls_compress_bound(comp_method, plain.size);
> +	if (comp_bound == 0)
> +		return gnutls_assert_val(GNUTLS_E_INTERNAL_ERROR);
> +	comp.data = gnutls_malloc(comp_bound);
> +	if (comp.data == NULL)
> +		return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR);
> +	ret = _gnutls_compress(comp_method, comp.data, comp_bound, plain.data, plain.size);
> +	if (ret < 0)
> +		return gnutls_assert_val(ret);
> +        comp.size = ret;
> +
> +	_gnutls_buffer_delete_data(buf, cert_pos_mark, plain.size);

Good point!

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1512#note_846425324
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/20220217/3d00f091/attachment-0001.html>


More information about the Gnutls-devel mailing list