Do not overwrite digestinfo + hash for RSA-PKCS Signature

This commit is contained in:
Jakub Jelen 2017-09-13 17:41:20 +02:00 committed by Frank Morgner
parent ecb1656b91
commit 0a8213f3d4
1 changed files with 2 additions and 2 deletions

View File

@ -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;