Added some debugging info
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1279 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
f8c5da9ccc
commit
47489c5567
|
@ -264,8 +264,10 @@ CK_RV sc_pkcs11_verify_data(unsigned char *pubkey, int pubkey_len,
|
||||||
return CKR_OK;
|
return CKR_OK;
|
||||||
else if (res == 0)
|
else if (res == 0)
|
||||||
return CKR_SIGNATURE_INVALID;
|
return CKR_SIGNATURE_INVALID;
|
||||||
else if (res != 1)
|
else {
|
||||||
|
debug(context, "EVP_VerifyFinal() returned %d\n", res);
|
||||||
return CKR_GENERAL_ERROR;
|
return CKR_GENERAL_ERROR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
RSA *rsa;
|
RSA *rsa;
|
||||||
|
@ -298,6 +300,7 @@ CK_RV sc_pkcs11_verify_data(unsigned char *pubkey, int pubkey_len,
|
||||||
RSA_free(rsa);
|
RSA_free(rsa);
|
||||||
if(rsa_outlen <= 0) {
|
if(rsa_outlen <= 0) {
|
||||||
free(rsa_out);
|
free(rsa_out);
|
||||||
|
debug(context, "RSA_public_decrypt() returned %d\n", rsa_outlen);
|
||||||
return CKR_GENERAL_ERROR;
|
return CKR_GENERAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue