Package: lua-sec / 0.6-3

0008-Use-EVP_PKEY_base_id-to-recover-the-key-s-type.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: Bruno Silvestre <brunoos@inf.ufg.br>
Date: Tue, 13 Sep 2016 13:30:44 -0300
Subject: 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;