Skip to content

Commit

Permalink
x509_cert_pubkey: windows build fix
Browse files Browse the repository at this point in the history
move declaration to the top to fix windows
  • Loading branch information
philips committed Mar 21, 2012
1 parent 90539d7 commit 9b1a684
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lcrypto.c
Expand Up @@ -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;
Expand Down

0 comments on commit 9b1a684

Please sign in to comment.