From d7b6342d348462f4e1faca8624cd9e87e57c3069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Wed, 6 Sep 2006 21:50:18 +0000 Subject: [PATCH] (hx509_cms_unenvelope): try to save the error string from find_CMSIdentifier so we have one more bit of information what went wrong. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18041 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hx509/cms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/hx509/cms.c b/lib/hx509/cms.c index a96c36556..3fa913070 100644 --- a/lib/hx509/cms.c +++ b/lib/hx509/cms.c @@ -300,11 +300,12 @@ hx509_cms_unenvelope(hx509_context context, if (ret == 0) break; cert = NULL; + hx509_clear_error_string(context); } if (cert == NULL) { ret = HX509_CMS_NO_RECIPIENT_CERTIFICATE; - hx509_set_error_string(context, 0, ret, + hx509_set_error_string(context, HX509_ERROR_APPEND, ret, "No private key decrypted the transfer key"); goto out; }