- removed some dead code

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@787 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
okir 2002-12-18 09:23:10 +00:00
parent aef2a27160
commit ca82169e63
2 changed files with 0 additions and 45 deletions

View File

@ -204,32 +204,6 @@ static int bn2cf(sc_pkcs15_bignum_t *num, u8 *buf)
return num->len;
}
#if 0
static int gen_d(RSA *rsa)
{
BN_CTX *ctx, *ctx2;
BIGNUM *r0, *r1, *r2;
ctx = BN_CTX_new();
ctx2 = BN_CTX_new();
BN_CTX_start(ctx);
r0 = BN_CTX_get(ctx);
r1 = BN_CTX_get(ctx);
r2 = BN_CTX_get(ctx);
BN_sub(r1, rsa->p, BN_value_one());
BN_sub(r2, rsa->q, BN_value_one());
BN_mul(r0, r1, r2, ctx);
if ((rsa->d = BN_mod_inverse(NULL, rsa->e, r0, ctx2)) == NULL) {
fprintf(stderr, "BN_mod_inverse() failed.\n");
return -1;
}
BN_CTX_end(ctx);
BN_CTX_free(ctx);
BN_CTX_free(ctx2);
return 0;
}
#endif
static int cflex_encode_private_key(struct sc_pkcs15_prkey_rsa *rsa, u8 *key, size_t *keysize, int key_num)
{
u8 buf[512], *p = buf;

View File

@ -950,25 +950,6 @@ gpk_store_pk(struct sc_profile *profile, struct sc_card *card,
return r;
}
#ifdef notdef
static int
gpk_bin2bn(const unsigned char *src, unsigned int len, BIGNUM **bn)
{
unsigned char num[1024];
unsigned int n;
if (len > sizeof(num)) {
error(profile, "number too big (%u bits)?", len * 8);
return SC_ERROR_INVALID_ARGUMENTS;
}
for (n = 0; n < len; n++)
num[n] = src[len-1-n];
*bn = BN_bin2bn(num, len, *bn);
return 0;
}
#endif
static void
error(struct sc_profile *profile, const char *fmt, ...)
{