Push nil if unable to encode ASN1 string as UTF-8

This commit is contained in:
Kim Alvefur 2014-06-08 12:38:52 +02:00
parent 903efaf3b1
commit 1ade1542d7

View File

@ -101,6 +101,8 @@ static void push_asn1_string(lua_State* L, ASN1_STRING *string, int encode)
lua_pushlstring(L, (char*)data, len);
OPENSSL_free(data);
}
else
lua_pushnil(L);
}
}