• Adam Langley's avatar
    system/security/softkeymaster: don't pass a structure into |d2i_PrivateKey|. · 44ee6263
    Adam Langley authored
    Some OpenSSL parsing functions have, historically, allowed a structure
    to be passed in to reuse that memory. There have been many bugs arising
    from this corner case and it's generally best to avoid it.
    
    This change just passes in NULL because a new structure was being
    allocated anyway. Also, the API didn't guarantee that the memory would
    always be reused – code had to check the updated pointer, which this
    didn't do. So it might have broken in the future.
    
    Change-Id: Iba98f9d11ece457cf6b66e2637bb8cb23f5930d2
    44ee6263
keymaster_openssl.cpp 25.3 KB