[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:27:20 CET 2022




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

> +	method_num = _gnutls_compress_certificate_method2num(comp_method);
> +	if (method_num == GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER)
> +		return gnutls_assert_val(GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER);
> +
> +	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);

resolved

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


More information about the Gnutls-devel mailing list