diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-04-26 22:18:22 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-04-26 22:18:22 +0000 |
commit | d4f0339c66eace1b7f90f07f43b6d8595342cce3 (patch) | |
tree | 9d747a5557303d6ac558c0f5a3c96e553a13e9c0 /engines | |
parent | 127186bf574430546ef48bf3a82d5b3697c522c1 (diff) |
Update from 1.0.0-stable.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/e_capi.c | 2 | ||||
-rw-r--r-- | engines/e_gmp.c | 2 | ||||
-rw-r--r-- | engines/e_ubsec.c | 15 |
3 files changed, 11 insertions, 8 deletions
diff --git a/engines/e_capi.c b/engines/e_capi.c index e98946c85a..01ef96b85f 100644 --- a/engines/e_capi.c +++ b/engines/e_capi.c @@ -56,12 +56,12 @@ #include <string.h> #include <openssl/crypto.h> #include <openssl/buffer.h> -#include <openssl/rsa.h> #include <openssl/bn.h> #ifdef OPENSSL_SYS_WIN32 #ifndef OPENSSL_NO_CAPIENG +#include <openssl/rsa.h> #include <windows.h> diff --git a/engines/e_gmp.c b/engines/e_gmp.c index dc9f295e9b..c1f5601b62 100644 --- a/engines/e_gmp.c +++ b/engines/e_gmp.c @@ -85,7 +85,9 @@ #include <openssl/crypto.h> #include <openssl/buffer.h> #include <openssl/engine.h> +#ifndef OPENSSL_NO_RSA #include <openssl/rsa.h> +#endif #include <openssl/bn.h> #ifndef OPENSSL_NO_HW diff --git a/engines/e_ubsec.c b/engines/e_ubsec.c index e8389de6a1..fe6bdba25b 100644 --- a/engines/e_ubsec.c +++ b/engines/e_ubsec.c @@ -95,14 +95,14 @@ static int ubsec_finish(ENGINE *e); static int ubsec_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void)); static int ubsec_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx); +#ifndef OPENSSL_NO_RSA static int ubsec_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *q, const BIGNUM *dp, const BIGNUM *dq, const BIGNUM *qinv, BN_CTX *ctx); -#ifndef OPENSSL_NO_RSA static int ubsec_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx); -#endif static int ubsec_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); +#endif #ifndef OPENSSL_NO_DSA #ifdef NOT_USED static int ubsec_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1, @@ -302,10 +302,10 @@ static t_UBSEC_diffie_hellman_generate_ioctl *p_UBSEC_diffie_hellman_generate_ioctl = NULL; static t_UBSEC_diffie_hellman_agree_ioctl *p_UBSEC_diffie_hellman_agree_ioctl = NULL; #endif -/* #ifndef OPENSSL_NO_RSA */ static t_UBSEC_rsa_mod_exp_ioctl *p_UBSEC_rsa_mod_exp_ioctl = NULL; +#ifndef OPENSSL_NO_RSA static t_UBSEC_rsa_mod_exp_crt_ioctl *p_UBSEC_rsa_mod_exp_crt_ioctl = NULL; -/* #endif */ +#endif #ifndef OPENSSL_NO_DSA static t_UBSEC_dsa_sign_ioctl *p_UBSEC_dsa_sign_ioctl = NULL; static t_UBSEC_dsa_verify_ioctl *p_UBSEC_dsa_verify_ioctl = NULL; @@ -624,7 +624,6 @@ static int ubsec_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) err: return to_return; } -#endif static int ubsec_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *q, const BIGNUM *dp, @@ -672,6 +671,7 @@ static int ubsec_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, r->top = (BN_num_bits(p) + BN_num_bits(q) + BN_BITS2 - 1)/BN_BITS2; return 1; } +#endif #ifndef OPENSSL_NO_DSA #ifdef NOT_USED @@ -704,6 +704,8 @@ static int ubsec_mod_exp_dsa(DSA *dsa, BIGNUM *r, BIGNUM *a, #endif #endif +#ifndef OPENSSL_NO_RSA + /* * This function is aliased to mod_exp (with the mont stuff dropped). */ @@ -712,7 +714,6 @@ static int ubsec_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, { int ret = 0; -#ifndef OPENSSL_NO_RSA /* Do in software if the key is too large for the hardware. */ if (BN_num_bits(m) > max_key_len) { @@ -720,13 +721,13 @@ static int ubsec_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, ret = (*meth->bn_mod_exp)(r, a, p, m, ctx, m_ctx); } else -#endif { ret = ubsec_mod_exp(r, a, p, m, ctx); } return ret; } +#endif #ifndef OPENSSL_NO_DH /* This function is aliased to mod_exp (with the dh and mont dropped). */ |