mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-05 21:54:41 +02:00
remove some not compiled ins
This commit is contained in:
@@ -2726,10 +2726,13 @@ static void BuildFinished(CYASSL* ssl, Hashes* hashes, const byte* sender)
|
|||||||
Sha384 sha384 = ssl->hashSha384;
|
Sha384 sha384 = ssl->hashSha384;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ssl->options.tls)
|
#ifndef NO_TLS
|
||||||
|
if (ssl->options.tls) {
|
||||||
BuildTlsFinished(ssl, hashes, sender);
|
BuildTlsFinished(ssl, hashes, sender);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#ifndef NO_OLD_TLS
|
#ifndef NO_OLD_TLS
|
||||||
else {
|
if (!ssl->options.tls) {
|
||||||
BuildMD5(ssl, hashes, sender);
|
BuildMD5(ssl, hashes, sender);
|
||||||
BuildSHA(ssl, hashes, sender);
|
BuildSHA(ssl, hashes, sender);
|
||||||
}
|
}
|
||||||
@@ -6917,13 +6920,15 @@ int SetCipherList(Suites* s, const char* list)
|
|||||||
int ret;
|
int ret;
|
||||||
XMEMCPY(ssl->arrays->masterSecret,
|
XMEMCPY(ssl->arrays->masterSecret,
|
||||||
ssl->session.masterSecret, SECRET_LEN);
|
ssl->session.masterSecret, SECRET_LEN);
|
||||||
#ifndef NO_OLD_TLS
|
#ifdef NO_OLD_TLS
|
||||||
if (ssl->options.tls)
|
|
||||||
ret = DeriveTlsKeys(ssl);
|
|
||||||
else
|
|
||||||
ret = DeriveKeys(ssl);
|
|
||||||
#else
|
|
||||||
ret = DeriveTlsKeys(ssl);
|
ret = DeriveTlsKeys(ssl);
|
||||||
|
#else
|
||||||
|
#ifndef NO_TLS
|
||||||
|
if (ssl->options.tls)
|
||||||
|
ret = DeriveTlsKeys(ssl);
|
||||||
|
#endif
|
||||||
|
if (!ssl->options.tls)
|
||||||
|
ret = DeriveKeys(ssl);
|
||||||
#endif
|
#endif
|
||||||
ssl->options.serverState = SERVER_HELLODONE_COMPLETE;
|
ssl->options.serverState = SERVER_HELLODONE_COMPLETE;
|
||||||
return ret;
|
return ret;
|
||||||
@@ -9162,13 +9167,15 @@ int SetCipherList(Suites* s, const char* list)
|
|||||||
ssl->session = *session; /* restore session certs. */
|
ssl->session = *session; /* restore session certs. */
|
||||||
#endif
|
#endif
|
||||||
RNG_GenerateBlock(ssl->rng, ssl->arrays->serverRandom, RAN_LEN);
|
RNG_GenerateBlock(ssl->rng, ssl->arrays->serverRandom, RAN_LEN);
|
||||||
#ifndef NO_OLD_TLS
|
#ifdef NO_OLD_TLS
|
||||||
if (ssl->options.tls)
|
|
||||||
ret = DeriveTlsKeys(ssl);
|
|
||||||
else
|
|
||||||
ret = DeriveKeys(ssl);
|
|
||||||
#else
|
|
||||||
ret = DeriveTlsKeys(ssl);
|
ret = DeriveTlsKeys(ssl);
|
||||||
|
#else
|
||||||
|
#ifndef NO_TLS
|
||||||
|
if (ssl->options.tls)
|
||||||
|
ret = DeriveTlsKeys(ssl);
|
||||||
|
#endif
|
||||||
|
if (!ssl->options.tls)
|
||||||
|
ret = DeriveKeys(ssl);
|
||||||
#endif
|
#endif
|
||||||
ssl->options.clientState = CLIENT_KEYEXCHANGE_COMPLETE;
|
ssl->options.clientState = CLIENT_KEYEXCHANGE_COMPLETE;
|
||||||
|
|
||||||
@@ -9379,13 +9386,15 @@ int SetCipherList(Suites* s, const char* list)
|
|||||||
ssl->session = *session; /* restore session certs. */
|
ssl->session = *session; /* restore session certs. */
|
||||||
#endif
|
#endif
|
||||||
RNG_GenerateBlock(ssl->rng, ssl->arrays->serverRandom, RAN_LEN);
|
RNG_GenerateBlock(ssl->rng, ssl->arrays->serverRandom, RAN_LEN);
|
||||||
#ifndef NO_OLD_TLS
|
#ifdef NO_OLD_TLS
|
||||||
if (ssl->options.tls)
|
|
||||||
ret = DeriveTlsKeys(ssl);
|
|
||||||
else
|
|
||||||
ret = DeriveKeys(ssl);
|
|
||||||
#else
|
|
||||||
ret = DeriveTlsKeys(ssl);
|
ret = DeriveTlsKeys(ssl);
|
||||||
|
#else
|
||||||
|
#ifndef NO_TLS
|
||||||
|
if (ssl->options.tls)
|
||||||
|
ret = DeriveTlsKeys(ssl);
|
||||||
|
#endif
|
||||||
|
if (!ssl->options.tls)
|
||||||
|
ret = DeriveKeys(ssl);
|
||||||
#endif
|
#endif
|
||||||
ssl->options.clientState = CLIENT_KEYEXCHANGE_COMPLETE;
|
ssl->options.clientState = CLIENT_KEYEXCHANGE_COMPLETE;
|
||||||
|
|
||||||
|
29
src/tls.c
29
src/tls.c
@@ -620,34 +620,5 @@ void TLS_hmac(CYASSL* ssl, byte* digest, const byte* in, word32 sz,
|
|||||||
|
|
||||||
|
|
||||||
#endif /* NO_CYASSL_SERVER */
|
#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 */
|
#endif /* NO_TLS */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user