(parse_certificate): return errno's not 1 in case of error

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15745 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2005-07-25 21:32:34 +00:00
parent d8425c3dd6
commit 440f98d5f7

View File

@@ -90,20 +90,16 @@ parse_certificate(const char *fn, int use_pem, Certificate *t)
fclose(f);
if (data == NULL)
return 1;
return ENOENT;
if (data && in_cert) {
free(data);
return 1;
return EINVAL;
}
ret = decode_Certificate(data, len, t, &size);
free(data);
if (ret != 0) {
return 1;
}
return 0;
return ret;
}