[gnutls-devel] GnuTLS | Mark arguments of function gnutls_x509_crt_equals2 as const (!1000)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Tue May 21 16:57:29 CEST 2019




Sorry for my lack of attention. It looks like `gnutls_datum_t` is a typedef to a struct, while `gnutls_x509_crt_t` is a typedef to pointer at the moment. Due to that, `const gnutls_datum_t*` is a pointer to const data, while `const gnutls_x509_crt_t` is a const pointer to data. That explains lack of expected warnings (const pointer is just copied as non-const pointer for function argument when needed) and makes this change more trivial (there is no point in marking such pointers as const, it's a copy anyway). Changes to libtasn are not required, as shouldn't be required changes to any other functions since they're not called with provided `const gnutls_datum_t*`. It should be enough to change `gnutls_datum_t * der` to `const gnutls_datum_t * der`.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/1000#note_172848217
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/20190521/17d1ee89/attachment.html>


More information about the Gnutls-devel mailing list