diff options
author | Rich Salz <rsalz@openssl.org> | 2015-01-24 16:57:19 +0100 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-01-24 16:58:38 +0100 |
commit | a2b18e657ea1a932d125154f4e13ab2258796d90 (patch) | |
tree | bdfcb8bbe1d673b3bce209ef289520e11a109464 /demos | |
parent | Fix segfault with empty fields as last in the config. (diff) | |
download | openssl-a2b18e657ea1a932d125154f4e13ab2258796d90.tar.xz openssl-a2b18e657ea1a932d125154f4e13ab2258796d90.zip |
ifdef cleanup, part 4a: '#ifdef undef'
This removes all code surrounded by '#ifdef undef'
One case is left: memmove() replaced by open-coded for loop,
in crypto/stack/stack.c That needs further review.
Also removed a couple of instances of /* dead code */ if I saw them
while doing the main removal.
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'demos')
-rw-r--r-- | demos/engines/rsaref/rsaref.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/demos/engines/rsaref/rsaref.c b/demos/engines/rsaref/rsaref.c index 498cc7098f..b6429de1a7 100644 --- a/demos/engines/rsaref/rsaref.c +++ b/demos/engines/rsaref/rsaref.c @@ -324,31 +324,6 @@ static int RSAref_bn2bin(BIGNUM *from, unsigned char *to, int max) return (1); } -#ifdef undef -/* unsigned char *from: [max] */ -static BIGNUM *RSAref_bin2bn(unsigned char *from, BIGNUM *to, int max) -{ - int i; - BIGNUM *ret; - - for (i = 0; i < max; i++) - if (from[i]) - break; - - ret = BN_bin2bn(&(from[i]), max - i, to); - return (ret); -} - -static int RSAref_Public_ref2eay(RSArefPublicKey * from, RSA *to) -{ - to->n = RSAref_bin2bn(from->m, NULL, RSAref_MAX_LEN); - to->e = RSAref_bin2bn(from->e, NULL, RSAref_MAX_LEN); - if ((to->n == NULL) || (to->e == NULL)) - return (0); - return (1); -} -#endif - static int RSAref_Public_eay2ref(RSA *from, R_RSA_PUBLIC_KEY * to) { to->bits = BN_num_bits(from->n); @@ -359,33 +334,6 @@ static int RSAref_Public_eay2ref(RSA *from, R_RSA_PUBLIC_KEY * to) return (1); } -#ifdef undef -static int RSAref_Private_ref2eay(RSArefPrivateKey * from, RSA *to) -{ - if ((to->n = RSAref_bin2bn(from->m, NULL, RSAref_MAX_LEN)) == NULL) - return (0); - if ((to->e = RSAref_bin2bn(from->e, NULL, RSAref_MAX_LEN)) == NULL) - return (0); - if ((to->d = RSAref_bin2bn(from->d, NULL, RSAref_MAX_LEN)) == NULL) - return (0); - if ((to->p = - RSAref_bin2bn(from->prime[0], NULL, RSAref_MAX_PLEN)) == NULL) - return (0); - if ((to->q = - RSAref_bin2bn(from->prime[1], NULL, RSAref_MAX_PLEN)) == NULL) - return (0); - if ((to->dmp1 = RSAref_bin2bn(from->pexp[0], NULL, RSAref_MAX_PLEN)) - == NULL) - return (0); - if ((to->dmq1 = RSAref_bin2bn(from->pexp[1], NULL, RSAref_MAX_PLEN)) - == NULL) - return (0); - if ((to->iqmp = RSAref_bin2bn(from->coef, NULL, RSAref_MAX_PLEN)) == NULL) - return (0); - return (1); -} -#endif - static int RSAref_Private_eay2ref(RSA *from, R_RSA_PRIVATE_KEY * to) { to->bits = BN_num_bits(from->n); |