Add _sc_card_add_generic for registering secret key algorithms
This commit is contained in:
parent
35c5eb0659
commit
0576ccce0c
|
@ -952,6 +952,19 @@ int _sc_card_add_algorithm(sc_card_t *card, const sc_algorithm_info_t *info)
|
||||||
return SC_SUCCESS;
|
return SC_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int _sc_card_add_symmetric_alg(sc_card_t *card, unsigned int algorithm,
|
||||||
|
unsigned int key_length, unsigned long flags)
|
||||||
|
{
|
||||||
|
sc_algorithm_info_t info;
|
||||||
|
|
||||||
|
memset(&info, 0, sizeof(info));
|
||||||
|
info.algorithm = algorithm;
|
||||||
|
info.key_length = key_length;
|
||||||
|
info.flags = flags;
|
||||||
|
|
||||||
|
return _sc_card_add_algorithm(card, &info);
|
||||||
|
}
|
||||||
|
|
||||||
int _sc_card_add_ec_alg(sc_card_t *card, unsigned int key_length,
|
int _sc_card_add_ec_alg(sc_card_t *card, unsigned int key_length,
|
||||||
unsigned long flags, unsigned long ext_flags,
|
unsigned long flags, unsigned long ext_flags,
|
||||||
struct sc_object_id *curve_oid)
|
struct sc_object_id *curve_oid)
|
||||||
|
|
|
@ -128,6 +128,8 @@ scconf_block *_sc_match_atr_block(sc_context_t *ctx, struct sc_card_driver *driv
|
||||||
int _sc_match_atr(struct sc_card *card, struct sc_atr_table *table, int *type_out);
|
int _sc_match_atr(struct sc_card *card, struct sc_atr_table *table, int *type_out);
|
||||||
|
|
||||||
int _sc_card_add_algorithm(struct sc_card *card, const struct sc_algorithm_info *info);
|
int _sc_card_add_algorithm(struct sc_card *card, const struct sc_algorithm_info *info);
|
||||||
|
int _sc_card_add_symmetric_alg(sc_card_t *card, unsigned int algorithm,
|
||||||
|
unsigned int key_length, unsigned long flags);
|
||||||
int _sc_card_add_rsa_alg(struct sc_card *card, unsigned int key_length,
|
int _sc_card_add_rsa_alg(struct sc_card *card, unsigned int key_length,
|
||||||
unsigned long flags, unsigned long exponent);
|
unsigned long flags, unsigned long exponent);
|
||||||
int _sc_card_add_ec_alg(struct sc_card *card, unsigned int key_length,
|
int _sc_card_add_ec_alg(struct sc_card *card, unsigned int key_length,
|
||||||
|
|
Loading…
Reference in New Issue