fix disable rsa w/ opensslextra

This commit is contained in:
toddouska
2014-06-19 15:59:24 -07:00
parent ae073cb1f9
commit 9642902c07
2 changed files with 12 additions and 2 deletions

View File

@ -9850,7 +9850,7 @@ static void PickHashSigAlgo(CYASSL* ssl,
} }
#endif /* HAVE_ECC */ #endif /* HAVE_ECC */
#ifdef OPENSSL_EXTRA #if defined(OPENSSL_EXTRA) && !defined(NO_RSA)
if (ssl->specs.kea == diffie_hellman_kea) { if (ssl->specs.kea == diffie_hellman_kea) {
byte *output; byte *output;
word32 length = 0, idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ; word32 length = 0, idx = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ;
@ -11447,6 +11447,7 @@ static void PickHashSigAlgo(CYASSL* ssl,
(void)out; (void)out;
(void)input; (void)input;
(void)size; (void)size;
(void)begin;
if (ssl->options.side != CYASSL_SERVER_END) { if (ssl->options.side != CYASSL_SERVER_END) {
CYASSL_MSG("Client received client keyexchange, attack?"); CYASSL_MSG("Client received client keyexchange, attack?");

View File

@ -10388,6 +10388,7 @@ static int initGlobalRNG = 0;
} }
#endif /* NO_DSA */ #endif /* NO_DSA */
#ifndef NO_RSA
static void InitCyaSSL_Rsa(CYASSL_RSA* rsa) static void InitCyaSSL_Rsa(CYASSL_RSA* rsa)
{ {
if (rsa) { if (rsa) {
@ -10463,8 +10464,10 @@ static int initGlobalRNG = 0;
XFREE(rsa, NULL, DYNAMIC_TYPE_RSA); XFREE(rsa, NULL, DYNAMIC_TYPE_RSA);
} }
} }
#endif /* NO_RSA */
#if !defined(NO_RSA) || !defined(NO_DSA)
static int SetIndividualExternal(CYASSL_BIGNUM** bn, mp_int* mpi) static int SetIndividualExternal(CYASSL_BIGNUM** bn, mp_int* mpi)
{ {
CYASSL_MSG("Entering SetIndividualExternal"); CYASSL_MSG("Entering SetIndividualExternal");
@ -10489,6 +10492,7 @@ static int initGlobalRNG = 0;
return 0; return 0;
} }
#endif /* !NO_RSA && !NO_DSA */
#ifndef NO_DSA #ifndef NO_DSA
@ -10536,6 +10540,7 @@ static int initGlobalRNG = 0;
#endif /* NO_DSA */ #endif /* NO_DSA */
#ifndef NO_RSA
static int SetRsaExternal(CYASSL_RSA* rsa) static int SetRsaExternal(CYASSL_RSA* rsa)
{ {
RsaKey* key; RsaKey* key;
@ -10685,6 +10690,7 @@ static int initGlobalRNG = 0;
return CyaSSL_BN_num_bytes(rsa->n); return CyaSSL_BN_num_bytes(rsa->n);
} }
#endif /* NO_RSA */
#ifndef NO_DSA #ifndef NO_DSA
@ -10726,6 +10732,7 @@ static int initGlobalRNG = 0;
#endif /* NO_DSA */ #endif /* NO_DSA */
#ifndef NO_RSA
/* return SSL_SUCCES on ok, 0 otherwise */ /* return SSL_SUCCES on ok, 0 otherwise */
int CyaSSL_RSA_sign(int type, const unsigned char* m, int CyaSSL_RSA_sign(int type, const unsigned char* m,
unsigned int mLen, unsigned char* sigRet, unsigned int mLen, unsigned char* sigRet,
@ -10857,6 +10864,7 @@ static int initGlobalRNG = 0;
else else
return SSL_FATAL_ERROR; return SSL_FATAL_ERROR;
} }
#endif /* NO_RSA */
void CyaSSL_HMAC_Init(CYASSL_HMAC_CTX* ctx, const void* key, int keylen, void CyaSSL_HMAC_Init(CYASSL_HMAC_CTX* ctx, const void* key, int keylen,
@ -11217,7 +11225,7 @@ static int initGlobalRNG = 0;
#ifndef NO_RSA
/* Load RSA from Der, SSL_SUCCESS on success < 0 on error */ /* Load RSA from Der, SSL_SUCCESS on success < 0 on error */
int CyaSSL_RSA_LoadDer(CYASSL_RSA* rsa, const unsigned char* der, int derSz) int CyaSSL_RSA_LoadDer(CYASSL_RSA* rsa, const unsigned char* der, int derSz)
{ {
@ -11246,6 +11254,7 @@ int CyaSSL_RSA_LoadDer(CYASSL_RSA* rsa, const unsigned char* der, int derSz)
return SSL_SUCCESS; return SSL_SUCCESS;
} }
#endif /* NO_RSA */
#ifndef NO_DSA #ifndef NO_DSA