pkcs11-spy: add support of CKM_*_PSS in C_VerifyInit()
In bdb1961dee
the same code was added to
C_SignInit(). Now it is also used in C_VerifyInit().
This commit is contained in:
parent
2eab2bcd74
commit
2bfd022180
|
@ -1113,6 +1113,27 @@ C_VerifyInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, CK_OBJECT_
|
||||||
enter("C_VerifyInit");
|
enter("C_VerifyInit");
|
||||||
spy_dump_ulong_in("hSession", hSession);
|
spy_dump_ulong_in("hSession", hSession);
|
||||||
fprintf(spy_output, "pMechanism->type=%s\n", lookup_enum(MEC_T, pMechanism->mechanism));
|
fprintf(spy_output, "pMechanism->type=%s\n", lookup_enum(MEC_T, pMechanism->mechanism));
|
||||||
|
switch (pMechanism->mechanism) {
|
||||||
|
case CKM_RSA_PKCS_PSS:
|
||||||
|
case CKM_SHA1_RSA_PKCS_PSS:
|
||||||
|
case CKM_SHA256_RSA_PKCS_PSS:
|
||||||
|
case CKM_SHA384_RSA_PKCS_PSS:
|
||||||
|
case CKM_SHA512_RSA_PKCS_PSS:
|
||||||
|
if (pMechanism->pParameter != NULL) {
|
||||||
|
CK_RSA_PKCS_PSS_PARAMS *param =
|
||||||
|
(CK_RSA_PKCS_PSS_PARAMS *) pMechanism->pParameter;
|
||||||
|
fprintf(spy_output, "pMechanism->pParameter->hashAlg=%s\n",
|
||||||
|
lookup_enum(MEC_T, param->hashAlg));
|
||||||
|
fprintf(spy_output, "pMechanism->pParameter->mgf=%s\n",
|
||||||
|
lookup_enum(MGF_T, param->mgf));
|
||||||
|
fprintf(spy_output, "pMechanism->pParameter->sLen=%lu\n",
|
||||||
|
param->sLen);
|
||||||
|
} else {
|
||||||
|
fprintf(spy_output, "Parameters block for %s is empty...\n",
|
||||||
|
lookup_enum(MEC_T, pMechanism->mechanism));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
spy_dump_ulong_in("hKey", hKey);
|
spy_dump_ulong_in("hKey", hKey);
|
||||||
rv = po->C_VerifyInit(hSession, pMechanism, hKey);
|
rv = po->C_VerifyInit(hSession, pMechanism, hKey);
|
||||||
return retne(rv);
|
return retne(rv);
|
||||||
|
|
Loading…
Reference in New Issue