--- a/src/util_ssl.c 2007-06-10 21:32:28.000000000 +0200 +++ b/src/util_ssl.c 2026-10-16 22:26:24.145846321 +0200 @@ -104,12 +104,13 @@ static DH *get_dh512() }; DH *dh; + BIGNUM *p, *g; if ((dh=DH_new()) == NULL) return(NULL); - dh->p=BN_bin2bn(dh512_p,sizeof(dh512_p),NULL); - dh->g=BN_bin2bn(dh512_g,sizeof(dh512_g),NULL); - if ((dh->p == NULL) || (dh->g == NULL)) - { DH_free(dh); return(NULL); } + p=BN_bin2bn(dh512_p,sizeof(dh512_p),NULL); + g=BN_bin2bn(dh512_g,sizeof(dh512_g),NULL); + if ((p == NULL) || (g == NULL) || !DH_set0_pqg(dh, p, NULL, g)) + { BN_free(p); BN_free(g); DH_free(dh); return(NULL); } return(dh); }