Do not overwrite digestinfo + hash for RSA-PKCS Signature
This commit is contained in:
parent
ecb1656b91
commit
0a8213f3d4
|
@ -4338,14 +4338,14 @@ static int test_signature(CK_SESSION_HANDLE sess)
|
|||
break;
|
||||
case CKM_RSA_X_509:
|
||||
dataLen = modLenBytes;
|
||||
pseudo_randomize(data, dataLen);
|
||||
break;
|
||||
default:
|
||||
dataLen = sizeof(data); /* let's hope it's OK */
|
||||
pseudo_randomize(data, dataLen);
|
||||
break;
|
||||
}
|
||||
|
||||
pseudo_randomize(data, dataLen);
|
||||
|
||||
if (firstMechType == CKM_RSA_X_509) {
|
||||
/* make sure our data is smaller than the modulus */
|
||||
data[0] = 0x00;
|
||||
|
|
Loading…
Reference in New Issue