mirror of
https://github.com/brunoos/luasec.git
synced 2024-12-27 12:58:21 +01:00
Use EVP_PKEY_base_id() to recover the key's type
This commit is contained in:
parent
53db804b9d
commit
80a527d630
@ -415,7 +415,7 @@ static int meth_pubkey(lua_State* L)
|
|||||||
bytes = BIO_get_mem_data(bio, &data);
|
bytes = BIO_get_mem_data(bio, &data);
|
||||||
if (bytes > 0) {
|
if (bytes > 0) {
|
||||||
lua_pushlstring(L, data, bytes);
|
lua_pushlstring(L, data, bytes);
|
||||||
switch(EVP_PKEY_type(pkey->type)) {
|
switch(EVP_PKEY_base_id(pkey)) {
|
||||||
case EVP_PKEY_RSA:
|
case EVP_PKEY_RSA:
|
||||||
lua_pushstring(L, "RSA");
|
lua_pushstring(L, "RSA");
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user