mirror of https://github.com/ossrs/srs.git
Fix bug for upgrading to OpenSSL 3.0. v5.0.189 (#3827)
The fix is for the DH_set_length error. As shown in lines 2-5, OpenSSL 3.0 added a check for length, which allowed this issue to be exposed. ``` 1 if (dh->params.q == NULL) { 2 /* secret exponent length, must satisfy 2^(l-1) <= p */ 3 if (dh->length != 0 4 && dh->length >= BN_num_bits(dh->params.p)) 5 goto err; 6 l = dh->length ? dh->length : BN_num_bits(dh->params.p) - 1; 7 if (!BN_priv_rand_ex(priv_key, l, BN_RAND_TOP_ONE, 8 BN_RAND_BOTTOM_ANY, 0, ctx)) 9 goto err; ... ... } ``` --------- Co-authored-by: john <hondaxiao@tencent.com>5.0release
parent
53ebf58583
commit
ef7fe1b186
Loading…
Reference in New Issue