Control: tags -1 + moreinfo On 2019-09-05 22:41, Marco d'Itri wrote: [...]
++ switch(level)
++ {
++ case 0: /* Everything is permitted. */
++ case 1: /* DH keys shorter than 1024 bits are prohibited. */
++ case 2: /* DH keys shorter than 2048 bits are prohibited. */
++ if (ffdhe2048 == NULL) {
++ ffdhe2048 = load_dh_buffer(file_ffdhe2048,
++ sizeof(file_ffdhe2048));
++ r = ffdhe2048;
++ }
++ break;
[etc]
++ return r;
Shouldn't the assignment to "r" be outside of the conditional? Otherwise, if ffdheX has previously been initialised, the function will return NULL rather than the previously loaded buffer.
Regards, Adam