[gnutls-devel] GnuTLS | gnutls_pubkey_import_ecc_raw: set the public key bits (ac89db92)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Fri Dec 21 19:52:53 CET 2018


Nikos Mavrogiannopoulos commented on a discussion on tests/pubkey-import-export.c:

>  	if (ret < 0)
>  		fail("error\n");
>  
> +	bits = 0;
> +	ret = gnutls_pubkey_get_pk_algorithm(key, &bits);
> +	if (ret == 0 || bits == 0)

Thank you. The `-1` is a temporal value used to signal a reload. However you raise a nice point. These functions have a multiple error state. It can be that their return value is negative, or their return value is zero. I'd have liked to simplify that to a single error value, but that could break apps which don't check for all possible values.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/commit/ac89db92a47c570340102ac89aebaaba3f35b96d#note_126843928
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/20181221/0ca31b9e/attachment.html>


More information about the Gnutls-devel mailing list