Google devs: Tearing Chrome away from OpenSSL not that easy
Custom BoringSSL fork not quite a drop-in replacement yet
Google is trying to migrate its Chrome browser away from the buggy OpenSSL cryptography library toward BoringSSL, its homegrown fork, but swapping out the crypto code is proving more difficult than it sounds.
Google engineer David Benjamin posted a revision to the Chromium source code version control system this week with a seemingly simple aim: "Switch to BoringSSL." But in his revision notes he observed that this wasn't the first time this particular change has been tried.
The first time the BoringSSL code was added to the Chromium tree was on July 16, but it was quickly pulled back out again after developers found it broke the build of the WebView component for Android.
The next attempt was on July 17, but that one caused problems with WebRTC on Android, so the Chromium code was reverted to its former state again.
The third time wasn't a charm, either. The BoringSSL code was added back in on July 18 but was reverted after just a few hours, again because of build issues.
Google would like to replace OpenSSL with BoringSSL in Chrome for several reasons, not least of which because of Heartbleed and other vulnerabilities that have recently cropped up in OpenSSL's infamously hard-to-maintain code base.
In response to the Heartbleed debacle, a group of OpenBSD developers created an OpenSSL fork called LibreSSL that's designed to be a drop-in replacement for the OpenSSL library. But that project is still in its early phases, and Google says it has long relied on its own, custom patches to the code, many of which are "a little too experimental" to be included in LibreSSL.
Hence BoringSSL, a new fork that was announced by Google developer Adam Langley in June. BoringSSL incorporates the patches the Chocolate Factory has been adding to the OpenSSL code for its own use, while drawing from the latest clean-up work the LibreSSL crew has been doing to make the source code tree more manageable.
Unfortunately, however, it seems even Google's own custom code base can be difficult to incorporate into other projects – which just goes to illustrate how hard it can be for developers to work with the original OpenSSL code.
As Benjamin explained in the notes to his July 22 Chromium project code revision, "This [switching to BoringSSL] is a much larger change than its diff suggests. If it breaks something, please revert first and ask questions later." ®