Use EVP_PKEY_base_id() to recover the key's type

This commit is contained in:
Bruno Silvestre 2016-09-13 13:30:44 -03:00
parent 53db804b9d
commit 80a527d630

View File

@ -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;