forked from ossrs/srs
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug for upgrading to OpenSSL 3.0. v5.0.189 (ossrs#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>
- Loading branch information
1 parent
7d7e793
commit 95e3d57
Showing
3 changed files
with
3 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,6 @@ | |
|
||
#define VERSION_MAJOR 5 | ||
#define VERSION_MINOR 0 | ||
#define VERSION_REVISION 188 | ||
#define VERSION_REVISION 189 | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters