Fix leak in setting certificate chain patch

Android has a custom certificate chain patch that didn't check whether
the cert_chain was already set when setting the new chain. This results
in a leak of all the X509 instances in the stack of certificates.

(cherry picked from commit bb8428f762b3632f493572c4f73957e1281ade79)

Bug: 10610037
Bug: http://code.google.com/p/android/issues/detail?id=59536
Change-Id: I885a5dd0d0bca9d1003c4e4e7f0e500bead2232f
Merge "Fix leak in setting certificate chain patch"
am af3454c5: Merge "Fix leak in setting certificate chain patch"

* commit 'af3454c5e67108665d5f26a90aae1831e26d38b7':
  Fix leak in setting certificate chain patch
Restore CMS support to OpenSSL

Change-Id: I58dd7a16d76c3e70b2cebfa71409fb5e43f77193
Merge "Restore CMS support to OpenSSL"
am d8cb4420: Merge "Restore CMS support to OpenSSL"

* commit 'd8cb44203b5139f34afb712ac2544bfea9a90031':
  Restore CMS support to OpenSSL
Parse patch file for files touched

Use the existing patch to find out which files the patch touches. This
reduces the amount of config file lines we need to add when putting in a
new patch.

Change-Id: Ibb79d61b538bbacc7029bd7f86f5d10b863df716
Merge "Parse patch file for files touched"
am 83487a4a: Merge "Parse patch file for files touched"

* commit '83487a4a37f386770a345c6e800f3012f831297b':
  Parse patch file for files touched
Implement CBC record splitting.

This patch removes support for empty records (which is almost
universally disabled via SSL_OP_ALL) and adds optional support for
1/n-1 record splitting.

The latter is not enabled by default, since it's not typically used
on servers, but it should be enabled in web browsers since there are
known attacks in that case (see BEAST).

Bug: 11514124
Change-Id: I3fef273edd417c51c5723d290656d2e03331d68a
Merge "Implement CBC record splitting."
am fb41f28a: Merge "Implement CBC record splitting."

* commit 'fb41f28adf853056e627ca4ae27ede45a8b6f152':
  Implement CBC record splitting.
Merge commit '0b55ea331bcd90e4cdc2b513d51b17e69a878ffc' into HEAD
Update CBC record splitting patch

The original patch had a signedness issue. Update to the newest
revision.

Change-Id: Ie9db14a8ef7b214d7f551f6173360f5b499b0bae
Merge "Update CBC record splitting patch"
Merge commit '3bed57bbaa5c83b9175b0460427db0b7f2324ddb' into HEAD
Build the static libraries against the NDK only.

For the static libraries should only be used for unbundled apps.
This fixes the unbundled apps being built in a platform build.

Change-Id: I0c03883a0e571cb43bbbc933cad6cac7427b6b58
Merge "Build the static libraries against the NDK only."
AArch64: Enable build of openssl

Note that NDK is not used as it is not available
for AArch64.

Change-Id: Ie0194e8f97c3adb479d58ab2562a3e04325c63ef
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Merge "AArch64: Enable build of openssl"