Fix to remove duplicated table on the stack, causing the 'trusted' flag to disappear from the returned cert

Fri, 05 Nov 2010 02:21:39 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 05 Nov 2010 02:21:39 +0000
changeset 8
fbaccf44ea01
parent 7
da3cf40976f6
child 9
bb7e0d7a0a08

Fix to remove duplicated table on the stack, causing the 'trusted' flag to disappear from the returned cert

src/ssl.c file | annotate | diff | comparison | revisions
--- 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 = {} */

mercurial