better error message

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24051 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-11-23 22:05:46 +00:00
parent b4539ac324
commit 174cae0ba1

View File

@@ -3369,8 +3369,12 @@ _hx509_cert_to_env(hx509_context context, hx509_cert cert, hx509_env *env)
ret = hex_encode(sig.data, sig.length, &buf);
der_free_octet_string(&sig);
if (ret < 0)
if (ret < 0) {
ret = ENOMEM;
hx509_set_error_string(context, 0, ret,
"Out of memory");
goto out;
}
ret = hx509_env_add(context, &envhash, "sha1", buf);
free(buf);