[pkg-opensc-commit] [pkcs11-helper] 197/253: Fixup OpenSSL engine's rsa_priv_enc to use RSA size output buffer.
Eric Dorland
eric at moszumanska.debian.org
Fri Jan 6 23:39:19 UTC 2017
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository pkcs11-helper.
commit f253ac728ee4c0b6e0b059d84682cf8f3fae289b
Author: Alon Bar-Lev <alon.barlev at gmail.com>
Date: Fri Aug 12 20:12:56 2011 +0000
Fixup OpenSSL engine's rsa_priv_enc to use RSA size output buffer.
---
ChangeLog | 1 +
lib/pkcs11h-openssl.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 3b8eeee..c513ead 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@ $Id$
????-??-?? - Version 1.09
* Do not retry if CKR_BUFFER_TOO_SMALL and none NULL target.
+ * Fixup OpenSSL engine's rsa_priv_enc to use RSA size output buffer.
2011-02-23 - Version 1.08
diff --git a/lib/pkcs11h-openssl.c b/lib/pkcs11h-openssl.c
index 91966bc..6ac6525 100644
--- a/lib/pkcs11h-openssl.c
+++ b/lib/pkcs11h-openssl.c
@@ -291,7 +291,7 @@ __pkcs11h_openssl_enc (
pkcs11h_certificate_t certificate = __pkcs11h_openssl_get_pkcs11h_certificate (rsa);
PKCS11H_BOOL session_locked = FALSE;
CK_RV rv = CKR_FUNCTION_FAILED;
- size_t tlen = (size_t)flen;
+ size_t tlen;
_PKCS11H_ASSERT (from!=NULL);
_PKCS11H_ASSERT (to!=NULL);
@@ -312,6 +312,8 @@ __pkcs11h_openssl_enc (
goto cleanup;
}
+ tlen = (size_t)RSA_size(rsa);
+
if ((rv = pkcs11h_certificate_lockSession (certificate)) != CKR_OK) {
goto cleanup;
}
--
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