Little fix in test_signature()

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1635 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
sth 2003-11-23 15:43:38 +00:00
parent 30fba619b9
commit a843fd1d11
1 changed files with 2 additions and 0 deletions

View File

@ -1638,6 +1638,7 @@ test_signature(CK_SLOT_ID slot, CK_SESSION_HANDLE session)
}
data[0] = 0;
data[1] = 1;
modLenBytes = (getMODULUS_BITS(sess, privKeyObject) + 7) / 8;
/* 1st test */
@ -1645,6 +1646,7 @@ test_signature(CK_SLOT_ID slot, CK_SESSION_HANDLE session)
switch (firstMechType) {
case CKM_RSA_PKCS:
dataLen = 35;
memcpy(data, datas[1], dataLen);
break;
case CKM_RSA_X_509:
dataLen = modLenBytes;