Files
haikuports/dev-libs/libp11/patches/libp11-0.4.7.patchset

48 lines
1.2 KiB
Plaintext

From dc5ab0ea306e78dbca393058bdad03b23afa1ca5 Mon Sep 17 00:00:00 2001
From: fbrosson <fbrosson@localhost>
Date: Tue, 5 Jun 2018 16:26:43 +0000
Subject: C89 fixes for gcc2 compatibility.
diff --git a/src/p11_ec.c b/src/p11_ec.c
index 37025d4..57bedf8 100644
--- a/src/p11_ec.c
+++ b/src/p11_ec.c
@@ -252,12 +252,13 @@ static void pkcs11_set_ex_data_ec(EC_KEY* ec, PKCS11_KEY* key)
static void pkcs11_update_ex_data_ec(PKCS11_KEY* key)
{
EVP_PKEY* evp = key->evp_key;
+ EC_KEY* ec;
if (evp == NULL)
return;
if (EVP_PKEY_base_id(evp) != EVP_PKEY_EC)
return;
- EC_KEY* ec = EVP_PKEY_get1_EC_KEY(evp);
+ ec = EVP_PKEY_get1_EC_KEY(evp);
pkcs11_set_ex_data_ec(ec, key);
EC_KEY_free(ec);
}
diff --git a/src/p11_rsa.c b/src/p11_rsa.c
index efa40d4..966b962 100644
--- a/src/p11_rsa.c
+++ b/src/p11_rsa.c
@@ -243,12 +243,13 @@ static void pkcs11_set_ex_data_rsa(RSA* rsa, PKCS11_KEY* key)
static void pkcs11_update_ex_data_rsa(PKCS11_KEY* key)
{
EVP_PKEY* evp = key->evp_key;
+ RSA* rsa;
if (evp == NULL)
return;
if (EVP_PKEY_base_id(evp) != EVP_PKEY_RSA)
return;
- RSA* rsa = EVP_PKEY_get1_RSA(evp);
+ rsa = EVP_PKEY_get1_RSA(evp);
pkcs11_set_ex_data_rsa(rsa, key);
RSA_free(rsa);
}
--
2.17.1