Leak a reference to the ENGINE in the legacy client auth codepath.
On Android < 4.2, the libkeystore.so ENGINE uses CRYPTO_EX_DATA and is not added to the global engine list. If all references to it are dropped, OpenSSL will dlclose the module, leaving a dangling function pointer in the RSA CRYPTO_EX_DATA class. To work around this, leak an extra reference to the ENGINE we extract in GetRsaLegacyKey. This is exacerbated by https://codereview.chromium.org/27500004 which, at least on 4.1.2, causes the session cache and OpenSSLClientKeyStore to get dumped every time a client auth prompt comes up (https://crbug.com/381912). In 4.2, this change avoids the problem: https://android.googlesource.com/platform/libcore/+/106a8928fb4249f2f3d4dba1dddbe73ca5cb3d61 BUG=381465 Review URL: https://codereview.chromium.org/322533003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278305 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment