From 80a527d630f8479110a9615ca5d56ed2f975fed5 Mon Sep 17 00:00:00 2001 From: Bruno Silvestre Date: Tue, 13 Sep 2016 13:30:44 -0300 Subject: [PATCH] Use EVP_PKEY_base_id() to recover the key's type --- src/x509.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/x509.c b/src/x509.c index 207d682..0042fc4 100644 --- a/src/x509.c +++ b/src/x509.c @@ -415,7 +415,7 @@ static int meth_pubkey(lua_State* L) bytes = BIO_get_mem_data(bio, &data); if (bytes > 0) { lua_pushlstring(L, data, bytes); - switch(EVP_PKEY_type(pkey->type)) { + switch(EVP_PKEY_base_id(pkey)) { case EVP_PKEY_RSA: lua_pushstring(L, "RSA"); break;