pkcs15-crypt tool: set HASH_NONE crypto flags when the hash do not asked

without this for the cards that have only RAW mechanism
it's not possible to compute signature with PKCS1 padding and without hash.
This commit is contained in:
Viktor Tarasov 2012-11-11 00:42:52 +01:00
parent 7fbca94698
commit 1d1abe4c21
1 changed files with 3 additions and 0 deletions

View File

@ -397,6 +397,9 @@ int main(int argc, char * const argv[])
if (action_count == 0)
util_print_usage_and_die(app_name, options, option_help, NULL);
if (!(opt_crypt_flags & SC_ALGORITHM_RSA_HASHES))
opt_crypt_flags |= SC_ALGORITHM_RSA_HASH_NONE;
memset(&ctx_param, 0, sizeof(ctx_param));
ctx_param.ver = 0;
ctx_param.app_name = app_name;