• Brian Carlstrom's avatar
    Avoid loading all CA certs into Zygote memory, lazily load instead (2 of 3) · 347b2a60
    Brian Carlstrom authored
    Previously the CA certs stored in the BKS KeyStore at
    /system/etc/security/cacerts.bks was loaded in the Zygote. As the the
    number of CAs are started to increase, this is causing more and more
    memory to be used for rarely used CAs. The new AndroidCAStore KeyStore
    implementation reads the CAs as needed out of individual PEM
    certificate files. The files can be efficiently found because they are
    named based on a hash CA's subject name, similar to OpenSSL.
    
    Bug: 1109242
    
    Details:
    
    build
    
        Removing old cacerts.bks from GRANDFATHERED_ALL_PREBUILT and
        adding new cacerts directory to core PRODUCT_PACKAGES
    
    	core/legacy_prebuilts.mk
    	target/product/core.mk
    
    libcore
    
        cacerts build changes. Move cacerts prebuilt logic to new
        CaCerts.mk from NativeCode.mk where it didn't make sense. Updated
        Android.mk's dalvik-host target to install new cacerts files.
    
    	Android.mk
    	CaCerts.mk
    	NativeCode.mk
    
        Remove old cacerts.bks and a...
    347b2a60