Clear SSL state safely

Since SSL_clear can fail, we should clear the OpenSSL ERR stack if it
does fail. However, to aid in spotting bugs, only clear the stack if the
SSL_clear itself fails.

(cherry picked from commit 86dd832ac26112890b3e815a144ff062ae9b3559)

Bug: 18570895
Change-Id: I053d2e2792e64923c1e128b4fcae23b2e660a992
1 file changed
tree: 5b68fcc1d9e7c5fa7a0bc4aa193ddbc15db99d06
  1. src/
  2. Android.mk
  3. build.gradle
  4. jarjar-rules.txt
  5. update_prebuilts.sh