[gnutls-devel] GnuTLS | support non-NULL-terminated PSKs (!917)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Mon May 27 14:28:14 CEST 2019




Nikos Mavrogiannopoulos commented on a discussion on lib/psk.c: https://gitlab.com/gnutls/gnutls/merge_requests/917#note_174851887

> + * The callback function should return 0 on success.
> + * -1 indicates an error.
> + **/
> +void
> +gnutls_psk_set_client_credentials_function2(gnutls_psk_client_credentials_t cred,
> +					    gnutls_psk_client_credentials_function2 *func)
> +{
> +	cred->get_function.cb2 = func;
> +	cred->function_in_use = 2;
> +}
> +
> +
> +static int
> +username_has_embedded_nulls(psk_auth_info_t info)
> +{
> +	for (uint16_t i = 0; i < info->len; i++) {

It seems it is in `x509/email-verify.c` and duplicated in `x509/hostname-verify.c`. What about moving it to str.h and sharing it?

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/917#note_174851887
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/20190527/66d91457/attachment-0001.html>


More information about the Gnutls-devel mailing list