at least report internal details if there's no error reason

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35589 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2012-09-22 05:41:43 +00:00
parent 55149fdc40
commit d2d16ceace

View file

@ -122,8 +122,19 @@ sslError(int err)
}
else
{
str = [NSString stringWithFormat: @"%s", ERR_reason_error_string(err)];
const char *s = ERR_reason_error_string(err);
if (0 == s)
{
char buf[128];
ERR_error_string(err, buf);
str = [NSString stringWithFormat: @"%s", buf];
}
else
{
str = [NSString stringWithFormat: @"%s", s];
}
}
return str;
}