diff options
author | Simon Josefsson <simon@josefsson.org> | 2011-09-06 12:09:03 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-09-06 15:47:57 +0200 |
commit | 2cc280cb4aa0a865553c6651f84264aa3562e42d (patch) | |
tree | 5de528f015c312a7bed6dd4dcf2c3cf41a7e1880 /lib | |
parent | be5603c14c177f07dbb553bc6977b68ca7afd7a4 (diff) | |
download | gnutls-2cc280cb4aa0a865553c6651f84264aa3562e42d.tar.gz |
libgnutls: Allow CA importing of 0 certificates to succeed.
Reported by Jonathan Nieder <jrnieder@gmail.com> in
<http://bugs.debian.org/640639>.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/x509/x509.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/x509/x509.c b/lib/x509/x509.c index 3e2948de29..31514b52b3 100644 --- a/lib/x509/x509.c +++ b/lib/x509/x509.c @@ -3183,7 +3183,9 @@ gnutls_x509_crt_list_import (gnutls_x509_crt_t * certs, if (ptr == NULL) { gnutls_assert (); - return GNUTLS_E_BASE64_DECODING_ERROR; + *cert_max = 0; + /* no certificate found, likely empty file or garbage input */ + return 0; } count = 0; |