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
Squash open ssl warnings

Just disabling them, I don't think we have plans to fix and upstream?

Change-Id: Ia18a8097097033907d9844605e6f62c767be64d9
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 "Squash open ssl warnings"
Remove some flags that are not recognized for mac

That will leave some warnings on, but better than compile errors.

Change-Id: I1ad43d05c55458bb2d9f8205c8fcb346b1b467e1
Merge commit '0b55ea331bcd90e4cdc2b513d51b17e69a878ffc' into HEAD
am c82825ce: Merge commit \'0b55ea331bcd90e4cdc2b513d51b17e69a878ffc\' into HEAD

* commit 'c82825ceed0ee2602b4667f7713bace6f9420af8':
am 28afb918: am c82825ce: Merge commit \'0b55ea331bcd90e4cdc2b513d51b17e69a878ffc\' into HEAD

* commit '28afb9185336dc5fcbb19f62e81a60efb9283c7c':
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"