[pkg-opensc-commit] [opensc] 175/295: Pkcs11-tool.c -t fails to for RSA-X-509 verification

Eric Dorland eric at moszumanska.debian.org
Sat Jun 24 21:11:28 UTC 2017


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository opensc.

commit 2a68395d22b3623263cfa00b89a41760dff69281
Author: Doug Engert <deengert at gmail.com>
Date:   Sun Feb 12 20:34:13 2017 -0600

    Pkcs11-tool.c  -t fails to for RSA-X-509 verification
    
    The test_signature routine reuses data array and fails to reset data[0] = 0
    when creating a PKCS hash to be pased to OpenSSL.
    
     Date:	     Mon Feb 13 11:48:00 2017 -0600
    
     On branch pkcs11-tool-pkcs
     Changes to be committed:
    	modified:   tools/pkcs11-tool.c
---
 src/tools/pkcs11-tool.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/tools/pkcs11-tool.c b/src/tools/pkcs11-tool.c
index 8e62cef..68c4e72 100644
--- a/src/tools/pkcs11-tool.c
+++ b/src/tools/pkcs11-tool.c
@@ -4301,6 +4301,7 @@ static int test_signature(CK_SESSION_HANDLE sess)
 
 	/* Fill in data[0] and dataLens[0] */
 	dataLen = modLenBytes;
+	data[0] = 0x00;
 	data[1] = 0x01;
 	memset(data + 2, 0xFF, dataLen - 3 - dataLens[1]);
 	data[dataLen - 36] = 0x00;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/opensc.git



More information about the pkg-opensc-commit mailing list