merge in jb-mr0-release history after reset to jb-dev
merge in jb-mr0-release history after reset to jb-dev
Address flakiness of doFinal and unwrap CipherTests

The tests occasionally did not throw BadPaddingException when
expected. This seems to be because in those cases the random generated
keys were creating cipher text that appeared to be correctly PKCS#5
padded. In reproducing this in the doFinal case, this happened within
a few hundred runs.

Bug: 6301793
Change-Id: Ibd2d9bdd2fe88bccb20089ef653763849f45ff4c
TLS + SNI + proxy => bug : the SNI at the TLS layer is the hostname of the proxy instead of the hostname in the URL

Bug: http://code.google.com/p/android/issues/detail?id=35050
Bug: 6851038

(cherry-pick from b7705a4629bb74a5bb19d97bf0b4dd4c74cecd9e)

Change-Id: I93d718aa81832bae98209620e98f534ff525c555
Signature.verify should not throw if called twice

Bug: http://code.google.com/p/android/issues/detail?id=34933
Bug: 6870225

(cherry-picked from 52ec5bcc7d5d042d7ba6d0244d98ee72007a95e4)

Change-Id: I29ee6feb4df9505b1691418a9213fe69f840e1ea
merge in jb-mr0-release history after reset to jb-dev
Fix URLConnectionTest#test_getAllowUserInteraction.

Also improve the documentation, make it possible to run these tests
individually outside of CTS with vogar, and remove a few more URLs of
external web servers.

We should clean up all tests to remove all reliance on external web servers.

Bug: http://code.google.com/p/android/issues/detail?id=35400

(cherry-picked from 3827b65b1937acfbf3abbc449f8ba0ffc60f3cf3.)

Conflicts:

	luni/src/test/java/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java

Change-Id: I4959fefa130290236533be72cce7c57b9ea1e296
Address more CipherTest flakiness due to random IV values

In a recent change, we stopped generating random keys to prevent
flakiness in the BadPaddingException test cases. This change removes
the use of random initialization vector (IV) values. There still are
uses of SecureRandom where the API being tested requires it, but I
visually checked that none of the BadPaddingException cases fall in
this category.

Bug: 6873673

Change-Id: Ia4e53973da05377687faf327b64acd42a2db344a
Make ZipFileTest#testHugeZipFile faster, and reduce ZipFile memory usage.

This test was timing out because of unbuffered I/O.

ZipFile was creating an unnecessary byte[] when writing out the central
directory. In the case of these tests, that was an extra 3MiB of heap!

(cherry-picked from a57c521b9d250f909508af771b96c0011676a968.)

Bug: 6481730
Change-Id: I923e563421056c9c0e73246357ccf54d8fb60cdb
merge in jb-mr0-release history after reset to jb-dev
Fix even more CipherTest flakiness due to implicit random IV values

When Cipher.init is not passed AlgorithmParameters, it will implicitly
generate what it needs, leading to random values that occasionally
caused BadPaddingException not to be thrown when expected. Disable
that behavior by explictly passing in the static IV value.

Bug: 6354967

(cherry-picked from 3441ddaa2ce320360292702dd63dad052cb6999d)

Change-Id: I38d3be7260fd28ffd47f49cb06f68d68c9c20e9f
Tests for the CertBlacklist.

(cherry picked from commit d1725822187cb9bbe4d93fe39135b17ecb3130ee)

Bug: http://code.google.com/p/android/issues/detail?id=35547
Change-Id: I29cc61fb3c642c0caf58ef5a74560bbbe4b3ba57
Add test for isPubkeyBlacklisted

This adds a negative and positive test for pubkey blacklisting.

(cherry picked from commit 0dc81a43663d3e66da8750b69ff2aa78eec461f9)

Bug: http://code.google.com/p/android/issues/detail?id=35547
Change-Id: Ib73f6ec7b3b965a5984f95930d49251559debb0c
Merge "Tests for the CertBlacklist." into jb-dev
Merge "Add test for isPubkeyBlacklisted" into jb-dev
merge in jb-mr0-release history after reset to jb-dev
Increment OpenSSLKey EVP_PKEY reference when it is selected for use with SSL_use_PrivateKey

Bug: 6866852
Bug: http://code.google.com/p/android/issues/detail?id=35326

Change-Id: If14b9866dc15fe284130393534ae3ed66977d72f
Tracking DSA Signature.verify behavioral change

See also:

    commit 3ff7a80532c9edbcca3331de2b9e87bbf16a0c96
    Author: Brian Carlstrom <bdc@google.com>
    Date:   Mon Jul 23 23:33:56 2012 -0700

        Signature.verify should not throw if called twice

Bug: http://code.google.com/p/android/issues/detail?id=34933
Bug: 6870225

(cherry picked from commit b354e381cac5ffe6f884a4513127d68324779c3b)

Change-Id: Ifbd407d8228befb36fd0a57cd0c846c9760d3d4c
Tracking DSA Signature.verify behavioral change

See also:

    commit 3ff7a80532c9edbcca3331de2b9e87bbf16a0c96
    Author: Brian Carlstrom <bdc@google.com>
    Date:   Mon Jul 23 23:33:56 2012 -0700

        Signature.verify should not throw if called twice

Bug: http://code.google.com/p/android/issues/detail?id=34933
Bug: 6870225

(cherry picked from commit b354e381cac5ffe6f884a4513127d68324779c3b)

Change-Id: Ifbd407d8228befb36fd0a57cd0c846c9760d3d4c
Reconcile GOOG and AOSP jb-dev

Change-Id: I122236ad5146083063a9f680f3b5486928b545a3