summaryrefslogtreecommitdiff
path: root/lib/x509
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-24 16:25:28 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-24 16:25:28 +0200
commitf206e15d78ea64d60ae1716a75c7f7ad8a87a1c9 (patch)
tree3649957129ee8b20e7155071bca801437caec49b /lib/x509
parentf780425c751c6e31d26985e629d1abf3886168d3 (diff)
downloadgnutls-f206e15d78ea64d60ae1716a75c7f7ad8a87a1c9.tar.gz
Do not trust fbase64_decode to return 0 on success.
Diffstat (limited to 'lib/x509')
-rw-r--r--lib/x509/privkey.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/x509/privkey.c b/lib/x509/privkey.c
index 834a8a7dd9..7929f94d1b 100644
--- a/lib/x509/privkey.c
+++ b/lib/x509/privkey.c
@@ -376,7 +376,7 @@ gnutls_x509_privkey_import (gnutls_x509_privkey_t key,
result =
_gnutls_fbase64_decode (PEM_KEY_RSA, data->data, data->size, &out);
- if (result == 0) key->pk_algorithm = GNUTLS_PK_RSA;
+ if (result >= 0) key->pk_algorithm = GNUTLS_PK_RSA;
if (result == GNUTLS_E_BASE64_UNEXPECTED_HEADER_ERROR)
{