From 1eca860a46e4f9021fbc563e705d21364b257bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 25 May 2009 23:43:11 +0000 Subject: [PATCH] Pass up error code from PEM format parser. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25220 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hx509/ks_file.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/hx509/ks_file.c b/lib/hx509/ks_file.c index 30b009b52..af86947b6 100644 --- a/lib/hx509/ks_file.c +++ b/lib/hx509/ks_file.c @@ -340,8 +340,12 @@ pem_func(hx509_context context, const char *type, ret = (*formats[j].func)(context, NULL, pem_ctx->c, header, data, len, ai); - if (ret == 0) - break; + if (ret) { + hx509_set_error_string(context, HX509_ERROR_APPEND, ret, + "Failed parseing PEM format %s", type); + return ret; + } + break; } } if (j == sizeof(formats)/sizeof(formats[0])) {