Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -3029,7 +3029,7 @@ int wolfSSL_crypto_policy_init_ctx(WOLFSSL_CTX * ctx,
break;
case 0:
default:
ctx->minDowngrade = WOLFSSL_MIN_DOWNGRADE;
minDowngrade = WOLFSSL_MIN_DOWNGRADE;
break;
}
}
Expand Down Expand Up @@ -3171,7 +3171,6 @@ int InitSSL_Ctx(WOLFSSL_CTX* ctx, WOLFSSL_METHOD* method, void* heap)
else
#endif /* WOLFSSL_DTLS */
{
/* current default: TLSv1_MINOR */
ctx->minDowngrade = WOLFSSL_MIN_DOWNGRADE;
}

Expand Down Expand Up @@ -33891,7 +33890,7 @@ static byte GetSigAlgFromName(const char* name, int len)
*
* suites [in,out] Cipher suites and signature algorithms.
* list [in] String representing hash/signature algorithms to set.
* returns 0 on failure.
* returns 0 on failure, leaving suites unchanged.
* 1 on success.
*/
int SetSuitesHashSigAlgo(Suites* suites, const char* list)
Expand All @@ -33901,9 +33900,7 @@ int SetSuitesHashSigAlgo(Suites* suites, const char* list)
const char* s = list;
byte sig_alg = 0;
byte mac_alg = no_mac;

/* Setting is destructive on error. */
suites->hashSigAlgoSz = 0;
byte hashSigAlgo[WOLFSSL_MAX_SIGALGO];

do {
if (*list == '+') {
Expand Down Expand Up @@ -33943,7 +33940,7 @@ int SetSuitesHashSigAlgo(Suites* suites, const char* list)
break;
}
}
AddSuiteHashSigAlgo(suites->hashSigAlgo, mac_alg, sig_alg, 0, &idx);
AddSuiteHashSigAlgo(hashSigAlgo, mac_alg, sig_alg, 0, &idx);
sig_alg = 0;
mac_alg = no_mac;
s = list + 1;
Expand All @@ -33956,7 +33953,8 @@ int SetSuitesHashSigAlgo(Suites* suites, const char* list)
if (s != list && (sig_alg != 0 || mac_alg != 0)) {
ret = 0;
}
else {
if (ret == 1) {
XMEMCPY(suites->hashSigAlgo, hashSigAlgo, idx);
suites->hashSigAlgoSz = idx;
}

Expand Down
Loading
Loading