• davidben@chromium.org's avatar
    Insulate the legacy Android client auth code from OpenSSL ABI changes. · eeff853e
    davidben@chromium.org authored
    The current implementation assumes the Android system OpenSSL and our copy have
    compatible ABIs. This will be a problem when switching to BoringSSL which has
    already changed from ABIs. Moreoever, it's already slightly off now as any
    globals (error queue and locks) have different instances between the two.
    
    Rework the code to never mix the two ABIs. We replicate the subset of OpenSSL
    ABI we care about and use it to find the rsa_priv_enc implementation. This is
    then mapped to Chromium OpenSSL via the custom RSA_METHOD. In addition, because
    we cannot safely increase reference counts, retain references to Java wrappers
    where appropriate in lieu of the C structures.
    
    Also fix AndroidKeyStore unit tests on 4.1; they broke after an overzealous
    NOTREACHED() in r278305.
    
    BUG=389414
    
    Review URL: https://codereview.chromium.org/365503007
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282713 0039d316-1c4b-4281-b951-d872f2087c98
    eeff853e
legacy_openssl.h 2.62 KB