mirror of
https://github.com/brunoos/luasec.git
synced 2024-12-27 04:58:20 +01:00
x509: Correctly use a signed integer so errors can be checked.
This commit is contained in:
parent
24f5b27eb4
commit
fcea01d6c6
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user