GIVE RANDOM is for sm, so remove it from the etoken key generation code

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2372 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
nils 2005-07-01 06:27:59 +00:00
parent 2819d87ce7
commit 3bbc9db115
3 changed files with 0 additions and 23 deletions

View File

@ -817,14 +817,6 @@ etoken_generate_key(sc_card_t *card,
u8 data[8];
int r;
if (args->random_len) {
/* XXX FIXME: do a GIVE_RANDOM command with this data */
sc_error(card->ctx,
"initialization of card's random pool "
"not yet implemented\n");
return SC_ERROR_INTERNAL;
}
data[0] = 0x20; /* store as PSO object */
data[1] = args->key_id;
data[2] = args->fid >> 8;

View File

@ -194,8 +194,6 @@ struct sc_cardctl_etoken_obj_info {
};
struct sc_cardctl_etoken_genkey_info {
u8 * random_data;
size_t random_len;
unsigned int key_id;
unsigned int key_bits;
unsigned short fid;

View File

@ -337,19 +337,6 @@ etoken_generate_key(sc_profile_t *profile, sc_card_t *card,
goto out;
memset(&args, 0, sizeof(args));
#ifdef notyet
if ((r = scrandom_get_data(randbuf, sizeof(randbuf))) < 0)
goto out;
/* For now, we have to rely on the card's internal number
* generator because libscrandom is static, which causes
* all sorts of headaches when linking against it
* (some platforms don't allow non-PIC code in a shared lib,
* such as ia64).
*/
args.random_data = randbuf;
args.random_len = sizeof(randbuf);
#endif
args.key_id = key_info->key_reference;
args.key_bits = keybits;
args.fid = temp->id;