- properly identify supported algorithms
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@639 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
c967dd808e
commit
04499ddb48
|
@ -62,12 +62,26 @@ int etoken_match_card(struct sc_card *card)
|
|||
|
||||
int etoken_init(struct sc_card *card)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
card->cla = 0x00;
|
||||
|
||||
/* Tell the upper layers we do our own payload chunking
|
||||
* in read/update/write_binary */
|
||||
card->caps |= SC_CARD_CAP_APDU_EXT;
|
||||
|
||||
/* Set up algorithm info. */
|
||||
flags = SC_ALGORITHM_RSA_HASH_MD5 | SC_ALGORITHM_RSA_HASH_SHA1
|
||||
| SC_ALGORITHM_RSA_HASH_MD5_SHA1
|
||||
| SC_ALGORITHM_RSA_PAD_PKCS1
|
||||
#ifdef notyet
|
||||
| SC_ALGORITHM_ONBOARD_KEY_GEN
|
||||
#endif
|
||||
;
|
||||
_sc_card_add_rsa_alg(card, 512, flags, 0);
|
||||
_sc_card_add_rsa_alg(card, 768, flags, 0);
|
||||
_sc_card_add_rsa_alg(card, 1024, flags, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue