# HG changeset patch # User Matthew Wild # Date 1288923699 0 # Node ID fbaccf44ea018933c1eae3d2e7bc8252bc36efb6 # Parent da3cf40976f6302410c1950efdb856add97540aa Fix to remove duplicated table on the stack, causing the 'trusted' flag to disappear from the returned cert diff -r da3cf40976f6 -r fbaccf44ea01 src/ssl.c --- a/src/ssl.c Fri Nov 05 02:17:23 2010 +0000 +++ b/src/ssl.c Fri Nov 05 02:21:39 2010 +0000 @@ -392,7 +392,7 @@ int i, n_entries, len; char buffer[4096]; - lua_newtable(L); + lua_newtable(L); /* ret */ lua_pushboolean(L, (SSL_get_verify_result(ssl->ssl) == X509_V_OK)); lua_setfield(L, -2, "trusted"); @@ -401,7 +401,6 @@ n_entries = X509_NAME_entry_count(subject); - lua_newtable(L); /* ret */ lua_newtable(L); /* {} */ lua_pushvalue(L, -1); lua_setfield(L, -3, "subject"); /* ret.subject = {} */