bitwiseworks / qtwebengine-chromium-os2

Port of Chromium and related tools to OS/2
9 stars 2 forks source link

Make BoringSSL not use /dev/urandom on OS/2 #16

Closed dmik closed 4 years ago

dmik commented 4 years ago

From https://github.com/bitwiseworks/qtwebengine-os2/issues/6:

[46441:4:0814/011119.786000:ERROR:database.cc(1808)] Cookie sqlite error 14, errno -2: unable to open database file, sql: -- sqlite3_open()
[46441:4:0814/011119.859000:ERROR:sqlite_persistent_cookie_store.cc(773)] Unable to open cookie DB.
[46441:4:0814/011119.868000:ERROR:database.cc(1808)] Cookie sqlite error 14, errno -2: unable to open database file, sql: -- sqlite3_open()
[46441:4:0814/011119.868000:ERROR:sqlite_persistent_cookie_store.cc(773)] Unable to open cookie DB.
[46441:1:0814/011119.999000:ERROR:time_zone_monitor_os2.cc(30)] Not implemented reached in static std::unique_ptr<device::TimeZoneMonitor> device::TimeZoneMonitor::Create(scoped_refptr<base::SequencedTaskRunner>)
failed to open /dev/urandom: No such file or directory
[46441:5:0814/011120.573000:ERROR:debugger_posix.cc(176)] Not implemented reached in bool base::debug::BeingDebugged()
Received signal 6
[end of stack trace]
Calling _exit(1). Core file will not be generated.

The respective code is in third_party/boringssl/src/crypto/fipsmodule/rand/urandom.c. It shouldn't be built on OS/2 as well as on Windows (and RAND_set_urandom_fd should not be exported at all).

Note that there might be other Win/OS2 nuances.

dmik commented 4 years ago

WIth this fixed, the test app spits this:

[14830:6:0815/195636.986000:ERROR:cert_verify_proc_builtin.cc(463)] No net_fetcher for performing AIA chasing.
[14830:5:0815/195636.990000:ERROR:ssl_client_socket_impl.cc(962)] handshake failed; returned -1, SSL error code 1, net_error -202

but I'm not sure it's related to the fix so I leave it closed until proven otherwise and investigate the above error separately.