x509: Correctly use a signed integer so errors can be checked.

This commit is contained in:
Thijs Alkemade 2013-09-25 12:57:53 +02:00
parent 24f5b27eb4
commit fcea01d6c6

View File

@ -77,7 +77,7 @@ static void push_asn1_string(lua_State* L, ASN1_STRING *string)
{
if (string) {
unsigned char *data;
size_t len = ASN1_STRING_to_UTF8(&data, string);
int len = ASN1_STRING_to_UTF8(&data, string);
if (len >= 0) {
lua_pushlstring(L, (char *)data, len);