|
|
61e0f4 |
From c2512ee261efb6fdd81226549f48421bd57a8230 Mon Sep 17 00:00:00 2001
|
|
|
61e0f4 |
From: =?UTF-8?q?Micha=C5=82=20Trojnara?= <Michal.Trojnara@stunnel.org>
|
|
|
61e0f4 |
Date: Mon, 3 Sep 2018 20:54:59 +0200
|
|
|
61e0f4 |
Subject: [PATCH 20/23] Build fixes for old C dialects
|
|
|
61e0f4 |
|
|
|
61e0f4 |
---
|
|
|
61e0f4 |
src/p11_cert.c | 3 ++-
|
|
|
61e0f4 |
src/p11_key.c | 3 ++-
|
|
|
61e0f4 |
2 files changed, 4 insertions(+), 2 deletions(-)
|
|
|
61e0f4 |
|
|
|
61e0f4 |
diff --git a/src/p11_cert.c b/src/p11_cert.c
|
|
|
61e0f4 |
index 811db85..bc78447 100644
|
|
|
61e0f4 |
--- a/src/p11_cert.c
|
|
|
61e0f4 |
+++ b/src/p11_cert.c
|
|
|
61e0f4 |
@@ -74,6 +74,7 @@ int pkcs11_remove_certificate(PKCS11_CERT *cert){
|
|
|
61e0f4 |
CK_ULONG count;
|
|
|
61e0f4 |
CK_ATTRIBUTE search_parameters[32];
|
|
|
61e0f4 |
unsigned int n = 0;
|
|
|
61e0f4 |
+ int rv;
|
|
|
61e0f4 |
|
|
|
61e0f4 |
/* First, make sure we have a session */
|
|
|
61e0f4 |
if (!spriv->haveSession && PKCS11_open_session(slot, 1)){
|
|
|
61e0f4 |
@@ -88,7 +89,7 @@ int pkcs11_remove_certificate(PKCS11_CERT *cert){
|
|
|
61e0f4 |
pkcs11_addattr_s(search_parameters + n++, CKA_LABEL, cert->label);
|
|
|
61e0f4 |
}
|
|
|
61e0f4 |
|
|
|
61e0f4 |
- int rv = CRYPTOKI_call(ctx,
|
|
|
61e0f4 |
+ rv = CRYPTOKI_call(ctx,
|
|
|
61e0f4 |
C_FindObjectsInit(spriv->session, search_parameters, n));
|
|
|
61e0f4 |
CRYPTOKI_checkerr(CKR_F_PKCS11_REMOVE_CERTIFICATE, rv);
|
|
|
61e0f4 |
|
|
|
61e0f4 |
diff --git a/src/p11_key.c b/src/p11_key.c
|
|
|
61e0f4 |
index 1681c7d..f73029b 100644
|
|
|
61e0f4 |
--- a/src/p11_key.c
|
|
|
61e0f4 |
+++ b/src/p11_key.c
|
|
|
61e0f4 |
@@ -457,6 +457,7 @@ int pkcs11_remove_key(PKCS11_KEY *key) {
|
|
|
61e0f4 |
CK_ULONG count;
|
|
|
61e0f4 |
CK_ATTRIBUTE search_parameters[32];
|
|
|
61e0f4 |
unsigned int n = 0;
|
|
|
61e0f4 |
+ int rv;
|
|
|
61e0f4 |
|
|
|
61e0f4 |
/* First, make sure we have a session */
|
|
|
61e0f4 |
if (!spriv->haveSession && PKCS11_open_session(slot, 1))
|
|
|
61e0f4 |
@@ -470,7 +471,7 @@ int pkcs11_remove_key(PKCS11_KEY *key) {
|
|
|
61e0f4 |
if (key->label)
|
|
|
61e0f4 |
pkcs11_addattr_s(search_parameters + n++, CKA_LABEL, key->label);
|
|
|
61e0f4 |
|
|
|
61e0f4 |
- int rv = CRYPTOKI_call(ctx,
|
|
|
61e0f4 |
+ rv = CRYPTOKI_call(ctx,
|
|
|
61e0f4 |
C_FindObjectsInit(spriv->session, search_parameters, n));
|
|
|
61e0f4 |
CRYPTOKI_checkerr(CKR_F_PKCS11_REMOVE_KEY, rv);
|
|
|
61e0f4 |
|
|
|
61e0f4 |
--
|
|
|
61e0f4 |
2.17.1
|
|
|
61e0f4 |
|