-
-
Notifications
You must be signed in to change notification settings - Fork 11k
Clean up Windows RNG #512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up Windows RNG #512
Conversation
|
Suggesting |
|
Seems like a good idea @vszakats, PR updated. |
|
Thank you @xoloki! |
|
RAND_screen() should go too IMO. |
|
See also https://rt.openssl.org/Ticket/Display.html?id=2485 Probably are some other ones related. |
|
Done @ghedo. I wasn't sure what to do with libeay.num, so I marked RAND_screen as NOEXIST. Hopefully I don't need to renumerate the entire file. |
|
I don't have rt access @richsalz, how do I get it? |
|
User guest password guest |
|
Thanks @richsalz. That RT is exactly what I saw, though in my case it had the decency to crash and not deadlock. The crash appeared frequently (~66% of the time) when running my application under the VS debugger. |
|
@xoloki RAND_event() too probably. Also, |
|
Done @ghedo. I built on windows and verified that we could get rid of one #include. The VC-WIN64A build seems a little broken in general, but I was able to build libeay32.lib so rand_win seems good. |
|
Oh, wow, I didn't know we had a |
|
Done @ghedo. Nothing was even referencing winrand.c. |
|
Also, I noticed that the debug-VC configure targets are missing in master. How do I do a debug windows build now @ghedo? |
|
@OscarLinden, thanks for noticing. You need the following patch (to be committed soon): |
|
Thanks @levitte! I don't have a pressing need to build debug now, so I'll wait for that change to hit master. |
Reviewed-by: Kurt Roeckx <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Rich Salz <[email protected]> (Merged from openssl#1042)
Reviewed-by: Rich Salz <[email protected]>
Fix some missing OBJ_dup failure checks. Merged from https://boringssl.googlesource.com/boringssl/+/0ce78a757d815c0dde9ed5884229f3a5b2cb3e9c%5E! Reviewed-by: Kurt Roeckx <[email protected]> Reviewed-by: Richard Levitte <[email protected]> (Merged from openssl#1057)
- "/Ox /O2 /Ob2" get's reduced to "/O2", the reason being:
/Ox = /Ob2 /Og /Oi /Ot /Oy /Gs
/O2 = /Ob2 /Og /Oi /Ot /Oy /Gs /GF /Gy
- apps/openssl.cnf gets installed.
- always delete files quietly, as they might not be there.
Reviewed-by: Matt Caswell <[email protected]>
(Merged from openssl#1075)
Add a status return value instead of void. Add some sanity checks on reference counter value. Update the docs. Reviewed-by: Rich Salz <[email protected]> Reviewed-by: Matt Caswell <[email protected]>
Since 50932c4 "PACKETise ServerHello processing", ssl_next_proto_validate() incorrectly allows empty protocol name. draft-agl-tls-nextprotoneg-04[1] says "Implementations MUST ensure that the empty string is not included and that no byte strings are truncated." This patch restores the old correct behavior. [1] https://tools.ietf.org/html/draft-agl-tls-nextprotoneg-04 Reviewed-by: Emilia Käsper <[email protected]> Reviewed-by: Matt Caswell <[email protected]>
|
This looks genarlly ok to me, but I'd feel happier if someone with more Windows knowledge than me took a look. |
… calling conventions
|
I did the rebase, but I couldn't push to my fork without a single merge at the end. Is this okay? |
|
No - there can't be any merge commits. Also looks like you messed up somehow. This PR is now showing a whole load of changes which aren't yours. |
|
I'll make a new branch and cherry pick all my actual commits. The commits from other people showed up days ago, no idea how that happened... |
|
@xoloki why not just do "git rebase master" from inside your branch? You might want to squash into a single commit as well. |
|
I'm on a fork, so I did git rebase upstream/master From my fork's master branch. But then I couldn't push back to my fork without an extra git pull Which added another merge. Will git rebase master On my fork's master actually work? |
|
Ok, new PR-1079: On 5/16/2016 6:10 AM, mattcaswell wrote:
|
|
Replaced by #1079 |
|
@xoloki then I think you needed to just do |
This PR removes all of the dangerous Windows entropy gathering routines in favor of standard CryptGenRandom calls, as was discussed in the "Improving OpenSSL default RNG" thread on openssl-dev. This fixes common, repeatable crashes that happen when running openssl under the VS debugger.
We will likely lose support for some ancient versions of WINCE with this change, so it should only go in master for now. I would strongly argue in favor of putting this in 1.1.0, but it should probably not go into 1.0.2 (as much as I'd like to see it there).