remove some not compiled ins

This commit is contained in:
toddouska 2013-05-09 15:33:37 -07:00
parent 8f0b695249
commit 712b3dd17c
2 changed files with 29 additions and 49 deletions

View File

@ -2726,10 +2726,13 @@ static void BuildFinished(CYASSL* ssl, Hashes* hashes, const byte* sender)
Sha384 sha384 = ssl->hashSha384;
#endif
if (ssl->options.tls)
#ifndef NO_TLS
if (ssl->options.tls) {
BuildTlsFinished(ssl, hashes, sender);
}
#endif
#ifndef NO_OLD_TLS
else {
if (!ssl->options.tls) {
BuildMD5(ssl, hashes, sender);
BuildSHA(ssl, hashes, sender);
}
@ -6917,13 +6920,15 @@ int SetCipherList(Suites* s, const char* list)
int ret;
XMEMCPY(ssl->arrays->masterSecret,
ssl->session.masterSecret, SECRET_LEN);
#ifndef NO_OLD_TLS
if (ssl->options.tls)
ret = DeriveTlsKeys(ssl);
else
ret = DeriveKeys(ssl);
#else
#ifdef NO_OLD_TLS
ret = DeriveTlsKeys(ssl);
#else
#ifndef NO_TLS
if (ssl->options.tls)
ret = DeriveTlsKeys(ssl);
#endif
if (!ssl->options.tls)
ret = DeriveKeys(ssl);
#endif
ssl->options.serverState = SERVER_HELLODONE_COMPLETE;
return ret;
@ -9162,13 +9167,15 @@ int SetCipherList(Suites* s, const char* list)
ssl->session = *session; /* restore session certs. */
#endif
RNG_GenerateBlock(ssl->rng, ssl->arrays->serverRandom, RAN_LEN);
#ifndef NO_OLD_TLS
if (ssl->options.tls)
ret = DeriveTlsKeys(ssl);
else
ret = DeriveKeys(ssl);
#else
#ifdef NO_OLD_TLS
ret = DeriveTlsKeys(ssl);
#else
#ifndef NO_TLS
if (ssl->options.tls)
ret = DeriveTlsKeys(ssl);
#endif
if (!ssl->options.tls)
ret = DeriveKeys(ssl);
#endif
ssl->options.clientState = CLIENT_KEYEXCHANGE_COMPLETE;
@ -9379,13 +9386,15 @@ int SetCipherList(Suites* s, const char* list)
ssl->session = *session; /* restore session certs. */
#endif
RNG_GenerateBlock(ssl->rng, ssl->arrays->serverRandom, RAN_LEN);
#ifndef NO_OLD_TLS
if (ssl->options.tls)
ret = DeriveTlsKeys(ssl);
else
ret = DeriveKeys(ssl);
#else
#ifdef NO_OLD_TLS
ret = DeriveTlsKeys(ssl);
#else
#ifndef NO_TLS
if (ssl->options.tls)
ret = DeriveTlsKeys(ssl);
#endif
if (!ssl->options.tls)
ret = DeriveKeys(ssl);
#endif
ssl->options.clientState = CLIENT_KEYEXCHANGE_COMPLETE;

View File

@ -620,34 +620,5 @@ void TLS_hmac(CYASSL* ssl, byte* digest, const byte* in, word32 sz,
#endif /* NO_CYASSL_SERVER */
#else /* NO_TLS */
/* catch CyaSSL programming errors */
void BuildTlsFinished(CYASSL* ssl, Hashes* hashes, const byte* sender)
{
}
int DeriveTlsKeys(CYASSL* ssl)
{
return NOT_COMPILED_IN;
}
int MakeTlsMasterSecret(CYASSL* ssl)
{
return NOT_COMPILED_IN;
}
int CyaSSL_make_eap_keys(CYASSL* ssl, void* msk, unsigned int len,
const char* label)
{
return NOT_COMPILED_IN;
}
#endif /* NO_TLS */