From 9b1a6844ad6af2973a9ff427415d9bae679f1b79 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Wed, 21 Mar 2012 10:18:34 -0700 Subject: [PATCH] x509_cert_pubkey: windows build fix move declaration to the top to fix windows --- src/lcrypto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lcrypto.c b/src/lcrypto.c index e6add50..7245381 100644 --- a/src/lcrypto.c +++ b/src/lcrypto.c @@ -1592,12 +1592,13 @@ static int x509_cert_from_pem(lua_State *L) static int x509_cert_pubkey(lua_State *L) { struct x509_cert *x = x509_cert__get(L); + EVP_PKEY **out_pkey; EVP_PKEY *pkey = X509_get_pubkey(x->cert); if (!pkey) return crypto_error(L); - EVP_PKEY **out_pkey = pkey_new(L); + out_pkey = pkey_new(L); *out_pkey = pkey; return 1;