[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 11:27:22 CET 2018
Tim Rühsen started a new 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)
The docs for gnutls_pubkey_get_pk_algorithm say
```
* Returns: a member of the #gnutls_pk_algorithm_t enumeration on
* success, or a negative error code on error.
```
So either the docs are wrong or the test `ret == 0` is wrong. The function returns `key->params.algo` which can have GNUTLS_PK_UNKNOWN (0) *or* -1 (e.g. assigned in privkey.c, L531).
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/commit/ac89db92a47c570340102ac89aebaaba3f35b96d#note_126688461
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/20542466/attachment-0001.html>
More information about the Gnutls-devel
mailing list