Fixes to allow signature_algorithms extension to send SHA1 (if enabled) and NO_OLD_TLS is defined. This resolves an issue connected to ISS servers.

This commit is contained in:
David Garske
2017-03-01 19:07:13 -08:00
parent b86dfd582f
commit d903059e05

View File

@@ -1672,7 +1672,7 @@ static void InitSuitesHashSigAlgo(Suites* suites, int haveECDSAsig,
suites->hashSigAlgo[idx++] = sha256_mac; suites->hashSigAlgo[idx++] = sha256_mac;
suites->hashSigAlgo[idx++] = ecc_dsa_sa_algo; suites->hashSigAlgo[idx++] = ecc_dsa_sa_algo;
#endif #endif
#if !defined(NO_SHA) && !defined(NO_OLD_TLS) #if !defined(NO_SHA)
suites->hashSigAlgo[idx++] = sha_mac; suites->hashSigAlgo[idx++] = sha_mac;
suites->hashSigAlgo[idx++] = ecc_dsa_sa_algo; suites->hashSigAlgo[idx++] = ecc_dsa_sa_algo;
#endif #endif
@@ -1691,7 +1691,7 @@ static void InitSuitesHashSigAlgo(Suites* suites, int haveECDSAsig,
suites->hashSigAlgo[idx++] = sha256_mac; suites->hashSigAlgo[idx++] = sha256_mac;
suites->hashSigAlgo[idx++] = rsa_sa_algo; suites->hashSigAlgo[idx++] = rsa_sa_algo;
#endif #endif
#if !defined(NO_SHA) && !defined(NO_OLD_TLS) #if !defined(NO_SHA)
suites->hashSigAlgo[idx++] = sha_mac; suites->hashSigAlgo[idx++] = sha_mac;
suites->hashSigAlgo[idx++] = rsa_sa_algo; suites->hashSigAlgo[idx++] = rsa_sa_algo;
#endif #endif
@@ -14749,7 +14749,7 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
#endif #endif
break; break;
case sha_mac: case sha_mac:
#ifndef NO_OLD_TLS #ifndef NO_SHA
hashType = WC_HASH_TYPE_SHA; hashType = WC_HASH_TYPE_SHA;
#endif #endif
break; break;
@@ -17756,7 +17756,7 @@ int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
#endif #endif
break; break;
case sha_mac: case sha_mac:
#ifndef NO_OLD_TLS #ifndef NO_SHA
hashType = WC_HASH_TYPE_SHA; hashType = WC_HASH_TYPE_SHA;
#endif #endif
break; break;
@@ -17850,7 +17850,7 @@ int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
#endif #endif
break; break;
case sha_mac: case sha_mac:
#ifndef NO_OLD_TLS #ifndef NO_SHA
typeH = SHAh; typeH = SHAh;
#endif #endif
break; break;
@@ -18020,7 +18020,7 @@ int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
#endif #endif
break; break;
case sha_mac: case sha_mac:
#ifndef NO_OLD_TLS #ifndef NO_SHA
hashType = WC_HASH_TYPE_SHA; hashType = WC_HASH_TYPE_SHA;
#endif #endif
break; break;
@@ -18109,7 +18109,7 @@ int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
#endif #endif
break; break;
case sha_mac: case sha_mac:
#ifndef NO_OLD_TLS #ifndef NO_SHA
typeH = SHAh; typeH = SHAh;
#endif #endif
break; break;