[pkg-opensc-commit] [libp11] 85/239: RSA_PKCS1_PADDING is a constant to differentiate it from other padding types. where length is compared we meant to use RSA_PKCS1_PADDING_SIZE. Bug found, fixed and reported by Tomoko Fukuzawa.
Eric Dorland
eric at moszumanska.debian.org
Sat Oct 17 06:21:12 UTC 2015
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository libp11.
commit e7dd48347c3ab2b8ebd0a2c7e23c3daa888fe869
Author: Andreas Jellinghaus <andreas at ionisiert.de>
Date: Tue May 23 05:57:11 2006 +0000
RSA_PKCS1_PADDING is a constant to differentiate it from other padding types.
where length is compared we meant to use RSA_PKCS1_PADDING_SIZE.
Bug found, fixed and reported by Tomoko Fukuzawa.
---
src/p11_ops.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/p11_ops.c b/src/p11_ops.c
index 7c61900..f3e4ec6 100644
--- a/src/p11_ops.c
+++ b/src/p11_ops.c
@@ -50,7 +50,7 @@ PKCS11_sign(int type, const unsigned char *m, unsigned int m_len,
if (ssl) {
if((m_len != 36) /* SHA1 + MD5 */ ||
- ((m_len + RSA_PKCS1_PADDING) > sigsize)) {
+ ((m_len + RSA_PKCS1_PADDING_SIZE) > sigsize)) {
return(0); /* the size is wrong */
}
} else {
@@ -65,7 +65,7 @@ PKCS11_sign(int type, const unsigned char *m, unsigned int m_len,
/* Get the size of the encoded DigestInfo */
(size = i2d_X509_SIG(&digest_info, NULL)) &&
/* Check that size is compatible with PKCS#11 padding */
- (size + RSA_PKCS1_PADDING <= sigsize) &&
+ (size + RSA_PKCS1_PADDING_SIZE <= sigsize) &&
(encoded = (unsigned char *) malloc(sigsize))) {
unsigned char *tmp = encoded;
/* Actually do the encoding */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git
More information about the pkg-opensc-commit
mailing list