[pkg-opensc-commit] [pkcs11-helper] 04/11: Do not retry if CKR_BUFFER_TOO_SMALL and none NULL target.
Eric Dorland
eric at moszumanska.debian.org
Fri Jan 6 23:40:34 UTC 2017
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to tag pkcs11-helper-1.09
in repository pkcs11-helper.
commit 187684ac263a020026767e1ae7f208672389e821
Author: alonbl <alonbl at 485eb718-1723-0410-b8a9-88cf21a28c35>
Date: Fri Aug 12 19:49:56 2011 +0000
Do not retry if CKR_BUFFER_TOO_SMALL and none NULL target.
---
ChangeLog | 4 ++++
lib/pkcs11h-certificate.c | 13 +++++++++----
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 03aa6e0..3b8eeee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,10 @@ Copyright (c) 2005-2011 Alon Bar-Lev <alon.barlev at gmail.com>
$Id$
+????-??-?? - Version 1.09
+
+ * Do not retry if CKR_BUFFER_TOO_SMALL and none NULL target.
+
2011-02-23 - Version 1.08
* Do not attempt to logout if uninitialized, thanks to Jan Just Keijser.
diff --git a/lib/pkcs11h-certificate.c b/lib/pkcs11h-certificate.c
index b8995c6..c3efeb7 100644
--- a/lib/pkcs11h-certificate.c
+++ b/lib/pkcs11h-certificate.c
@@ -961,16 +961,17 @@ __pkcs11h_certificate_doPrivateOperation (
rv
);
+ if (rv == CKR_BUFFER_TOO_SMALL && op != __pkcs11h_private_op_unwrap) {
+ certificate->operation_active = TRUE;
+ }
+
if (target != NULL) {
if (rv != CKR_OK) {
goto retry;
}
}
else {
- if (
- rv == CKR_OK ||
- rv == CKR_BUFFER_TOO_SMALL
- ) {
+ if (rv == CKR_OK) {
if (op != __pkcs11h_private_op_unwrap) {
certificate->operation_active = TRUE;
}
@@ -994,6 +995,10 @@ __pkcs11h_certificate_doPrivateOperation (
}
if (!op_succeed) {
+ if (rv == CKR_BUFFER_TOO_SMALL) {
+ goto cleanup;
+ }
+
/*
* OpenSC workaround
* It still allows C_FindObjectsInit when
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/pkcs11-helper.git
More information about the pkg-opensc-commit
mailing list