mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Improve val_sigcrypt.c::algo_needs_missing for one loop pass.
This commit is contained in:
parent
a30286502c
commit
c513119bba
2 changed files with 8 additions and 6 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
- For #660: formatting, less verbose logging, add EDE information.
|
- For #660: formatting, less verbose logging, add EDE information.
|
||||||
- Fix for correct openssl error when adding windows CA certificates to
|
- Fix for correct openssl error when adding windows CA certificates to
|
||||||
the openssl trust store.
|
the openssl trust store.
|
||||||
|
- Improve val_sigcrypt.c::algo_needs_missing for one loop pass.
|
||||||
|
|
||||||
1 July 2022: George
|
1 July 2022: George
|
||||||
- Merge PR #706: NXNS fallback.
|
- Merge PR #706: NXNS fallback.
|
||||||
|
|
|
||||||
|
|
@ -513,15 +513,16 @@ size_t algo_needs_num_missing(struct algo_needs* n)
|
||||||
|
|
||||||
int algo_needs_missing(struct algo_needs* n)
|
int algo_needs_missing(struct algo_needs* n)
|
||||||
{
|
{
|
||||||
int i;
|
int i, miss = -1;
|
||||||
/* first check if a needed algo was bogus - report that */
|
/* check if a needed algo was bogus - report that;
|
||||||
|
* check the first missing algo - report that;
|
||||||
|
* or return 0 */
|
||||||
for(i=0; i<ALGO_NEEDS_MAX; i++)
|
for(i=0; i<ALGO_NEEDS_MAX; i++)
|
||||||
if(n->needs[i] == 2)
|
if(n->needs[i] == 2)
|
||||||
return 0;
|
return 0;
|
||||||
/* now check which algo is missing */
|
if(n->needs[i] == 1 && miss == -1)
|
||||||
for(i=0; i<ALGO_NEEDS_MAX; i++)
|
miss = i;
|
||||||
if(n->needs[i] == 1)
|
if(miss != -1) return miss;
|
||||||
return i;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue