# HG changeset patch # User Matthew Wild # Date 1290967429 0 # Node ID 4994321eae310a95286ab2096d9ecd7010837691 # Parent 5104323151064dde68603db1904ddd4dcb450911 x509.c: Fix parameter index to cert:digest() diff -r 510432315106 -r 4994321eae31 src/x509.c --- a/src/x509.c Sun Nov 21 20:14:31 2010 -0800 +++ b/src/x509.c Sun Nov 28 18:03:49 2010 +0000 @@ -269,7 +269,7 @@ char hex_buffer[EVP_MAX_MD_SIZE*2]; const EVP_MD *digest; cert = luasec_to_x509(L, 1); - if (lua_gettop(L) < 2 || strcmp(luaL_checkstring(L, 1), "sha1") == 0) + if (lua_gettop(L) < 2 || strcmp(luaL_checkstring(L, 2), "sha1") == 0) { digest = EVP_sha1(); }