diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2019-06-28 19:36:40 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2019-06-28 19:36:40 +0000 |
commit | 0725968d0605eef8acb6fdcd7d692c56141a5176 (patch) | |
tree | 0f139867ec53dc600b3b53221e55219f9b57f59c | |
parent | 687626edcdef4d391f6f19e23947c037f3bee1b9 (diff) | |
parent | d4414495113cfd1780589d6fd2ae90bd08fe3835 (diff) | |
download | gnutls-0725968d0605eef8acb6fdcd7d692c56141a5176.tar.gz |
Merge branch 'tmp-fix-gnutls_x509_crt_list_import2' into 'master'
Fix gnutls_x509_crt_list_import2() documentation
Closes #794
See merge request gnutls/gnutls!1037
-rw-r--r-- | lib/x509/x509.c | 2 | ||||
-rw-r--r-- | tests/gnutls_x509_crt_list_import.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/x509/x509.c b/lib/x509/x509.c index 44418cb45f..26055e08a3 100644 --- a/lib/x509/x509.c +++ b/lib/x509/x509.c @@ -3644,7 +3644,7 @@ gnutls_x509_crt_get_pk_dsa_raw(gnutls_x509_crt_t crt, * To deinitialize @certs, you need to deinitialize each crt structure * independently, and use gnutls_free() at @certs. * - * Returns: the number of certificates read or a negative error value. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 3.0 **/ diff --git a/tests/gnutls_x509_crt_list_import.c b/tests/gnutls_x509_crt_list_import.c index a8cad7fbf2..51fdfcb9f4 100644 --- a/tests/gnutls_x509_crt_list_import.c +++ b/tests/gnutls_x509_crt_list_import.c @@ -80,6 +80,9 @@ static void load_list(const char *name, const gnutls_datum_t *txt, if (max != ncerts) testfail("imported number (%d) doesn't match expected (%d)\n", max, ncerts); + if (ret != (int)ncerts) + testfail("imported number (%d) doesn't match return value (%d)\n", ncerts, ret); + return; } |