• Home
  • History
  • Annotate
  • only in /libcore/luni/src/main/java/org/
History log of /libcore/luni/src/main/java/org/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
227aa3595fe72830189bd9a251a08771a9a75f71 08-May-2014 Kenny Root <kroot@google.com> am 77bb39bb: am 2cbfef72: am 13bb5c1b: Merge "Add CRLReason and friends"

* commit '77bb39bb029f1a731c2ee34eeffebfa52bb8dfab':
Add CRLReason and friends
77bb39bb029f1a731c2ee34eeffebfa52bb8dfab 08-May-2014 Kenny Root <kroot@google.com> am 2cbfef72: am 13bb5c1b: Merge "Add CRLReason and friends"

* commit '2cbfef72ec2046d77d983bc106a3cfb3d69e9bf0':
Add CRLReason and friends
f7d0a1e9fc6408eaeda0b60a19f33008320f4228 06-May-2014 Kenny Root <kroot@google.com> Add CRLReason and friends

New API for getting the revocation reason. Add tests and exceptions
associated with it.

Change-Id: Ifd6444ab966c984312f069a6ee330d255110ea85
pache/harmony/security/x509/InvalidityDate.java
pache/harmony/security/x509/ReasonCode.java
1087fe2b4fa187e358137c86486645f781c354fb 07-May-2014 Kenny Root <kroot@google.com> am 982fb068: am 14f4875c: am db3cbbc3: Merge "Add java.security.cert.Extension interface"

* commit '982fb06853ed14a38dbf300f633b8a5c9ef6a722':
Add java.security.cert.Extension interface
982fb06853ed14a38dbf300f633b8a5c9ef6a722 07-May-2014 Kenny Root <kroot@google.com> am 14f4875c: am db3cbbc3: Merge "Add java.security.cert.Extension interface"

* commit '14f4875cedd807a57aacad981ec083cfa3326f03':
Add java.security.cert.Extension interface
4782c2cdea4fc7d070c9dac560380cc45852babc 06-May-2014 Kenny Root <kroot@google.com> Add java.security.cert.Extension interface

Also convert our existing Extension class to implement this interface.

Change-Id: I123ef6aa4f89897037e51f221c8c5a7994ac2a01
pache/harmony/security/x509/Extension.java
pache/harmony/security/x509/Extensions.java
0c5c34824d6b75a40c937c450f1ed68de05355a7 30-Apr-2014 Kenny Root <kroot@google.com> am 721a363c: resolved conflicts for merge of a47fb6d2 to klp-modular-dev

* commit '721a363c366af7b5472b3632efc33760dbb9c1a0':
Add API to check certificate chain signatures
721a363c366af7b5472b3632efc33760dbb9c1a0 30-Apr-2014 Kenny Root <kroot@google.com> resolved conflicts for merge of a47fb6d2 to klp-modular-dev

Change-Id: Id6645384548e547ed10fedf67b50f769eec3f846
7130d8c23ad64b3dd8ff1433e8566a6df5f9d93a 30-Apr-2014 Kenny Root <kroot@google.com> am d7ffdab9: resolved conflicts for merge of 45cd6f51 to klp-modular-dev

* commit 'd7ffdab9dbd6cb10cf45fa841c7f9e8e406133bb':
Revert "Add API to check certificate chain signatures"
d7ffdab9dbd6cb10cf45fa841c7f9e8e406133bb 30-Apr-2014 Kenny Root <kroot@google.com> resolved conflicts for merge of 45cd6f51 to klp-modular-dev

Change-Id: Ic2f144d268c8b10eb9628b695ea95003cf40aac2
a47fb6d2e4b059301145005a91de06c49fde9421 30-Apr-2014 Kenny Root <kroot@google.com> am f5efc79f: am 93868a24: am 5c5adbdb: am 87c8e6c1: am c81569dc: am 2b556603: am d3d58171: am 2bc5e811: Add API to check certificate chain signatures

* commit 'f5efc79f4cdd3aab545718de6cdc6f6d95f48f37':
Add API to check certificate chain signatures
f5efc79f4cdd3aab545718de6cdc6f6d95f48f37 30-Apr-2014 Kenny Root <kroot@google.com> am 93868a24: am 5c5adbdb: am 87c8e6c1: am c81569dc: am 2b556603: am d3d58171: am 2bc5e811: Add API to check certificate chain signatures

* commit '93868a24eab785cd24f43df7a67705c0421b64ea':
Add API to check certificate chain signatures
45cd6f51ff8dc1ecadbb7abc5a979502b07b05a9 30-Apr-2014 Kenny Root <kroot@google.com> am f437cb11: am 4bbd5d45: am ce07d1e8: am 45583d71: am f26ef9f9: am 50256449: am 9cd5caec: am 8c9ea691: Revert "Add API to check certificate chain signatures"

* commit 'f437cb1175440de35bc775eb79a5774105d13780':
Revert "Add API to check certificate chain signatures"
93868a24eab785cd24f43df7a67705c0421b64ea 30-Apr-2014 Kenny Root <kroot@google.com> am 5c5adbdb: am 87c8e6c1: am c81569dc: am 2b556603: am d3d58171: am 2bc5e811: Add API to check certificate chain signatures

* commit '5c5adbdbd25f88190d83ad87a27596bb97f71551':
Add API to check certificate chain signatures
f437cb1175440de35bc775eb79a5774105d13780 30-Apr-2014 Kenny Root <kroot@google.com> am 4bbd5d45: am ce07d1e8: am 45583d71: am f26ef9f9: am 50256449: am 9cd5caec: am 8c9ea691: Revert "Add API to check certificate chain signatures"

* commit '4bbd5d45bffa91f41136709ed6ce45c56192711c':
Revert "Add API to check certificate chain signatures"
5c5adbdbd25f88190d83ad87a27596bb97f71551 30-Apr-2014 Kenny Root <kroot@google.com> am 87c8e6c1: am c81569dc: am 2b556603: am d3d58171: am 2bc5e811: Add API to check certificate chain signatures

* commit '87c8e6c1e0cce2a98931562df131f87c13434441':
Add API to check certificate chain signatures
4bbd5d45bffa91f41136709ed6ce45c56192711c 30-Apr-2014 Kenny Root <kroot@google.com> am ce07d1e8: am 45583d71: am f26ef9f9: am 50256449: am 9cd5caec: am 8c9ea691: Revert "Add API to check certificate chain signatures"

* commit 'ce07d1e8436d22dca6cf8a375f636680e3aca472':
Revert "Add API to check certificate chain signatures"
ce07d1e8436d22dca6cf8a375f636680e3aca472 30-Apr-2014 Kenny Root <kroot@google.com> am 45583d71: am f26ef9f9: am 50256449: am 9cd5caec: am 8c9ea691: Revert "Add API to check certificate chain signatures"

* commit '45583d7167741140dba89ec3c8156d9f42313fcb':
Revert "Add API to check certificate chain signatures"
2b55660319da1aa8167a301d0d6a9f71d117f05a 30-Apr-2014 Kenny Root <kroot@google.com> am d3d58171: am 2bc5e811: Add API to check certificate chain signatures

* commit 'd3d58171cc734f59faa5a03ce1cd5d5c00e9ffbd':
Add API to check certificate chain signatures
d3d58171cc734f59faa5a03ce1cd5d5c00e9ffbd 30-Apr-2014 Kenny Root <kroot@google.com> am 2bc5e811: Add API to check certificate chain signatures

* commit '2bc5e811a817a8c667bca4318ae98582b0ee6dc6':
Add API to check certificate chain signatures
50256449a12a7cd311c6b8e2baf0c46d61757043 30-Apr-2014 Kenny Root <kroot@google.com> am 9cd5caec: am 8c9ea691: Revert "Add API to check certificate chain signatures"

* commit '9cd5caece4cf5d64898e9241c79194c0a9f52d24':
Revert "Add API to check certificate chain signatures"
9cd5caece4cf5d64898e9241c79194c0a9f52d24 30-Apr-2014 Kenny Root <kroot@google.com> am 8c9ea691: Revert "Add API to check certificate chain signatures"

* commit '8c9ea6916a5bb232fe1bfd6d61194196685fe81c':
Revert "Add API to check certificate chain signatures"
2bc5e811a817a8c667bca4318ae98582b0ee6dc6 17-Apr-2014 Kenny Root <kroot@google.com> Add API to check certificate chain signatures

Add hidden API to check certificate chain signatures when needed. The
getCertificates implementation returns a list of all the certificates and
chains and would expect any caller interested in verifying actual chains
to call getCodeSigners instead.

We add this hidden constructor as a stop-gap until we can switch callers
over to getCodeSigners.

Bug: 13678484
Change-Id: I01cddef287767422454de4c5fd266c812a04d570
pache/harmony/security/utils/JarUtils.java
8c9ea6916a5bb232fe1bfd6d61194196685fe81c 30-Apr-2014 Kenny Root <kroot@google.com> Revert "Add API to check certificate chain signatures"

This reverts commit f8986a989759c43c155ae64f9a3b36f670602521.

Bug: 13678484
Change-Id: Ie2e44c60cc025a8a1e54aa7a6fb4b251ad363aae
pache/harmony/security/utils/JarUtils.java
dbb6b44240b9ab10f31824987445ee7c8e1b53a1 29-Apr-2014 Kenny Root <kroot@google.com> Revert "Add API to check certificate chain signatures"

This reverts commit 323493b69a33b17d06909f31ec58ff73bcb32e86.

This is fixed in frameworks/base with commit
d061458a208cfa4b136883e7a91ffffc5f527f8f

Bug: 13678484
Change-Id: I11b7c4f11cc2b315b5ff5434d9118620648ca00f
pache/harmony/security/utils/JarUtils.java
2b09d623c3fc221a0105c2c42061949cbb734cfe 19-Apr-2014 Kenny Root <kroot@google.com> am 5079856d: resolved conflicts for merge of e897e2dc to klp-modular-dev

* commit '5079856d43c7202303632d12eba91149a11c2bfd':
Add API to check certificate chain signatures
5079856d43c7202303632d12eba91149a11c2bfd 19-Apr-2014 Kenny Root <kroot@google.com> resolved conflicts for merge of e897e2dc to klp-modular-dev

Change-Id: Ic367fd179fd402eadb4f3c5c0585ad9c17370002
e897e2dcdafb0c633d0af05400d8e123018ad1d7 19-Apr-2014 Kenny Root <kroot@google.com> am 80eedbe2: am dafee327: am e09807c8: am c935abb8: am c79a75f3: am 928d0707: am 6640b107: am f8986a98: Add API to check certificate chain signatures

* commit '80eedbe289fa735193d2eeea58da7f9d1fcf2b2f':
Add API to check certificate chain signatures
80eedbe289fa735193d2eeea58da7f9d1fcf2b2f 19-Apr-2014 Kenny Root <kroot@google.com> am dafee327: am e09807c8: am c935abb8: am c79a75f3: am 928d0707: am 6640b107: am f8986a98: Add API to check certificate chain signatures

* commit 'dafee327892728c3632f2fa959c2790f7ea3049f':
Add API to check certificate chain signatures
dafee327892728c3632f2fa959c2790f7ea3049f 19-Apr-2014 Kenny Root <kroot@google.com> am e09807c8: am c935abb8: am c79a75f3: am 928d0707: am 6640b107: am f8986a98: Add API to check certificate chain signatures

* commit 'e09807c800605d8b90d21fd8cfad72698c78e52d':
Add API to check certificate chain signatures
e09807c800605d8b90d21fd8cfad72698c78e52d 19-Apr-2014 Kenny Root <kroot@google.com> am c935abb8: am c79a75f3: am 928d0707: am 6640b107: am f8986a98: Add API to check certificate chain signatures

* commit 'c935abb878175b2e9914235a182a96ab9bebe0c3':
Add API to check certificate chain signatures
928d0707bca6781234d887a255931b95257e156c 18-Apr-2014 Kenny Root <kroot@google.com> am 6640b107: am f8986a98: Add API to check certificate chain signatures

* commit '6640b107e33042d6c7445d88119c92bd020cdc22':
Add API to check certificate chain signatures
6640b107e33042d6c7445d88119c92bd020cdc22 18-Apr-2014 Kenny Root <kroot@google.com> am f8986a98: Add API to check certificate chain signatures

* commit 'f8986a989759c43c155ae64f9a3b36f670602521':
Add API to check certificate chain signatures
323493b69a33b17d06909f31ec58ff73bcb32e86 17-Apr-2014 Kenny Root <kroot@google.com> Add API to check certificate chain signatures

Add hidden API to check certificate chain signatures when needed. The
getCertificates implementation returns a list of all the certificates and
chains and would expect any caller interested in verifying actual chains
to call getCodeSigners instead.

We add this hidden constructor as a stop-gap until we can switch callers
over to getCodeSigners.

(cherry-pick of f8986a989759c43c155ae64f9a3b36f670602521)

Bug: 13678484
Change-Id: I6ad8a168adf6a33b9155f416ed22852ded221382
pache/harmony/security/utils/JarUtils.java
f8986a989759c43c155ae64f9a3b36f670602521 17-Apr-2014 Kenny Root <kroot@google.com> Add API to check certificate chain signatures

Add hidden API to check certificate chain signatures when needed. The
getCertificates implementation returns a list of all the certificates and
chains and would expect any caller interested in verifying actual chains
to call getCodeSigners instead.

We add this hidden constructor as a stop-gap until we can switch callers
over to getCodeSigners.

Bug: 13678484
Change-Id: I6ad8a168adf6a33b9155f416ed22852ded221382
pache/harmony/security/utils/JarUtils.java
e8c1d63644c4e53c0640d606ed729b0a10413fc5 31-Jan-2014 Kenny Root <kroot@google.com> DO NOT MERGE X509CRLImpl: fix getRevokedCertificate by serial

The getRevokedCertificate(BigInteger) was scanning nonIndirectEntries,
but it didn't check "isIndirectCRL" first.

(cherry picked from commit 305e50e47f6d3b7bc944e8718f92fc9a1e76f0c1)

Bug: 13789608

Change-Id: Ib1ca31d563c6bd9c62901a9eae9bea1bd92a1d9b
pache/harmony/security/provider/cert/X509CRLImpl.java
c539bff0ece3ed8a7546336cdf3b205a518a2a26 06-Feb-2014 Kenny Root <kroot@google.com> Late binding: add support to Signature

This adds support for late binding (or delayed selection) to the
Signature class. This allows the selection of the SignatureSpi based on
what kind of Key class is used to initSign(...) or initVerify(...)

Change-Id: I9d397a3aab48b49dfdf91af4ab7caceeff4822d8
pache/harmony/security/fortress/Engine.java
8107b206cd72c51ffaeac1f7fcfdf4ea0728e34c 05-Feb-2014 Elliott Hughes <enh@google.com> Revert "Revert "ExpatParser LP64 fixes.""

This reverts commit d88231f770f7459dc174aa970e305aa5f16f9f04.

Change-Id: Iac6b50221aa1e4cfe8514ea693a4289d74e118de
pache/harmony/xml/ExpatParser.java
ecd4da05703fc4a81f42f4ab36d864a16a71c5e8 05-Feb-2014 Elliott Hughes <enh@google.com> Merge "Revert "ExpatParser LP64 fixes.""
d88231f770f7459dc174aa970e305aa5f16f9f04 05-Feb-2014 Elliott Hughes <enh@google.com> Revert "ExpatParser LP64 fixes."

This reverts commit a8a1e201e415abfd6b5ae4fed98c8aa491e15af9.

This causes YouTube to crash on launch. Reverting to give myself more time to investigate.

Change-Id: I9ee107383a4f206ca83dd267baad77445eba3fce
pache/harmony/xml/ExpatParser.java
3ed78a8925825daccdba23fda1f69cbb3aa77a24 05-Feb-2014 Kenny Root <kroot@google.com> Late binding: supplied Provider should be used

If a program supplies a Provider object, it should be used instead of
looking at the registered providers.

Bug: 12890254
Change-Id: Ia4d1ac88a1ed20ab6ad6a11d2d5f53ee51310544
pache/harmony/security/fortress/Engine.java
a8a1e201e415abfd6b5ae4fed98c8aa491e15af9 04-Feb-2014 Elliott Hughes <enh@google.com> ExpatParser LP64 fixes.

Change-Id: I17ba32b6147b048f3cace0b2d7283b1c9d74f776
Signed-off-by: Stuart Monteith <Stuart.Monteith@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Matteo Franchin <matteo.franchin@arm.com>
pache/harmony/xml/ExpatParser.java
342e06afe19b80cec000aa910be856d5298cb1d5 31-Jan-2014 Kenny Root <kroot@google.com> CryptoProvider: remove duplicate algorithms

No one ever uses these. They are not the default anymore and haven't
been for several releases.

Change-Id: Ieff7c31b31f492107e6ee4d7e9e5aeb8893a0c4d
pache/harmony/security/provider/crypto/CryptoProvider.java
pache/harmony/security/provider/crypto/DSAKeyFactoryImpl.java
pache/harmony/security/provider/crypto/DSAPrivateKeyImpl.java
pache/harmony/security/provider/crypto/DSAPublicKeyImpl.java
pache/harmony/security/provider/crypto/SHA1_MessageDigestImpl.java
pache/harmony/security/provider/crypto/SHA1withDSA_SignatureImpl.java
pache/harmony/security/provider/crypto/ThreeIntegerSequence.java
88f0e15c54d5469fb55cb67c8a2b0cceaed34074 31-Jan-2014 Kenny Root <kroot@google.com> Remove DRLCertFactory

No longer needed since Conscrypt is the main provider.

Change-Id: I6cee3c33c00822cc320780d63cb76f42e6be2b71
pache/harmony/security/provider/cert/Cache.java
pache/harmony/security/provider/cert/DRLCertFactory.java
pache/harmony/security/provider/cert/X509CRLEntryImpl.java
pache/harmony/security/provider/cert/X509CRLImpl.java
pache/harmony/security/provider/cert/X509CertFactoryImpl.java
pache/harmony/security/provider/cert/X509CertImpl.java
pache/harmony/security/provider/cert/X509CertPathImpl.java
ced0ecf99dcec954d9df50964b1875b817131a92 31-Jan-2014 Kenny Root <kroot@google.com> X509CRLImpl: add generics!

Remove all the warnings in my IDE with newfangled generics.

Change-Id: I7ee4b273c36db31bf318e56ab79e48fe963020e5
pache/harmony/security/provider/cert/X509CRLImpl.java
305e50e47f6d3b7bc944e8718f92fc9a1e76f0c1 31-Jan-2014 Kenny Root <kroot@google.com> X509CRLImpl: fix getRevokedCertificate by serial

The getRevokedCertificate(BigInteger) was scanning nonIndirectEntries,
but it didn't check "isIndirectCRL" first.

Change-Id: Ib1ca31d563c6bd9c62901a9eae9bea1bd92a1d9b
pache/harmony/security/provider/cert/X509CRLImpl.java
155ee0c0ba582c28487cd5c3964ff8645478c628 13-Jan-2014 Kenny Root <kroot@google.com> Fix encodings in X500PrincipalTest

As said in AttributeValue, DC and emailAddress should be encoded in
IA5String as specified by RFC5280.

Also the canonical encoding of a T61String could be PrintableString when
the string is only 'A' according to b/2102191 but this could be a
mistake.

Consecutive spaces and leading and trailing runs of spaces should be
escaped for RFC 1779.

Also the RFC 2259 doesn't specify anything other than the beginning or
end spaces, but the RI escapes the beginning and ending runs of spaces.

Bug: 12490346
Bug: 12490876
Change-Id: I6591156ba0a27a894241b039570488f89c885242
pache/harmony/security/x501/AttributeTypeAndValue.java
pache/harmony/security/x501/AttributeTypeAndValueComparator.java
pache/harmony/security/x501/AttributeValue.java
3a134c58302d6acf59336a4d7d0a70d574ffd493 20-Dec-2013 Narayan Kamath <narayan@google.com> Move DeleteOnExit to libcore.io.

Also makes the constructor private & a field final.

Change-Id: I1df833cee5f4217bd800c36104da2a76a1f1877d
pache/harmony/luni/util/DeleteOnExit.java
85dab151e734557d356fb45c45cf7d4548dd6fdc 30-Sep-2013 Kenny Root <kroot@google.com> Late binding: add support to Cipher

This enables late binding support for Cipher algorithms. It will now pay
attention to SupportedKeyClasses and SupportedKeyFormats after the
Cipher#init(...) is called on the instance instead of selecting the
provider when Cipher#getInstance(...) creates the instance.

Change-Id: I27802f1f8b96d81dd2a269741d080dbe68232c9f
pache/harmony/security/fortress/Engine.java
pache/harmony/security/fortress/Services.java
ff23cc880de04bd22fa38778a86c6f91dd211817 14-Nov-2013 Alex Klyubin <klyubin@google.com> am 314c1f46: am 9c94365f: am 3a160bcf: am 7f1b2d5d: am 6da3c4a6: am ef6e14e8: SSLEngine: Verify server RSA params signature

* commit '314c1f4630cc07691658aa2b0c7c71899b4a1eef':
SSLEngine: Verify server RSA params signature
314c1f4630cc07691658aa2b0c7c71899b4a1eef 14-Nov-2013 Alex Klyubin <klyubin@google.com> am 9c94365f: am 3a160bcf: am 7f1b2d5d: am 6da3c4a6: am ef6e14e8: SSLEngine: Verify server RSA params signature

* commit '9c94365f8732636914f934163287907a3576413f':
SSLEngine: Verify server RSA params signature
7f1b2d5d192a8916bc2d75c341b147036e77e9a7 14-Nov-2013 Alex Klyubin <klyubin@google.com> am 6da3c4a6: am ef6e14e8: SSLEngine: Verify server RSA params signature

* commit '6da3c4a69850b3c043c04ff2d88d9727b84f1db1':
SSLEngine: Verify server RSA params signature
6da3c4a69850b3c043c04ff2d88d9727b84f1db1 14-Nov-2013 Alex Klyubin <klyubin@google.com> am ef6e14e8: SSLEngine: Verify server RSA params signature

* commit 'ef6e14e8527eab91e6266942f48b8bf08e762004':
SSLEngine: Verify server RSA params signature
ef6e14e8527eab91e6266942f48b8bf08e762004 14-Nov-2013 Alex Klyubin <klyubin@google.com> SSLEngine: Verify server RSA params signature

The client did not verify the signature of server's RSA params in
ServerKeyExchange.

Bug: 11631299
Change-Id: I64b93ea2caf6da100661303c4e7f7e7eff1ae536
pache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
0d6b949ee3e33d25632b249c562c093890348083 13-Nov-2013 Kenny Root <kroot@google.com> am 3915bd48: am 9254c0c6: am 3ce56fab: am 74e97557: am db219623: am a7a96f2e: SSLEngine: verify DHE signature

* commit '3915bd4819f959762de9d43ae66310e4bd6b7032':
SSLEngine: verify DHE signature
3915bd4819f959762de9d43ae66310e4bd6b7032 13-Nov-2013 Kenny Root <kroot@google.com> am 9254c0c6: am 3ce56fab: am 74e97557: am db219623: am a7a96f2e: SSLEngine: verify DHE signature

* commit '9254c0c61b6d2855f080861ad53d4eb8978cff72':
SSLEngine: verify DHE signature
74e97557020b9b2c4452d65a371c284e69a757bb 13-Nov-2013 Kenny Root <kroot@google.com> am db219623: am a7a96f2e: SSLEngine: verify DHE signature

* commit 'db219623d11054a33e5344005b336793abe7e7af':
SSLEngine: verify DHE signature
db219623d11054a33e5344005b336793abe7e7af 13-Nov-2013 Kenny Root <kroot@google.com> am a7a96f2e: SSLEngine: verify DHE signature

* commit 'a7a96f2ea48a1a9d572a801d5ee338d609bafcd0':
SSLEngine: verify DHE signature
a7a96f2ea48a1a9d572a801d5ee338d609bafcd0 09-Nov-2013 Kenny Root <kroot@google.com> SSLEngine: verify DHE signature

The DHE signature wasn't being verified against the server's
certificate. Refactor some code to allow the same code to be used for
both the server and client to create and check the DHE parameters
signature.

Bug: 11631299
Change-Id: Ie98cdab039c2213fa77e7768e145c08a4fd7ad7b
pache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
pache/harmony/xnet/provider/jsse/DigitalSignature.java
pache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
pache/harmony/xnet/provider/jsse/ServerKeyExchange.java
473e374c03d2e26310c70ede2e1fba3a66d0e1c6 11-Oct-2013 Kenny Root <kroot@google.com> am ce927e5a: Merge "JarUtils: remove reference to X509CertImpl"

* commit 'ce927e5a1c305fa7d6d3aff254fa2c5bf1a7c335':
JarUtils: remove reference to X509CertImpl
6a2b431bbfa3d631d856262fb55a12af36e0c4d3 11-Oct-2013 Kenny Root <kroot@google.com> JarUtils: remove reference to X509CertImpl

With Conscrypt, this appear to speed up checking signatures on
frameworks-res.apk (2175 files) from 468ms to 446ms.

Change-Id: I491607fa5d43594cc0b6c7eba1e38eefb6cfc4bf
pache/harmony/security/utils/JarUtils.java
7e3492e778a5b90751415ec03684ae5d7fb0495a 10-Oct-2013 Kenny Root <kroot@google.com> am cdac05d6: Merge "JarUtils: try using the DigestEncryptionAlgorithm"

* commit 'cdac05d686c474f6f60df09dd24fa9c6d7102315':
JarUtils: try using the DigestEncryptionAlgorithm
bda6980df389e16edf907e5c516ee21e9e92883e 10-Oct-2013 Kenny Root <kroot@google.com> JarUtils: try using the DigestEncryptionAlgorithm

The original code tried getting an instance of the DigestAlgorithm by
itself as a Signature type. This appears meant to be the
DigestEncryptionAlgorithm by itself. Algorithms such as SHA256withECDSA
have their own OID.

Change-Id: I9384127bb026c8a5d3956095a9880427ead366b4
pache/harmony/security/utils/JarUtils.java
52041a8bf873950403273fff3233349d6dfe8b9d 01-Oct-2013 Kenny Root <kroot@google.com> am 4d11667c: Merge "I before E, except after C"

* commit '4d11667cd0e5b737c576128986fca03a226d08ee':
I before E, except after C
675c622e63dc9eceb27fc70e363bda67d0516bed 01-Oct-2013 Kenny Root <kroot@google.com> I before E, except after C

...and some other cases

Change-Id: I45e2770fd4c734b5aefba124d3c09eef47294b43
pache/harmony/security/fortress/Engine.java
41772988ba2e0e3585a92f1a17d99709f319d10f 09-Sep-2013 Kenny Root <kroot@google.com> Make sure AlgNameMapper has the latest name version

In the current design, if AlgNameMapper's class initialization is run
too early, the data will be incomplete. This change uses the Services's
cache versioning system to check when it should update its internal
cache ensuring it's never out of date.

(cherry picked from commit 6243428ca4ba6d9d767070bbe2d5c480bbcd0669)

Bug: 10666722
Change-Id: I70dd09cf77145bd98f84279e58ed20cb9cef8341
pache/harmony/security/utils/AlgNameMapper.java
8568661a01b34365149a41c7585804fd6b6630fe 09-Sep-2013 Kenny Root <kroot@google.com> am 6243428c: Make sure AlgNameMapper has the latest name version

* commit '6243428ca4ba6d9d767070bbe2d5c480bbcd0669':
Make sure AlgNameMapper has the latest name version
6243428ca4ba6d9d767070bbe2d5c480bbcd0669 09-Sep-2013 Kenny Root <kroot@google.com> Make sure AlgNameMapper has the latest name version

In the current design, if AlgNameMapper's class initialization is run
too early, the data will be incomplete. This change uses the Services's
cache versioning system to check when it should update its internal
cache ensuring it's never out of date.

Bug: 10666722
Change-Id: I0549ebb8fa1b5b3a8af71ceb179d5d217bdbdf59
pache/harmony/security/utils/AlgNameMapper.java
2e2fed77c7e8c6f887c73f54082d86e0d4524715 07-Sep-2013 Kenny Root <kroot@google.com> am 201796c3: Merge "Register Conscrypt as the AlgNameMapper source"

* commit '201796c32b0743c8207def331bd3b49e2dd32b4d':
Register Conscrypt as the AlgNameMapper source
b6963ac272834ec5f791ecdc773d17cb156e23f0 06-Sep-2013 Kenny Root <kroot@google.com> Register Conscrypt as the AlgNameMapper source

Conscrypt was moved out of libcore, so the call directly to NativeCrypto
was removed as well. To break the dependency, introduce an interface
that Conscrypt registers as to answer algorithm name to OID mapping
queries and vice versa.

Bug: 10310296
Change-Id: I5fcda678a995bc800b97d8fb0ce2f16553dff5dd
pache/harmony/security/utils/AlgNameMapper.java
pache/harmony/security/utils/AlgNameMapperSource.java
f8c187d5852b5a73e6c9a62f40c2c4c6f8de4300 07-Sep-2013 Kenny Root <kroot@google.com> am dc25e3cb: Merge "Revert "Register Conscrypt as the AlgNameMapper source"" into klp-dev

* commit 'dc25e3cb1da6073f5d84216c418b42afba4adcad':
Revert "Register Conscrypt as the AlgNameMapper source"
1f4cefdd6ead5316eb4df810d1ce4ab316fff5f8 07-Sep-2013 Kenny Root <kroot@google.com> Revert "Register Conscrypt as the AlgNameMapper source"

This causes the preloading to explode because it touches a native class.

This reverts commit 6fcfb5a75dfb595ccbcf0a7a576ee7515fe2da32.

Change-Id: I7dfc922de827ec5d01ead7592efd01c48ec17fc2
pache/harmony/security/utils/AlgNameMapper.java
pache/harmony/security/utils/AlgNameMapperSource.java
232c2bb90da4751a6cca7fd470ef580939af33ef 07-Sep-2013 Kenny Root <kroot@google.com> am 3160a05f: Merge "Register Conscrypt as the AlgNameMapper source" into klp-dev

* commit '3160a05f77f25fde5dcefd48538e48247ef3ae68':
Register Conscrypt as the AlgNameMapper source
6f4047c64f251d4ede88f23d8b1d4e826c2a59b0 06-Sep-2013 Kenny Root <kroot@google.com> Register Conscrypt as the AlgNameMapper source

Conscrypt was moved out of libcore, so the call directly to NativeCrypto
was removed as well. To break the dependency, introduce an interface
that Conscrypt registers as to answer algorithm name to OID mapping
queries and vice versa.

(cherry picked from commit 6fcfb5a75dfb595ccbcf0a7a576ee7515fe2da32)

Bug: 10310296
Change-Id: Ia9c802f1102df7209749a90d0ed3ed2831480b04
pache/harmony/security/utils/AlgNameMapper.java
pache/harmony/security/utils/AlgNameMapperSource.java
6fcfb5a75dfb595ccbcf0a7a576ee7515fe2da32 06-Sep-2013 Kenny Root <kroot@google.com> Register Conscrypt as the AlgNameMapper source

Conscrypt was moved out of libcore, so the call directly to NativeCrypto
was removed as well. To break the dependency, introduce an interface
that Conscrypt registers as to answer algorithm name to OID mapping
queries and vice versa.

Bug: 10310296
Change-Id: I06de1501681d28afbc36de9c32e384dd32790a53
pache/harmony/security/utils/AlgNameMapper.java
pache/harmony/security/utils/AlgNameMapperSource.java
37a3a683704595eb27def7bd1c86ced783bba202 05-Sep-2013 Kenny Root <kroot@google.com> am b836d440: am f0d0f4bd: am 31b2e248: am 178cc6ea: am 9c08e345: am 6bee9d2d: am 0f55bd8a: Merge "Make sure seed values use full range" into jb-dev

* commit 'b836d4405c9f9fe4d867996c93bab373c7eedf6c':
Make sure seed values use full range
b836d4405c9f9fe4d867996c93bab373c7eedf6c 05-Sep-2013 Kenny Root <kroot@google.com> am f0d0f4bd: am 31b2e248: am 178cc6ea: am 9c08e345: am 6bee9d2d: am 0f55bd8a: Merge "Make sure seed values use full range" into jb-dev

* commit 'f0d0f4bd73bd6ed2fbcb4772c7d92a90b7d40c58':
Make sure seed values use full range
f0d0f4bd73bd6ed2fbcb4772c7d92a90b7d40c58 05-Sep-2013 Kenny Root <kroot@google.com> am 31b2e248: am 178cc6ea: am 9c08e345: am 6bee9d2d: am 0f55bd8a: Merge "Make sure seed values use full range" into jb-dev

* commit '31b2e248b8c6b2c869dfaad81b625a5d04ca0ee1':
Make sure seed values use full range
9c08e3452a0ca075e8a6f4818a2127c1ec3cdd7d 05-Sep-2013 Kenny Root <kroot@google.com> am 6bee9d2d: am 0f55bd8a: Merge "Make sure seed values use full range" into jb-dev

* commit '6bee9d2dece0b8a6b3cbd8dcb2bb3c3c04a17f46':
Make sure seed values use full range
6bee9d2dece0b8a6b3cbd8dcb2bb3c3c04a17f46 05-Sep-2013 Kenny Root <kroot@google.com> am 0f55bd8a: Merge "Make sure seed values use full range" into jb-dev

* commit '0f55bd8a601f548facdaecbe0bbf1847c4070b59':
Make sure seed values use full range
0f55bd8a601f548facdaecbe0bbf1847c4070b59 05-Sep-2013 Kenny Root <kroot@google.com> Merge "Make sure seed values use full range" into jb-dev
341cfb18f9ef761eddbc87859583e19f09fbbfdd 16-Aug-2013 Kenny Root <kroot@google.com> Make sure seed values use full range

(cherry picked from commit 004435719afbe62d7ce6b39d69181b5dd801d598)

Bug: 6642616
Change-Id: I773dd31d92207151df05122920170851fa021fd5
pache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java
7a2b0132a5cbb56b7fbc9d022c8cbddc09055f43 20-Aug-2013 Kenny Root <kroot@google.com> am 7de50739: Merge "Make sure seed values use full range" into klp-dev

* commit '7de50739bb51d7373686f060d8bd0dccc88b3276':
Make sure seed values use full range
ab6d7714b47c04cc4bd812b32e6a6370181a06e4 16-Aug-2013 Kenny Root <kroot@google.com> Make sure seed values use full range

(cherry picked from commit 004435719afbe62d7ce6b39d69181b5dd801d598)

Bug: 6642616
Change-Id: I773dd31d92207151df05122920170851fa021fd5
pache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java
5fb1308be5fbc5e23931806ae2462df9fa4fb1d4 14-Aug-2013 Kenny Root <kroot@google.com> am d0e84f48: am 33c3583d: am e6cfe4d5: am a6d2b916: am 89c50e8b: Delay SSLSocketImpl instantiation until needed

* commit 'd0e84f487f1bbaf6a1650afddd305647d4fe3d84':
Delay SSLSocketImpl instantiation until needed
e6cfe4d5d488fa66d555bfcf07d8155d684bc8d6 14-Aug-2013 Kenny Root <kroot@google.com> am a6d2b916: am 89c50e8b: Delay SSLSocketImpl instantiation until needed

* commit 'a6d2b916ec710d5b32c887ae74e3e8664535e4ad':
Delay SSLSocketImpl instantiation until needed
a6d2b916ec710d5b32c887ae74e3e8664535e4ad 14-Aug-2013 Kenny Root <kroot@google.com> am 89c50e8b: Delay SSLSocketImpl instantiation until needed

* commit '89c50e8b8cbefbf8c150e56cf5f71ce440ac0781':
Delay SSLSocketImpl instantiation until needed
89c50e8b8cbefbf8c150e56cf5f71ce440ac0781 24-Jul-2013 Kenny Root <kroot@google.com> Delay SSLSocketImpl instantiation until needed

Class preloading will create an instance of objects if they are in
static fields, so put the ones we don't want instantiated into a holder
class that is not preloaded.

(cherry picked from commit da5b7116b58795b169961cbd63c2b21bac741d9a)

Bug: 9984058
Change-Id: Idaaf718339719a4b13c31606e04c118e6d6dd39a
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLEngineImpl.java
pache/harmony/xnet/provider/jsse/SSLSessionImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketImpl.java
35fb91cbab5e8f068f7f809c2da6944527e6629b 24-Jul-2013 Kenny Root <kroot@google.com> Delay SSLSocketImpl instantiation until needed DO NOT MERGE

Class preloading will create an instance of objects if they are in
static fields, so put the ones we don't want instantiated into a holder
class that is not preloaded.

(cherry picked from commit da5b7116b58795b169961cbd63c2b21bac741d9a)

Bug: 9984058
Change-Id: Ifbf7b7a3668f19ca21fa66a486ae557086a195b5
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLEngineImpl.java
pache/harmony/xnet/provider/jsse/SSLSessionImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketImpl.java
d08b6fbba8df1bc4f74982329c83e0ef8ef13972 13-Aug-2013 Brian Carlstrom <bdc@google.com> Fix backwards internal javadoc

Change-Id: Ia0c5ea1e2400e5767b4fbb3ec428c7b5106ab7b6
pache/harmony/security/fortress/Services.java
35e2b734149e88874883e48785f8263a8972ec61 02-Jul-2013 Kenny Root <kroot@google.com> Merge "JarFile: finish support for authenticated attributes"
3de7083091497358d003bb889eba909f85b69fad 01-Jul-2013 Kenny Root <kroot@google.com> JarFile: finish support for authenticated attributes

There was an unfinished code path to use Authenticated Attributes to
verify JAR files. This finishes it up and allows PKCS#7 signatures with
that field instead of a direct digest on the encapsulated data.

The description of Authenticated Attributes can be found in RFC 3852
section 9 referred to as "authAttrs."

Bug: 9625223
Change-Id: Ia2c8fc09d39fbb67c1bdcdfe087f185471dcedd4
pache/harmony/security/pkcs7/SignerInfo.java
pache/harmony/security/utils/JarUtils.java
pache/harmony/security/x501/AttributeTypeAndValue.java
pache/harmony/security/x501/AttributeValue.java
2a6f23ff8690ac2f025588a360547ce96cde0943 29-Jun-2013 Elliott Hughes <enh@google.com> Add java.nio.charsets.StandardCharsets.

Bug: 3484927
Change-Id: I5820267491b850b8fcc696fa48962710de123009
pache/harmony/security/asn1/ASN1GeneralizedTime.java
pache/harmony/security/asn1/ASN1StringType.java
pache/harmony/security/asn1/ASN1UTCTime.java
pache/harmony/security/provider/cert/X509CertFactoryImpl.java
pache/harmony/security/x501/AttributeTypeAndValue.java
ml/sax/helpers/XMLReaderFactory.java
166679d093d1bd51fde23952779b8d899d87674a 06-Jun-2013 Brian Carlstrom <bdc@google.com> Fix bug in DNParser change

Ensure emailAddress encoded as IA5String

Bug: http://code.google.com/p/android/issues/detail?id=21531
Bug: 5580664
Change-Id: I19b432bc84468828258cbcd44266e4b712e6175d

Bug: 9198822
Change-Id: I8a29f160e870f8deb4b8f3787bb69b4971942c5d
pache/harmony/security/x509/DNParser.java
895bba44ff59d2225532a1fe9842c8b9a70a9f9a 13-May-2013 Brian Carlstrom <bdc@google.com> Move some files with dalvik dependencies to libdvm

Change-Id: I04498d8d8c4b065dbda8d7b30b8b77ce53e63a77
pache/harmony/kernel/vm/StringUtils.java
pache/harmony/lang/annotation/AnnotationFactory.java
pache/harmony/lang/annotation/AnnotationMember.java
pache/harmony/luni/lang/reflect/GenericSignatureParser.java
pache/harmony/luni/lang/reflect/ImplForArray.java
pache/harmony/luni/lang/reflect/ImplForType.java
pache/harmony/luni/lang/reflect/ImplForVariable.java
pache/harmony/luni/lang/reflect/ImplForWildcard.java
pache/harmony/luni/lang/reflect/ListOfTypes.java
pache/harmony/luni/lang/reflect/ListOfVariables.java
pache/harmony/luni/lang/reflect/Types.java
38375a4d0b3d34e2babbd2f6a013976c7c439696 24-Apr-2013 Kenny Root <kroot@google.com> Move JSSE to new package

To help with shipping the JSSE with apps that want to bundle it, move
it to a new package so that the tangles in other parts of the library
can be untangled.

Change-Id: I810b6861388635301e28aee5b9b47b8e6b35b430
pache/harmony/security/utils/AlgNameMapper.java
pache/harmony/security/utils/JarUtils.java
pache/harmony/xnet/provider/jsse/AbstractSessionContext.java
pache/harmony/xnet/provider/jsse/AlertException.java
pache/harmony/xnet/provider/jsse/AlertProtocol.java
pache/harmony/xnet/provider/jsse/Appendable.java
pache/harmony/xnet/provider/jsse/ByteArray.java
pache/harmony/xnet/provider/jsse/CertPinManager.java
pache/harmony/xnet/provider/jsse/CertificateMessage.java
pache/harmony/xnet/provider/jsse/CertificateRequest.java
pache/harmony/xnet/provider/jsse/CertificateVerify.java
pache/harmony/xnet/provider/jsse/ChainStrengthAnalyzer.java
pache/harmony/xnet/provider/jsse/CipherSuite.java
pache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
pache/harmony/xnet/provider/jsse/ClientHello.java
pache/harmony/xnet/provider/jsse/ClientKeyExchange.java
pache/harmony/xnet/provider/jsse/ClientSessionContext.java
pache/harmony/xnet/provider/jsse/ConnectionState.java
pache/harmony/xnet/provider/jsse/ConnectionStateSSLv3.java
pache/harmony/xnet/provider/jsse/ConnectionStateTLS.java
pache/harmony/xnet/provider/jsse/ContentType.java
pache/harmony/xnet/provider/jsse/DHParameters.java
pache/harmony/xnet/provider/jsse/DataStream.java
pache/harmony/xnet/provider/jsse/DefaultSSLContextImpl.java
pache/harmony/xnet/provider/jsse/DelegatedTask.java
pache/harmony/xnet/provider/jsse/DigitalSignature.java
pache/harmony/xnet/provider/jsse/EndOfBufferException.java
pache/harmony/xnet/provider/jsse/EndOfSourceException.java
pache/harmony/xnet/provider/jsse/FileClientSessionCache.java
pache/harmony/xnet/provider/jsse/Finished.java
pache/harmony/xnet/provider/jsse/Handshake.java
pache/harmony/xnet/provider/jsse/HandshakeIODataStream.java
pache/harmony/xnet/provider/jsse/HandshakeProtocol.java
pache/harmony/xnet/provider/jsse/HelloRequest.java
pache/harmony/xnet/provider/jsse/JSSEProvider.java
pache/harmony/xnet/provider/jsse/KeyManagerFactoryImpl.java
pache/harmony/xnet/provider/jsse/KeyManagerImpl.java
pache/harmony/xnet/provider/jsse/Logger.java
pache/harmony/xnet/provider/jsse/Message.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLBIOInputStream.java
pache/harmony/xnet/provider/jsse/OpenSSLCipher.java
pache/harmony/xnet/provider/jsse/OpenSSLCipherContext.java
pache/harmony/xnet/provider/jsse/OpenSSLCipherRSA.java
pache/harmony/xnet/provider/jsse/OpenSSLContextImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAKeyPairGenerator.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAParams.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAPublicKey.java
pache/harmony/xnet/provider/jsse/OpenSSLDigestContext.java
pache/harmony/xnet/provider/jsse/OpenSSLECDHKeyAgreement.java
pache/harmony/xnet/provider/jsse/OpenSSLECGroupContext.java
pache/harmony/xnet/provider/jsse/OpenSSLECKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLECKeyPairGenerator.java
pache/harmony/xnet/provider/jsse/OpenSSLECPointContext.java
pache/harmony/xnet/provider/jsse/OpenSSLECPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLECPublicKey.java
pache/harmony/xnet/provider/jsse/OpenSSLEngine.java
pache/harmony/xnet/provider/jsse/OpenSSLKey.java
pache/harmony/xnet/provider/jsse/OpenSSLKeyHolder.java
pache/harmony/xnet/provider/jsse/OpenSSLMac.java
pache/harmony/xnet/provider/jsse/OpenSSLMessageDigestJDK.java
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAKeyPairGenerator.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateCrtKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPublicKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRandom.java
pache/harmony/xnet/provider/jsse/OpenSSLSecretKey.java
pache/harmony/xnet/provider/jsse/OpenSSLServerSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
pache/harmony/xnet/provider/jsse/OpenSSLSignatureRawRSA.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImplWrapper.java
pache/harmony/xnet/provider/jsse/OpenSSLX509CRL.java
pache/harmony/xnet/provider/jsse/OpenSSLX509CRLEntry.java
pache/harmony/xnet/provider/jsse/OpenSSLX509CertPath.java
pache/harmony/xnet/provider/jsse/OpenSSLX509Certificate.java
pache/harmony/xnet/provider/jsse/OpenSSLX509CertificateFactory.java
pache/harmony/xnet/provider/jsse/PRF.java
pache/harmony/xnet/provider/jsse/PinEntryException.java
pache/harmony/xnet/provider/jsse/PinFailureLogger.java
pache/harmony/xnet/provider/jsse/PinListEntry.java
pache/harmony/xnet/provider/jsse/PinManagerException.java
pache/harmony/xnet/provider/jsse/ProtocolVersion.java
pache/harmony/xnet/provider/jsse/SSLBufferedInput.java
pache/harmony/xnet/provider/jsse/SSLClientSessionCache.java
pache/harmony/xnet/provider/jsse/SSLContextImpl.java
pache/harmony/xnet/provider/jsse/SSLEngineAppData.java
pache/harmony/xnet/provider/jsse/SSLEngineDataStream.java
pache/harmony/xnet/provider/jsse/SSLEngineImpl.java
pache/harmony/xnet/provider/jsse/SSLInputStream.java
pache/harmony/xnet/provider/jsse/SSLParametersImpl.java
pache/harmony/xnet/provider/jsse/SSLRecordProtocol.java
pache/harmony/xnet/provider/jsse/SSLServerSessionCache.java
pache/harmony/xnet/provider/jsse/SSLServerSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/SSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLSessionImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketInputStream.java
pache/harmony/xnet/provider/jsse/SSLSocketOutputStream.java
pache/harmony/xnet/provider/jsse/SSLSocketWrapper.java
pache/harmony/xnet/provider/jsse/SSLStreamedInput.java
pache/harmony/xnet/provider/jsse/SSLv3Constants.java
pache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
pache/harmony/xnet/provider/jsse/ServerHello.java
pache/harmony/xnet/provider/jsse/ServerHelloDone.java
pache/harmony/xnet/provider/jsse/ServerKeyExchange.java
pache/harmony/xnet/provider/jsse/ServerSessionContext.java
pache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
pache/harmony/xnet/provider/jsse/TrustedCertificateIndex.java
pache/harmony/xnet/provider/jsse/TrustedCertificateKeyStoreSpi.java
pache/harmony/xnet/provider/jsse/TrustedCertificateStore.java
48b7f507133e46424c599add4bb0e4f96ef56680 26-Apr-2013 Brian Carlstrom <bdc@google.com> Fix additional races in org.apache.harmony.security.x509.Extensions

Bug: https://code.google.com/p/chromium/issues/detail?id=233610
Bug: 8712523
Change-Id: Ie54f62fa37f31e8ea37b5f4905f0ca3d3e22ac8f
pache/harmony/security/provider/cert/X509CertImpl.java
pache/harmony/security/x509/Extensions.java
c53f9cd802572afa387d2fc0ec87d98daca07a26 25-Apr-2013 Brian Carlstrom <bdc@google.com> Do not set valueDecoded until after the value is decoded

(cherry-picked from a5cc81bb305432bae2fe6d007a992ec1ede0b387)

Bug: https://code.google.com/p/chromium/issues/detail?id=233610
Bug: 8712523
Change-Id: I60e9d948419a177f1982649554e07fc65d061d75
pache/harmony/security/x509/Extension.java
729a228183617c18f4916251d203b48752ed1190 25-Apr-2013 Brian Carlstrom <bdc@google.com> Merge "Do not set valueDecoded until after the value is decoded"
a5cc81bb305432bae2fe6d007a992ec1ede0b387 25-Apr-2013 Brian Carlstrom <bdc@google.com> Do not set valueDecoded until after the value is decoded

Bug: https://code.google.com/p/chromium/issues/detail?id=233610
Bug: 8712523
Change-Id: I976df514e761ffe0d1be1ca8b18e9fe5050c2ba7
pache/harmony/security/x509/Extension.java
b2da4ac2b5c8ddedf5e08aed31481471e408da5f 24-Apr-2013 Elliott Hughes <enh@google.com> Reads from /dev/urandom can't really block.

Move RandomBitsSupplier into its only caller. Bring over the harmony UUIDTest.
Switch the SHA1_Data constants over to the more modern static import idiom.

Bug: https://code.google.com/p/android/issues/detail?id=54168
Change-Id: I4e659e252ab43f481f39d003cf373100c84013d7
pache/harmony/security/provider/crypto/CryptoProvider.java
pache/harmony/security/provider/crypto/RandomBitsSupplier.java
pache/harmony/security/provider/crypto/SHA1Constants.java
pache/harmony/security/provider/crypto/SHA1Impl.java
pache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java
pache/harmony/security/provider/crypto/SHA1_Data.java
pache/harmony/security/provider/crypto/SHA1_MessageDigestImpl.java
f3c1d638b95007788cf6ca1238f8b52c20c60686 24-Apr-2013 Kenny Root <kroot@google.com> X509CertImpl: Remove reference to OpenSSLProvider

OpenSSLProvider is the default provider now so there's no reason to
request it by default.

Change-Id: I03cd947072226d7a58de94cb2c116d7049918bbd
pache/harmony/security/provider/cert/X509CertImpl.java
def4a695d1e00b10043901146d23952f39bb0aa1 17-Apr-2013 Brian Carlstrom <bdc@google.com> Merge "Do not include bogus certs in final chain output" into jb-mr2-dev
e21b3caf3fb4e3e3d9244a000669a547621c16bd 16-Apr-2013 Kenny Root <kroot@google.com> NativeCrypto: fix EOF at beginning of stream

Any InputStream where the first character was an EOF (-1) would cause
OpenSSLBIOInputStream to hang forever. This caused bad X.509
certificates to hang forever in the call to
CertificateFactory#generateCertificate(InputStream)

Bug: 8632056
Change-Id: Ia88f33aa356c3a6a23be872c7eef844873d73d5c
pache/harmony/xnet/provider/jsse/OpenSSLBIOInputStream.java
608ba9e25b0b4c2611197e9ad4cbb58c9db3aa57 27-Mar-2013 Brian Carlstrom <bdc@google.com> Do not include bogus certs in final chain output

(cherry-picked from 2cdf54071e7c62ceca7d40d7f6c704b91aad2a9f)

Bug: 8313312
Bug: https://code.google.com/p/android/issues/detail?id=52295
Change-Id: Ie9f58c1bdc676471eaaf3073a78b0b00c5d9a833
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
2cdf54071e7c62ceca7d40d7f6c704b91aad2a9f 27-Mar-2013 Brian Carlstrom <bdc@google.com> Do not include bogus certs in final chain output

Bug: 8313312
Bug: https://code.google.com/p/android/issues/detail?id=52295
Change-Id: I1fa31335de9c9ee002c25869dbaa2574c70f48cf
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
3b6a95635bfedbd49d3a52cba2c26444685281a2 16-Apr-2013 Brian Carlstrom <bdc@google.com> Merge "Ensure emailAddress encoded as IA5String"
6fa695ae2ba9c2d22146c48f16d12a0d3bbdc728 16-Apr-2013 Brian Carlstrom <bdc@google.com> Ensure emailAddress encoded as IA5String

Bug: http://code.google.com/p/android/issues/detail?id=21531
Bug: 5580664
Change-Id: I19b432bc84468828258cbcd44266e4b712e6175d
pache/harmony/security/x501/AttributeTypeAndValue.java
pache/harmony/security/x501/AttributeValue.java
pache/harmony/security/x509/DNParser.java
674979bffe6f45df0beaf79128b86770d7f7cec9 15-Apr-2013 Kenny Root <kroot@google.com> NativeCrypto: set Calendar instances to 0 millis

X.509 does not have a notion of milliseconds so it was not being set
through the Calendar instances we used in OpenSSLX509Certificate, et al.
Instead it was getting whatever the current millisecond offset was from
the GregorianCalendar default constructor. That made two parsed
certificates unlikely to be equal when comparing since the milliseconds
were also checked.

(cherry picked from commit 3725893865ddbdd2e9cebc2ea2f7ecfc357fcfbb)

Bug: 8616647
Change-Id: Ia914856a560526718957607d69401eab8c2830cf
pache/harmony/xnet/provider/jsse/OpenSSLX509CRL.java
pache/harmony/xnet/provider/jsse/OpenSSLX509CRLEntry.java
pache/harmony/xnet/provider/jsse/OpenSSLX509Certificate.java
3725893865ddbdd2e9cebc2ea2f7ecfc357fcfbb 15-Apr-2013 Kenny Root <kroot@google.com> NativeCrypto: set Calendar instances to 0 millis

X.509 does not have a notion of milliseconds so it was not being set
through the Calendar instances we used in OpenSSLX509Certificate, et al.
Instead it was getting whatever the current millisecond offset was from
the GregorianCalendar default constructor. That made two parsed
certificates unlikely to be equal when comparing since the milliseconds
were also checked.

Bug: 8616647
Change-Id: I756088d946191417bb3afcba082bed5371ed731a
pache/harmony/xnet/provider/jsse/OpenSSLX509CRL.java
pache/harmony/xnet/provider/jsse/OpenSSLX509CRLEntry.java
pache/harmony/xnet/provider/jsse/OpenSSLX509Certificate.java
5911a70a882d502d21b74dcdca6d9f4fcd5e36d5 06-Apr-2013 Brian Carlstrom <bdc@google.com> Don't forget to call sessionRemoved from removeEldestEntry

Also to prevent similar problems in the future, remember SSLSession we
are trying to use in case it disappears from SSLSessionContext.

Added test of SSLSocket SSLSession reuse.

Bug: https://code.google.com/p/android/issues/detail?id=52738
Bug: 8313208

(cherry picked from commit b88ab0efb05475fa9d4e2a06175e95e88f507cff)

Change-Id: I229e018c3acb427a7b580eaf880f86d9b263bac7
pache/harmony/xnet/provider/jsse/AbstractSessionContext.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
90d02cbdbac93f6fee46082e25c1c67f75108442 03-Jan-2013 Chris Palmer <palmer@google.com> Check the EE's eKU extension field, if present.

BUG=https://code.google.com/p/chromium/issues/detail?id=167607 and
https://b.corp.google.com/issue?id=7920492

(cherry picked from commit 0da1515c5fe4e97fc2d4d24a41ebd4c078fec4db)

Change-Id: I4309d4a90a9d41390f41c748fa1442ed736e225f
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
b88ab0efb05475fa9d4e2a06175e95e88f507cff 06-Apr-2013 Brian Carlstrom <bdc@google.com> Don't forget to call sessionRemoved from removeEldestEntry

Also to prevent similar problems in the future, remember SSLSession we
are trying to use in case it disappears from SSLSessionContext.

Added test of SSLSocket SSLSession reuse.

Bug: https://code.google.com/p/android/issues/detail?id=52738
Bug: 8313208

Change-Id: I30824cdf96a0d1086abccb61c011dbc9ad60f8cf
pache/harmony/xnet/provider/jsse/AbstractSessionContext.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
0da1515c5fe4e97fc2d4d24a41ebd4c078fec4db 03-Jan-2013 Chris Palmer <palmer@google.com> Check the EE's eKU extension field, if present.

BUG=https://code.google.com/p/chromium/issues/detail?id=167607 and
https://b.corp.google.com/issue?id=7920492

Change-Id: Ib917c3a4a8ea6a12f685c44056aa44aa414d45e6
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
bc5800cc4ebcd5d778483851b73bdac6b1dc2f3c 29-Mar-2013 Alex Klyubin <klyubin@google.com> Make KeyFactory.translateKey for OpenSSL keys a no-op.

There's no need for the OpenSSL-backed KeyFactory.translateKey to
create copies of Key instances which are already backed by OpenSSL.

(cherry picked from commit 3fb32505a22a01c95ff82435ac7f4d6da001c11c)

Change-Id: I49322aa2d29e44a06e6bd35aed3aebc0ea70a3f9
pache/harmony/xnet/provider/jsse/OpenSSLDSAKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLECKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAKeyFactory.java
4556926f9dee32ac5b2a8ac0c442bc716d1303f3 05-Apr-2013 Kenny Root <kroot@google.com> NativeCrypto: catch another RSA error

Also add a generic fallback for certificate verification when the specific
type of error is unknown.

(cherry picked from commit f04fc33c88d2ad1f06d58d50a0734c0ef511c5b9)

Bug: 8550441
Change-Id: Ica617074718ccac224c9ce3cc8b89502e2abb90d
pache/harmony/xnet/provider/jsse/OpenSSLX509Certificate.java
18ce54dd09e46f348dd8abc218a4eb83c2a00404 05-Apr-2013 Kenny Root <kroot@google.com> Merge "NativeCrypto: catch another RSA error"
96575d78a8f94b4730a0c265760e4173d7021f4a 05-Apr-2013 Kenny Root <kroot@android.com> Merge "Make KeyFactory.translateKey for OpenSSL keys a no-op."
f04fc33c88d2ad1f06d58d50a0734c0ef511c5b9 05-Apr-2013 Kenny Root <kroot@google.com> NativeCrypto: catch another RSA error

Also add a generic fallback for certificate verification when the specific
type of error is unknown.

Bug: 8550441
Change-Id: Iee44be55c698a4a33450b569c12199747fdbcc49
pache/harmony/xnet/provider/jsse/OpenSSLX509Certificate.java
325ce8a74236f16db63c1971a99aeabf55e61a57 01-Apr-2013 Kenny Root <kroot@google.com> NativeCrypto: adjust thrown exceptions

Should be throwing CertificateException when InputStream is null.

Sometimes OpenSSL doesn't push an error onto the list when PEM encoding
fails. This can be seen with the call to PEM_read_bio_X509 with
hyts_badpem.cer Throw a generic RuntimeException instead.

(cherry picked from commit d14eedd3c70f67a0d7af71b56dcf7b8e4f030bdd)

Bug: 8488314
Change-Id: I716c089c00ab477b4803bdd774681e52384eb95d
pache/harmony/xnet/provider/jsse/OpenSSLX509CertPath.java
pache/harmony/xnet/provider/jsse/OpenSSLX509CertificateFactory.java
d14eedd3c70f67a0d7af71b56dcf7b8e4f030bdd 01-Apr-2013 Kenny Root <kroot@google.com> NativeCrypto: adjust thrown exceptions

Should be throwing CertificateException when InputStream is null.

Sometimes OpenSSL doesn't push an error onto the list when PEM encoding
fails. This can be seen with the call to PEM_read_bio_X509 with
hyts_badpem.cer Throw a generic RuntimeException instead.

Bug: 8488314
Change-Id: Iee3b240e3def076f67e15980897be87ff3bf5e6c
pache/harmony/xnet/provider/jsse/OpenSSLX509CertPath.java
pache/harmony/xnet/provider/jsse/OpenSSLX509CertificateFactory.java
39143413c9a4ccb11f0c16b50bdbf07cca79f19c 01-Apr-2013 Kenny Root <kroot@google.com> NativeCrypto: adjust BasicConstraints check

OpenSSL checks KeyUsage for "Certificate Signing" when checking for a
CA, but Java just specifies that the getBasicConstraints call only looks
at the BasicConstraints itself.

(cherry picked from commit cd59afd3e34cb6b3645babdace22c03882e0ec19)

Bug: 8488314
Change-Id: I72f8d6679169480960630bd73745ebf4c55b383c
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLX509Certificate.java
cd59afd3e34cb6b3645babdace22c03882e0ec19 01-Apr-2013 Kenny Root <kroot@google.com> NativeCrypto: adjust BasicConstraints check

OpenSSL checks KeyUsage for "Certificate Signing" when checking for a
CA, but Java just specifies that the getBasicConstraints call only looks
at the BasicConstraints itself.

Bug: 8488314
Change-Id: I072cd2e9f1a9295a717f7587817149200113c65f
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLX509Certificate.java
699ec7b45e1648fb53333df33889971230058233 29-Mar-2013 Kenny Root <kroot@google.com> NativeCrypto: make generation bug compatible

generateCertPath, generateCertificates, and generateCRLs have slightly
different behavior on null input. Match the RI and (apparently) previous
BC behavior.

(cherry picked from commit ce0f579c5e7c384d2a3734e7327ce3a859ba52e3)

Bug: 8488314
Change-Id: I6d0f96829798c83b46201a74cd409ef828e0adb2
pache/harmony/xnet/provider/jsse/OpenSSLX509CertPath.java
pache/harmony/xnet/provider/jsse/OpenSSLX509CertificateFactory.java
ce0f579c5e7c384d2a3734e7327ce3a859ba52e3 29-Mar-2013 Kenny Root <kroot@google.com> NativeCrypto: make generation bug compatible

generateCertPath, generateCertificates, and generateCRLs have slightly
different behavior on null input. Match the RI and (apparently) previous
BC behavior.

Bug: 8488314
Change-Id: I7a175815adb77b38783860806ddff93eaef521d2
pache/harmony/xnet/provider/jsse/OpenSSLX509CertPath.java
pache/harmony/xnet/provider/jsse/OpenSSLX509CertificateFactory.java
d961888f0666ccd4b797205aaeb60889688a9cb8 29-Mar-2013 Alex Klyubin <klyubin@google.com> Switch OpenSSLECDHKeyAgreement to KeyFactory.translateKey.

OpenSSL KeyFactory.translateKey encapsulates all the functionality
for translating arbitrary Key instances to OpenSSL-backed Key
instances. Thus, there's no need to replicate that functionality
elsewhere.

(cherry picked from commit 0469e3a6a9b5e854b8b985039de8ba4f6e6037bd)

Change-Id: I4caa0021e51a83be6932617117275fd033b6d5f7
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLECDHKeyAgreement.java
28a47ccf41ba39f227f0b075dd31cde42b7a5f49 20-Mar-2013 Alex Klyubin <klyubin@google.com> Disallow KeyFactory.translateKey between public and private

This fixes the bug where OpenSSL-backed KeyFactory instances (RSA,
DSA, EC) could translateKey from PrivateKey to PublicKey and vice
versa when presented with "opaque" keys whose translation is
performed via their primary encoded form.

(cherry picked from commit ddee4ef28dcce942e25fd7a24f27239cd74807fa)

Change-Id: Ia24a2591a06ac82c5225a3a9e3069af7a01a0c37
pache/harmony/xnet/provider/jsse/OpenSSLDSAKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLECKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAKeyFactory.java
09b54f5740095a43f81db70bef1dfb9c625d1e5b 29-Mar-2013 Kenny Root <kroot@android.com> Merge "Switch OpenSSLECDHKeyAgreement to KeyFactory.translateKey."
ddee4ef28dcce942e25fd7a24f27239cd74807fa 20-Mar-2013 Alex Klyubin <klyubin@google.com> Disallow KeyFactory.translateKey between public and private

This fixes the bug where OpenSSL-backed KeyFactory instances (RSA,
DSA, EC) could translateKey from PrivateKey to PublicKey and vice
versa when presented with "opaque" keys whose translation is
performed via their primary encoded form.

Change-Id: Ia24a2591a06ac82c5225a3a9e3069af7a01a0c37
pache/harmony/xnet/provider/jsse/OpenSSLDSAKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLECKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAKeyFactory.java
0469e3a6a9b5e854b8b985039de8ba4f6e6037bd 29-Mar-2013 Alex Klyubin <klyubin@google.com> Switch OpenSSLECDHKeyAgreement to KeyFactory.translateKey.

OpenSSL KeyFactory.translateKey encapsulates all the functionality
for translating arbitrary Key instances to OpenSSL-backed Key
instances. Thus, there's no need to replicate that functionality
elsewhere.

Change-Id: I4caa0021e51a83be6932617117275fd033b6d5f7
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLECDHKeyAgreement.java
3fb32505a22a01c95ff82435ac7f4d6da001c11c 29-Mar-2013 Alex Klyubin <klyubin@google.com> Make KeyFactory.translateKey for OpenSSL keys a no-op.

There's no need for the OpenSSL-backed KeyFactory.translateKey to
create copies of Key instances which are already backed by OpenSSL.

Change-Id: I9411d774453251973703ba9de4fd413fac4b2183
pache/harmony/xnet/provider/jsse/OpenSSLDSAKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLECKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAKeyFactory.java
ed7441ebfbc69821598a5bc060518b5c82ffb5c8 20-Mar-2013 Alex Klyubin <klyubin@google.com> InvalidKeyException for "opaque" keys null getEncoded()

This makes OpenSSL-backed KeyFactory instances (RSA, DSA, EC)
translateKey method throw InvalidKeyException for "opaque" keys whose
getFormat() returns non-null while getEncoded() returns null.
Prior to this change a NullPointerException was thrown.

Change-Id: Ie0f3ec27356307338839f4c2b248b0e79578e19b
pache/harmony/xnet/provider/jsse/OpenSSLDSAKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLECKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAKeyFactory.java
223319e62fb4e34b2e82c0d72b3b8af8cb18b68b 18-Mar-2013 Kenny Root <kroot@google.com> NativeCrypto: throw exception on invalid DNS altname

When we receive an invalid DNS alt name (e.g., contains characters
outside of the ASCII printable range), we should throw an exception to
match the previous behavior. This is not validated this against the RI
since the tests currently don't work, but it brings the behavior back to
what it was previously.

Also amend the previous ASN.1 string check to use
ASN1_PRINTABLE_type(...) which actually scans the string to check its
contents. This is what was meant in the last patch.

Bug: 8398461
Change-Id: I260f045a2e144fb9ded7e1d3aa46592da8f63272
pache/harmony/xnet/provider/jsse/NativeCrypto.java
41dbe2157cc4e6c8ec2beb4c17e88caa84ea7dfc 15-Mar-2013 Kenny Root <kroot@google.com> NativeCrypto: catch null input streams in cert factory

Change-Id: I7b4a9d89cab8d35491d2d6efb6dfc0fae8e705d7
pache/harmony/xnet/provider/jsse/OpenSSLX509CertificateFactory.java
7885a9c6c62c6162a308913272447153b6a2e809 14-Mar-2013 Kenny Root <kroot@google.com> NativeCrypto: be more tolerant during translateKey

Change-Id: I284bdb4d037d511390a6beb8518eb9bf9c50f25f
pache/harmony/xnet/provider/jsse/OpenSSLDSAKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLECKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLECPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLECPublicKey.java
pache/harmony/xnet/provider/jsse/OpenSSLKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAKeyFactory.java
0048f46694737c3e46ec3150db608c2cb19f26aa 12-Mar-2013 Kenny Root <kroot@android.com> Merge "Switch TLS Channel ID API from ECPrivateKey to PrivateKey."
c17bdfa469de6c48f16e454611caae3aaa82cc9d 12-Mar-2013 Alex Klyubin <klyubin@google.com> Switch TLS Channel ID API from ECPrivateKey to PrivateKey.

This is to accept both the "transparent" and "opaque" ECC private
keys. "Transparent" keys provide structured access to their key
material -- these are instances of ECPrivateKey. "Opaque" private
keys are not required to provide structured (or even any) access to
their key material -- these are instances of PrivateKey.

Change-Id: I3fdc4c46675bde48c72424f1cc8f59c3d6b89f0e
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
ce14ab85f110ef6b4e5065ede5fd83ff91499d93 11-Mar-2013 Kenny Root <kroot@google.com> NativeCrypto: throw instead of return null

We should not return null for items that cannot be extracted. Instead
throw UnsupportedOperationException so we don't break the API contract.

Change-Id: I09b0854c36f02b5b7ead2fb802f1454353b4cf6e
pache/harmony/xnet/provider/jsse/OpenSSLDSAPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLECPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateCrtKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateKey.java
e741559fd878ee6e3deca9102f7c27e1c1ca70d0 11-Mar-2013 Alex Klyubin <klyubin@google.com> Add support for ECDH KeyAgreement to OpenSSLProvider.

Change-Id: I07d369de0199505d22f2809c815cc2852388a7b7
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLECDHKeyAgreement.java
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
e6de385bae91943cae91d88ad8e1bfdd951930f4 08-Mar-2013 Kenny Root <kroot@google.com> NativeCrypto: various fixes

* JNI_TRACE debug messages were misleading in some cases.

* MD object reference was being passed as a jint

* kusage wasn't being checked for null

Change-Id: I15bcba4d8b7291dc232ea20671917bb0848c3180
pache/harmony/xnet/provider/jsse/OpenSSLMac.java
pache/harmony/xnet/provider/jsse/OpenSSLX509Certificate.java
15cfd91abf3e6d6f905d572fe70cf2b3b4cfee60 08-Mar-2013 Kenny Root <kroot@google.com> NativeCrypto: add CertPath encoding PkiPath

Set the default encoding to be PkiPath to conform to other
implementations. This now passes all the tests.

Change-Id: I8475e328e8440aa3ecccd88c34e2aba6bc169be5
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLX509CertPath.java
52055836ff1f8c235a558b3754b3f3dd25f5d38c 08-Mar-2013 Kenny Root <kroot@google.com> NativeCrypto: add CertPath support with PKCS7

Add support for generating CertPath with the
OpenSSLX509CertificateFactory implementation.

This only will encode withrPKCS7 currently. This means it fails the
CertPath serialization test because the serialization and
de-serialization code only uses a provider's default serialization
format. Since this provider is not the default provider and the
default provider uses PkiPath as its default format, the
OpenSSLX509CertPath still fails the tests.

This seems like a problem with the way CertPath is serialized. The
impact of this seems to be that a CertPath implementation must have
"PkiPath" as its default encoding.

Change-Id: Ie0e3577746345108301b02e7a1d4e8ea189f2bda
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLX509CertPath.java
pache/harmony/xnet/provider/jsse/OpenSSLX509Certificate.java
pache/harmony/xnet/provider/jsse/OpenSSLX509CertificateFactory.java
4e74f18c791e6d005c78a421875ae9bf89228981 07-Mar-2013 Kenny Root <kroot@google.com> NativeCrypto: eliminate some unneeded suppressions

Refactoring eliminated the need for these suppressions, so just remove
them.

Change-Id: Ia7f0160d4b5db09a1d23029f3cd2755ef2bd59d6
pache/harmony/xnet/provider/jsse/OpenSSLX509CertificateFactory.java
75dc9601af8ab3c65114e3c8c57d29ce5ac64125 19-Dec-2012 Kenny Root <kroot@google.com> NativeCrypto: add OpenSSL X.509 certificate/CRLs

Initial implementation of parsing X.509 certificates and certificate
revocation lists (CRLs). This lacks support for generating CertPath
objects, but that will be added at a later time.

This currently isn't the default provider so anything that doesn't
explicitly request this provider will not get this implementation.

Change-Id: I07ae9f333763087cb6ce47e20e12ceeed750920d
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLBIOInputStream.java
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
pache/harmony/xnet/provider/jsse/OpenSSLX509CRL.java
pache/harmony/xnet/provider/jsse/OpenSSLX509CRLEntry.java
pache/harmony/xnet/provider/jsse/OpenSSLX509Certificate.java
pache/harmony/xnet/provider/jsse/OpenSSLX509CertificateFactory.java
c1f6588cf2400b3118bb4fcc65f695491110a4f3 04-Mar-2013 Kenny Root <kroot@google.com> NativeCrypto: add OpenSSLBIOInputStream

Any APIs that deal with potentially unbounded input data need a better
way of reading in data than byte arrays. This provides a building block
to implement those APIs with OpenSSL.

Change-Id: I58fef4388dc2731cc004ec5cb9ccc805acc55888
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLBIOInputStream.java
8acd6134dc84b387608746fbf2054c6d7dcd4f52 28-Feb-2013 Joel Dice <joel.dice@gmail.com> use longs instead of ints to store pointers in OpenSSL binding

This allows the code to be used on 64-bit VMs.

Change-Id: I6c0ef28c55160186c7d59e88ef6fcde4f4a41907
pache/harmony/xnet/provider/jsse/AbstractSessionContext.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLCipher.java
pache/harmony/xnet/provider/jsse/OpenSSLCipherContext.java
pache/harmony/xnet/provider/jsse/OpenSSLDigestContext.java
pache/harmony/xnet/provider/jsse/OpenSSLECGroupContext.java
pache/harmony/xnet/provider/jsse/OpenSSLECPointContext.java
pache/harmony/xnet/provider/jsse/OpenSSLECPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLECPublicKey.java
pache/harmony/xnet/provider/jsse/OpenSSLEngine.java
pache/harmony/xnet/provider/jsse/OpenSSLKey.java
pache/harmony/xnet/provider/jsse/OpenSSLMac.java
pache/harmony/xnet/provider/jsse/OpenSSLMessageDigestJDK.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
0b00d81d3c9e9a2df4635cd6a55e291cce303658 28-Feb-2013 Joel Dice <joel.dice@gmail.com> use longs instead of ints to store pointers in ExpatParser

This allows the class to be used on 64-bit VMs. I've also changed
ExpatAttributes to match.

Change-Id: I4340040085b517b6f713623755f4647e190a68a9
pache/harmony/xml/ExpatAttributes.java
pache/harmony/xml/ExpatParser.java
0425c8e0e163a2ada1d841cfd95c5918098e5ef6 27-Feb-2013 Brian Carlstrom <bdc@google.com> Merge "CertPath: output PkiPath in correct order"
8c6714a408efa908d45c71c8106fb1034a54c3fb 22-Feb-2013 Kenny Root <kroot@google.com> CertPath: output PkiPath in correct order

All PkiPath encodings were coming out backwards from the
specification since the PkiPath is encoded in the opposite sequence of
the documented API convention in code.

Clean up the code to match current convention.

Remove encoding optimization that could cause a race since the cached
encoding fields are not final and the supplied encoding may not match
re-encoding.

Change-Id: I17db0e52272a1adf47766c8bbd33b63da454c1cf
pache/harmony/security/provider/cert/X509CertFactoryImpl.java
pache/harmony/security/provider/cert/X509CertPathImpl.java
004df9b49863d5449c0c70d0ade0203813f4e676 16-Feb-2013 Alex Klyubin <klyubin@google.com> Add support for SECG names for NIST P-192 and P-256 ECC curves.

SECG names of the two curve specs are "secp192r1" and "secp256r1".
OpenSSL doesn't support these names (see crypto/ec/ec_curve.c) because:
* "SECG secp192r1 is the same as X9.62 prime192v1 and hence omitted"
* "SECG secp256r1 is the same as X9.62 prime256v1 and hence omitted"

The BouncyCastle-based EC provider, which was the default on older
Android platforms, supported both the SECG (secp...) and ANSI X9.62
(prime...) names for these curves.

This change also makes java.security.KeyPairGeneratorTest assert that
both the SECG and the ANSI X9.62 names of the two curves are
supported by EC* KeyPairGenerators of all the registered Providers.

Change-Id: I9531f05020971fd47afac2367021e3e3e6345d50
pache/harmony/xnet/provider/jsse/OpenSSLECGroupContext.java
e5e09174c6239dcb22b015466ca1724193da612d 07-Feb-2013 Kenny Root <kroot@google.com> Merge "NativeCrypto: serialize EC keys differently"
3039d83af05c3dee6d2f0d33cc4b9b167b1a4391 06-Feb-2013 Kenny Root <kroot@google.com> NativeCrypto: serialize EC keys differently

Change-Id: Iff593c707723811347b5b7e91bed52b07c490c9d
pache/harmony/xnet/provider/jsse/OpenSSLECPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLECPublicKey.java
3fefbd8abaf356e842705f8ebd24b414dcea8aac 07-Feb-2013 Kenny Root <kroot@google.com> NativeCrypto: update curve names to match OpenSSL

Some of the curve names were incorrect in the ECKeyPairGenerator, so
renamed them to match what OpenSSL expects.

Change-Id: Ib56fe8ce30b95f7faee34a3e18add7c4037e4c47
pache/harmony/xnet/provider/jsse/OpenSSLECKeyPairGenerator.java
92e388f87a6a830793e7e33c6328c8ca6a89aef4 06-Feb-2013 Kenny Root <kroot@google.com> NativeCrypto: reduce strict Class equality check

For requested keySpec, we don't necessarily need the strict equality
check.

Also, remove code that is unreachable: RSAPrivateCrtKeySpec is a child
of RSAPrivateKeySpec, so there is no need to check whether the keySpec
is assignable to the CRT spec.

Change-Id: I8070541b015167d9314b83b45bd1410663487865
pache/harmony/xnet/provider/jsse/OpenSSLDSAKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLECKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAKeyFactory.java
a812f61dc1102c8089c1acd48c24b36829ce2482 06-Feb-2013 Kenny Root <kroot@google.com> NativeCrypto: fix more DSA/ECDSA key generation

* Add hidden API to pass along the EC curve name in ECParameterSpec.
The lack of name passing made KeyFactory2Test fail because the
reconstructed ECDSA key had explicit curve parameters instead of an
OID naming the curve.

* Fix some mixing of PKCS8/X509EncodedKeySpec in DSA/ECDSA KeyFactory
implementations.

* Fix the KeyFactory2Test to output more useful error messages.

* Remove known failure which is no longer happening.

* Change EC_GROUP_get_curve_name to return the "shortName" string
which matches the EC_GROUP_new_by_curve_name

Bug: 3483365
Change-Id: I0a80be88bef728b2177f3593cc3421fa47b79470
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLECGroupContext.java
pache/harmony/xnet/provider/jsse/OpenSSLECKeyFactory.java
8c4b6ac9b5a3346af8b474949c501fbb2d464c50 05-Feb-2013 Kenny Root <kroot@google.com> NativeCrypto: fix some DSA/ECDSA key generation

We were trying to generate a public key from a private key spec which
obviously doesn't work.

Also fix the error messages that indicated public key when it meant
private key.

Change-Id: Ifae417bc3e4c56aced5b7583a34965c7f31c9c66
pache/harmony/xnet/provider/jsse/OpenSSLDSAKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLECKeyFactory.java
fc5480d13eb8b32c325ba79ba4221df2145727b7 05-Feb-2013 Kenny Root <kroot@google.com> NativeCrypto: DSA keys do not always have parameters

DSA keys do not always have parameters. When validating a certificate
chain, the DSA key will inherit parameters from the next DSA key up the
chain if DSAPublicKey#getParams() returns "null".

Change-Id: I052b42219829157ebdf148abb53048044cc83f8d
pache/harmony/xnet/provider/jsse/OpenSSLDSAParams.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAPublicKey.java
eca901e0699ed0b1026dacabc81aed33fba10ead 04-Feb-2013 Kenny Root <kroot@google.com> OpenSSLCipher: fix short buffer error message

Change-Id: I4f16bee3c57c80a113bd92509451606d5fd2b666
pache/harmony/xnet/provider/jsse/OpenSSLCipher.java
c9989de40c23c579bc9dc0231fb643436bbf73cc 01-Feb-2013 Kenny Root <kroot@google.com> OpenSSL KeyFactory for DSA and EC

Add KeyFactory for EC. Uncomment the KeyFactory for DSA.

Remove useless template parameters from RSA KeyFactory.

Change-Id: Id7c4d3624719b5088abf239482ba58c7a2557d61
pache/harmony/xnet/provider/jsse/OpenSSLECKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLECPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLECPublicKey.java
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAKeyFactory.java
7245d2ec05c8488f0bd82720eedac6a2dda17059 01-Feb-2013 Kenny Root <kroot@google.com> NativeCrypto: fix Channel ID tests

The NativeCryptoTest runs from a different class loader, so we need to
make the OpenSSLECGroupContext public to use it from there.

Also make sure we explicitly initialize the EC key at the beginning of
the test.

Change-Id: I733fe6263ef2ef72988987bf608cb806752033f5
pache/harmony/xnet/provider/jsse/OpenSSLECGroupContext.java
a45d02e5fbf1ec387dcb1e6c91e867d32ab36193 23-Jan-2013 Kenny Root <kroot@google.com> NativeCrypto: add OpenSSLSecretKey for HMAC

Change-Id: Id5a77b41549944d7deffda0e2a4e60dbbd26184e
pache/harmony/xnet/provider/jsse/OpenSSLEngine.java
pache/harmony/xnet/provider/jsse/OpenSSLKey.java
pache/harmony/xnet/provider/jsse/OpenSSLMac.java
pache/harmony/xnet/provider/jsse/OpenSSLSecretKey.java
6914efca8fe737a753d234d7e91222da6a8cdabe 28-Jan-2013 Kenny Root <kroot@google.com> NativeCrypto: add test base for OpenSSL ENGINEs

This sets up some of the testing infrastructure to allow us to test all
the ENGINE-related test paths in the NativeCrypto code.

Change-Id: I21f3dbebbaa90327d48a99020ae3a3e90624cc75
pache/harmony/xnet/provider/jsse/NativeCrypto.java
0731d6d00c5e30c05e035d3ae96327029d07a606 22-Jan-2013 Kenny Root <kroot@google.com> OpenSSLKey: easier creation and use of OpenSSL keys

For some future changes, it will be easier to convert OpenSSL objects to
real objects and back from native pointers. Make it easier to add new
EVP_PKEY types without adding them in if/else statements everywhere.

Change-Id: I19095bfc5f00835a266f572bc62e2e8d0a8cd544
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAPublicKey.java
pache/harmony/xnet/provider/jsse/OpenSSLECGroupContext.java
pache/harmony/xnet/provider/jsse/OpenSSLECPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLECPublicKey.java
pache/harmony/xnet/provider/jsse/OpenSSLEngine.java
pache/harmony/xnet/provider/jsse/OpenSSLKey.java
pache/harmony/xnet/provider/jsse/OpenSSLKeyHolder.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateCrtKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPublicKey.java
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
pache/harmony/xnet/provider/jsse/OpenSSLSignatureRawRSA.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
4b88b3ded5c026282bf3a38cc006dc5f764603a1 19-Jan-2013 Brian Carlstrom <bdc@google.com> Merge "Add support for TLS Channel ID to OpenSSL-backed sockets."
7e5832d1a709558fca80ecb25fdd0626b2d4312d 19-Jan-2013 Kenny Root <kroot@google.com> Merge changes Idfb18017,Ifbba9fdf

* changes:
OpenSSLMac: fix initialization with new key
HarmonyJSSE: convert byte correctly in padding check
0d4ee1f9b8c37fb33cd74da4efac5905ba138e45 19-Jan-2013 Kenny Root <kroot@google.com> OpenSSLMac: fix initialization with new key

If an OpenSSLMac instance was re-initialized with a new key, it wouldn't
produce correct results. Make sure to re-initialize the EVP_MD_CTX as
well.

Change-Id: Idfb18017407ff65866ae7e6f6fca3d646a970803
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLMac.java
3247af087973af299112cde32101592e86992c6f 18-Jan-2013 Kenny Root <kroot@google.com> HarmonyJSSE: convert byte correctly in padding check

This gives a better error message since the byte could be negative
without the mask.

Change-Id: Ifbba9fdf647b7ecf8bc300fb1034011ba8357401
pache/harmony/xnet/provider/jsse/ConnectionStateSSLv3.java
pache/harmony/xnet/provider/jsse/ConnectionStateTLS.java
de30700ecd96af43e2f3ee2e03f398896f5bb1e9 17-Jan-2013 Alex Klyubin <klyubin@google.com> Add support for TLS Channel ID to OpenSSL-backed sockets.

On the client, TLS Channel ID is enabled by passing an ECDSA P-256
private key to OpenSSLSocketImpl via the new setChannelIdPrivateKey
method.

On the server, TLS Channel ID is enabled via the new method
OpenSSLServerSocketImpl.setChannelIdEnabled. After the TLS/SSL
handshake, the Channel ID can be obtained via the new method
getChannelId.

See http://tools.ietf.org/html/draft-balfanz-tls-channelid-00.

Change-Id: I035e86d36678ae5956e6c1837afefcd668b3d750
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
90c22063c0c26c1f9762dcaa91eef2f1ae607d67 18-Jan-2013 Brian Carlstrom <bdc@google.com> Track new value of SSL_MODE_HANDSHAKE_CUTTHROUGH in external/openssl

Change-Id: Ie5cd6d4201ce2f361384eebe37487a3586321e8b
pache/harmony/xnet/provider/jsse/NativeCrypto.java
65de5c409f566322178f7b890e4e47c656702810 18-Jan-2013 Kenny Root <kroot@google.com> Merge "NativeCrypto: output named curves when possible"
c9acbf1c80d90952f7a4bce83e37c2540e42f6fc 17-Jan-2013 Kenny Root <kroot@google.com> NativeCrypto: output named curves when possible

When converting to ASN.1 format from a named curve, try to make sure we
can output those named curves whenever possible instead of all the
parameters.

Also make sure we output in uncompressed point format for compatibility
with other implementations.

Change-Id: I3f370be694ac709f02e3043a2c1152ad4838ef41
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLECGroupContext.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
dd94f8009771072a170cdba3fc582c63aaaa5387 16-Jan-2013 Kenny Root <kroot@google.com> Make sure alternativeNames are unmodifiable

Add tests to make sure the Collection<List<?>> instance returned from
getSubjectAlternativeNames and getIssuerAlternativeNames is
unmodifiable. Also test the byte arrays returned are clones of
anything kept long-term.

Change-Id: Ia7564665643e63cb04a264b011eeebaeeed3811f
pache/harmony/security/x509/Extensions.java
1d1012ac483d7caccae0e8e07273dedab573e0ba 12-Jan-2013 Elliott Hughes <enh@google.com> Clean up RandomBitsSupplier.

The reason the array had later items commented out is that the loop
was wrong: it would always choose the _last_ valid device, not the
_first_ as intended.

There were two choices here:
1. fix the loop and have the same list of three devices that OpenSSL uses.
2. remove the loop and just say "you must have /dev/urandom".

This patch goes with option 2.

Change-Id: Ia99be6ba929c7b6c35bed77c19d47de80719973c
pache/harmony/security/provider/crypto/RandomBitsSupplier.java
8c4a407e34de1b348316a9175bd1c0577c887181 09-Jan-2013 Brian Carlstrom <bdc@google.com> verifyCertificateChain should convert unknown exceptions to CertificateException

Bug: http://code.google.com/p/android/issues/detail?id=42533
Change-Id: Id0e0eb8f007987decb4fee94135be8a92d2f8981
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
28d504c4188a5d25a7209e4d1c131e0afffa1fcf 07-Jan-2013 Kenny Root <kroot@google.com> Harmony: fix DirName handling in X.509 certs

In SubjectAlternativeName, the directoryName (4) entry is actually a
CHOICE of a single possibility. Harmony was trying to decode it as the
single possibility itself and running into parsing issues.

Additionally, change T61String (TeletexString) handling to assume UTF8
encoding like the RI does.

Change-Id: Ic0b9541dfed21b59940fa50a27cee2e7704d8950
pache/harmony/security/asn1/ASN1StringType.java
pache/harmony/security/x509/DNParser.java
pache/harmony/security/x509/GeneralName.java
3b14c4bd5c7ce28ed3485bd24285c58424c074af 07-Jan-2013 Kenny Root <kroot@google.com> Harmony: ignore invalid IP in subject alt. names

The RI and other providers will ignore invalid IP lengths instead of
throwing a parsing exception. Bring Harmony in line with those other
providers.

Change-Id: I65715a58614543ab296493829338239cf402ae5d
pache/harmony/security/x509/Extensions.java
pache/harmony/security/x509/GeneralName.java
pache/harmony/security/x509/GeneralNames.java
3b0aee6ea60c14ba1e1e876b511dceb55131770d 07-Jan-2013 Kenny Root <kroot@google.com> Fix Harmony's generateCertificates for empty input

The docs say that if an InputStream does not have any certificates, it
will return an empty collection.

Change-Id: I470c05c097de6c3fa80571294b31cf7ffd10f003
pache/harmony/security/provider/cert/X509CertFactoryImpl.java
beee0a569bf1077f0d3be516fed63661fcedde5c 21-Dec-2012 Brian Carlstrom <bdc@google.com> Fix X509Certificate.getBasicConstraints implementation for DRLCertFactory

Change-Id: I5d1ba078b0f8f9ec8e2950e0da02481e8162a5e6
pache/harmony/security/provider/cert/X509CertImpl.java
pache/harmony/security/x509/BasicConstraints.java
pache/harmony/security/x509/Extensions.java
cff1616012dc0d56c2da9af2b9b1183e76c7e044 04-Dec-2012 Elliott Hughes <enh@google.com> Add detail messages to all the easy IllegalArgumentException cases.

Noticed during my recent Matcher change.

Change-Id: I415d911b26d0ee548ca04d56bba7fc3d4e6b3f88
pache/harmony/security/asn1/ObjectIdentifier.java
81341fd8822d545037fca9d9820a7814e6d64da7 26-Nov-2012 Elliott Hughes <enh@google.com> Fix InnerNodeImpl.insertBefore.

As the submitter said, an insertBefore with a null refChild should be taken as
a request to append.

Bug: http://code.google.com/p/android/issues/detail?id=24530
Change-Id: I26141e2d4dd7a7805209a455a7c16bf0f26e7acf
pache/harmony/xml/dom/InnerNodeImpl.java
a0d32add4376f31f35e2a50f59185f16f5cd8ccb 30-Aug-2012 Brian Carlstrom <bdc@google.com> DO NOT MERGE

Disable SSL compression

Bug: 7079965

Change-Id: I8e060a827613e212bbcced66507fbf124bb04543

modified: luni/src/main/java/libcore/net/http/HttpConnection.java
modified: luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java
modified: luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java
modified: luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
modified: luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
modified: luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp
modified: luni/src/test/java/org/apache/harmony/xnet/provider/jsse/NativeCryptoTest.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
df99092f30a7bdc9f40f2fa0c3546a30d925edc0 01-Nov-2012 Brian Carlstrom <bdc@google.com> resolved conflicts for merge of eef7e935 to jb-mr1-dev-plus-aosp

Change-Id: I1af764dffabdfa63bc383b606d0c86451bdf64dd
eef7e9357c272a9154f007e8bee2a09eed66d101 01-Nov-2012 Brian Carlstrom <bdc@google.com> Test to verify BC Signature algorithms by OID

Bug: 7453821
Change-Id: I69408d0bb4063e34441ed1d7632fd1ccac39965b
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
9fb84f4bee364d44b1d0d425109c98e964b23ae4 30-Oct-2012 Brian Carlstrom <bdc@google.com> am adcea0bf: Merge "Prefer PKIX algorithm name for TrustManagerFactory and KeyManagerFactory"

* commit 'adcea0bf53b5b932013d8290619f17715b33f139':
Prefer PKIX algorithm name for TrustManagerFactory and KeyManagerFactory
c934a095e1f863f00bf6f7c0b37fbd05ebeaaff5 29-Oct-2012 Brian Carlstrom <bdc@google.com> Prefer PKIX algorithm name for TrustManagerFactory and KeyManagerFactory

Change-Id: I3da5bdf6739c6aee5ec0174e93cd6c06d6dfeeb3
pache/harmony/xnet/provider/jsse/DefaultSSLContextImpl.java
pache/harmony/xnet/provider/jsse/JSSEProvider.java
fb31596585a76917591b83958e19649651d02666 16-Oct-2012 Kenny Root <kroot@google.com> am 0eacbe9c: Merge "Try to more robustly identify algorithm for JARs"

* commit '0eacbe9cb7a9d84f4ca0a05f68c18c373b00d5f2':
Try to more robustly identify algorithm for JARs
c323184c9221d119b8b06a1fff6731f5119a64c0 16-Oct-2012 Kenny Root <kroot@google.com> am 196687f6: Merge "Use OpenSSL to convert from OID to name"

* commit '196687f6ed88a0935813efec5ca49c86fd536bf2':
Use OpenSSL to convert from OID to name
0eacbe9cb7a9d84f4ca0a05f68c18c373b00d5f2 16-Oct-2012 Kenny Root <kroot@google.com> Merge "Try to more robustly identify algorithm for JARs"
196687f6ed88a0935813efec5ca49c86fd536bf2 16-Oct-2012 Kenny Root <kroot@google.com> Merge "Use OpenSSL to convert from OID to name"
0130cf9705455a63eca0a4651986bb0806a7f5bc 16-Oct-2012 Geremy Condra <gcondra@google.com> am f2df9e57: Merge "Adding minimum cryptographic strength check for cert chains."

* commit 'f2df9e575e6f0a20b1b27f0fca6a62e2b19729b1':
Adding minimum cryptographic strength check for cert chains.
f2df9e575e6f0a20b1b27f0fca6a62e2b19729b1 16-Oct-2012 Geremy Condra <gcondra@google.com> Merge "Adding minimum cryptographic strength check for cert chains."
200be7055e30cd0f67b79df768b71bca19c5c596 11-Oct-2012 Geremy Condra <gcondra@google.com> Adding minimum cryptographic strength check for cert chains.

Change-Id: Id8a3fc28a07c086182183090cd79372ac81582e6
pache/harmony/xnet/provider/jsse/ChainStrengthAnalyzer.java
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
8a0cab6874217edc046ebf1836366b9bef935aea 15-Oct-2012 Kenny Root <kroot@google.com> Try to more robustly identify algorithm for JARs

Change-Id: I17f339efd030fff38e8c59f8d607625de2627d4e
pache/harmony/security/pkcs7/SignerInfo.java
pache/harmony/security/utils/JarUtils.java
ed23021e0292c42d6471b57cdee3af2e6ad04db7 16-Oct-2012 Elliott Hughes <enh@google.com> am 815d8932: Merge "More "charsetName" consistency."

* commit '815d8932cb41e62d1ee47d4975e9812e2ef72b9c':
More "charsetName" consistency.
be4a7d686edf15a7fbdd00b40cf78cb26d105d0e 16-Oct-2012 Elliott Hughes <enh@google.com> More "charsetName" consistency.

A follow-on to 9b9e9145bc55a47be42a9d3f7ecc9f6b533739b2, after URLDecoder
caused some confusion.

Change-Id: I727dc375593596272d06e177c5dd8002d3e7321c
pache/harmony/xml/ExpatReader.java
5f01aefdc4bff1cfdf2833015d02b58cd8743918 16-Oct-2012 Kenny Root <kroot@google.com> am d3d501c3: Merge "SubjectPublicKeyInfo: use algorithm OID as fallback"

* commit 'd3d501c36e0ced8d7c0919b6aba0a64ab8a251e3':
SubjectPublicKeyInfo: use algorithm OID as fallback
4a8388aeb988c5ed88f1105f9fa66a5ebd2ffbe3 15-Oct-2012 Kenny Root <kroot@google.com> Use OpenSSL to convert from OID to name

OpenSSL has a large database of OID mappings, so fall back to it if the
built-in Harmony database doesn't find it.

Change-Id: I72daa0b4f697d406a0d3f8285ce20d4e9ec04d27
pache/harmony/security/utils/AlgNameMapper.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
0251c5ab1c073ee09ba6673383846d2ccf58abf9 15-Oct-2012 Kenny Root <kroot@google.com> SubjectPublicKeyInfo: use algorithm OID as fallback

If the algorithm has a name, but there are no KeyFactory available for
that particular algorithm name, try to use the algorithm OID to find a
KeyFactory before falling back to X509PublicKey.

Change-Id: I2b294f2db3388372479c964f53fdff7fb62f3d8f
pache/harmony/security/x509/AlgorithmIdentifier.java
pache/harmony/security/x509/SubjectPublicKeyInfo.java
b762206996492843be768a7ae061bbc85b5491da 15-Oct-2012 Kenny Root <kroot@google.com> am 70798f65: Merge "OpenSSLCipher: add ARC4 support"

* commit '70798f652c21e9bec770d0b965130311a84d5959':
OpenSSLCipher: add ARC4 support
edefa57a822c27f3e9def050fd50e375c5908551 02-Oct-2012 Kenny Root <kroot@google.com> OpenSSLCipher: add ARC4 support

Change-Id: Iccdd76260af1afab0855816b3ccdd34fbc52295b
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLCipher.java
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
9dbe25c174d4f7e5099db1ea278513971e058ff8 12-Oct-2012 Kenny Root <kroot@google.com> am 0bf8e7a3: Merge "Add support for ECDSA signatures on jar files"

* commit '0bf8e7a3145bbc6a32f5b88364a923af40434b61':
Add support for ECDSA signatures on jar files
52c906b82c75e811284a1788e5ca0b4330a55a36 10-Oct-2012 Kenny Root <kroot@google.com> Add support for ECDSA signatures on jar files

Change-Id: If928f2244b3a0809255d6619c25268beb84f76d3
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
9679c42bd37a2539b7306891cba53731c7a8b91b 12-Oct-2012 Kenny Root <kroot@google.com> am d5d84f6c: Merge "NativeCrypto: add EC key pairs"

* commit 'd5d84f6c657b9d130b4d34c77f151f425ae70ff4':
NativeCrypto: add EC key pairs
9d2fb535e5d43ad34af09195d490da18a7694a48 11-Oct-2012 Kenny Root <kroot@google.com> NativeCrypto: add EC key pairs

Change-Id: I8240df5ff12e38dd935258def099aed4663955ea
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLECGroupContext.java
pache/harmony/xnet/provider/jsse/OpenSSLECKeyPairGenerator.java
pache/harmony/xnet/provider/jsse/OpenSSLECPointContext.java
pache/harmony/xnet/provider/jsse/OpenSSLECPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLECPublicKey.java
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
46d6243e9e39a2b68b985bfd534cc891e52df274 09-Oct-2012 Brian Carlstrom <bdc@google.com> Change OpenSSLCipherRSA.{engineGetBlockSize,engineGetOutputSize} to return result based on key size

Includes cherry-pick of 847f22adbd0e829b84491d7202dcbed5bf67a98c

Bug: 7192453
Change-Id: Ib5fa1e313d942d2c1034e8e7831af285ad24d71d
pache/harmony/xnet/provider/jsse/OpenSSLCipherRSA.java
b24a6fea3247c5090445f672296d0e92151ee31f 11-Oct-2012 Elliott Hughes <enh@google.com> am a7a609b2: Merge "Remove XML package.html files."

* commit 'a7a609b2fb1f34b2ec46ff7944196639dc3918c8':
Remove XML package.html files.
0d6942765f21b3ed1fcf5ae6ad01c4c5105fb73e 11-Oct-2012 Brian Carlstrom <bdc@google.com> am bf0709af: Merge "Fix typos from "beed" to "been""

* commit 'bf0709af8d77df0975d51350e29598bac69f1ac3':
Fix typos from "beed" to "been"
3306cbed1914e5dc1e87a0f75689f18c75312e7d 11-Oct-2012 Elliott Hughes <enh@google.com> Remove XML package.html files.

Bug: http://code.google.com/p/android/issues/detail?id=7395
Change-Id: Id769856bdbdca864ccc2818e3609fe5ca00da2b2
3c/dom/package.html
ml/sax/ext/package.html
ml/sax/helpers/package.html
ml/sax/package.html
5692d40be0e19ef1d0cc988a579576496adf5237 11-Oct-2012 Brian Carlstrom <bdc@google.com> Fix typos from "beed" to "been"

Bug: http://code.google.com/p/android/issues/detail?id=38366
Change-Id: I44c647843e66a57bcbeabad41ec3142faaa1848e
pache/harmony/security/x509/DNParser.java
72e44404c32a98e7675a6e7cfbf856adb499a434 09-Oct-2012 Brian Carlstrom <bdc@google.com> Change OpenSSLCipherRSA.{engineGetBlockSize,engineGetOutputSize} to return result based on key size

Includes cherry-pick of 847f22adbd0e829b84491d7202dcbed5bf67a98c

Bug: 7192453
Change-Id: Ib5fa1e313d942d2c1034e8e7831af285ad24d71d
pache/harmony/xnet/provider/jsse/OpenSSLCipherRSA.java
8b1ab347f6eaefe76d2c1b932a6f77563877236b 10-Oct-2012 Kenny Root <kroot@google.com> am 99d0590f: Merge "Remove provider specified from JarVerifier"

* commit '99d0590f2bb5a79f17e677f65c2ca932546c89e9':
Remove provider specified from JarVerifier
b3bc3cd743d06f5fb59a1c950a7634b47f3cafc4 10-Oct-2012 Kenny Root <kroot@google.com> resolved conflicts for merge of 30d217ad to jb-mr1-dev-plus-aosp

Change-Id: Iedafef8005b3d26a16f8b279408f113f3afe7a8a
99d0590f2bb5a79f17e677f65c2ca932546c89e9 10-Oct-2012 Kenny Root <kroot@google.com> Merge "Remove provider specified from JarVerifier"
bd8ab2e83c356478106d902eda9477b19fb83ce6 10-Oct-2012 Kenny Root <kroot@google.com> Remove provider specified from JarVerifier

Change-Id: I137455e38c20144165c1981076dcbaa26f5bb4a2
pache/harmony/security/utils/JarUtils.java
3d1643390a0d624a27b8eccc589b337949657c76 10-Oct-2012 Kenny Root <kroot@google.com> Add OIDs for algorithms

This allows things from a PKCS#7 container (or any other container that
specifies algorithms by OID) to get an instance via OID instead of the
common name.

Bug: http://code.google.com/p/android/issues/detail?id=38321
Change-Id: Ie766751a3f7894a558f7e40e7d520800bf7a8a08
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
a8e0ac07166ba25fa50e83773cd18ac9f36bf18e 05-Oct-2012 Kenny Root <kroot@google.com> am f2c8382b: am 5a1225cc: Merge "NativeCrypto: add assertions for no OpenSSL errors"

* commit 'f2c8382b0aa0fca4b79601cb21a9136b862996c2':
NativeCrypto: add assertions for no OpenSSL errors
008e8a74088c7508b49d8ea2323deef40c5076a7 05-Oct-2012 Kenny Root <kroot@google.com> NativeCrypto: add assertions for no OpenSSL errors

Some calls in NativeCrypto appear to be not clearing error states. Add
an assertion at the end of each test to make sure this doesn't happen.

Change-Id: I9030891a8dc9e7715e65071fe949a11d7a560e56
pache/harmony/xnet/provider/jsse/NativeCrypto.java
a7789931a001d62e02dfb8238c1664cc1103609d 05-Oct-2012 Kenny Root <kroot@google.com> am 353e8448: am 3f83b9c8: Merge "OpenSSLCipher: account for padding on doFinal"

* commit '353e84483aa2be779d3938d76890e8b218358d89':
OpenSSLCipher: account for padding on doFinal
2d77ba4ab779bfb5dcd1ee7fe063850d51a92ca3 05-Oct-2012 Kenny Root <kroot@google.com> am 9e1cd813: am 26d9dc15: Merge "Do not use OpenSSLCipherContext in tests"

* commit '9e1cd813f618c738007dc7ea3eaf15ee5863a4cc':
Do not use OpenSSLCipherContext in tests
3f83b9c80bda2de1927efaca193000ae30f22f01 05-Oct-2012 Kenny Root <kroot@google.com> Merge "OpenSSLCipher: account for padding on doFinal"
7ca2e3509b2b8578de48ac5e226d1b675a66c69f 05-Oct-2012 Kenny Root <kroot@google.com> Do not use OpenSSLCipherContext in tests

Change-Id: I422954e7e9a9d1021d4281a254cdd732f37ca2bf
pache/harmony/xnet/provider/jsse/OpenSSLCipherContext.java
5b5904640b44fe2fd760b5d427edeffe20f55630 05-Oct-2012 Kenny Root <kroot@google.com> OpenSSLCipher: account for padding on doFinal

Decrypting also needs to check padding on the last block, so special
case encrypting in getOutputSize

Change-Id: I0bfaf6f40f5d618e4dd1853668ec5400058e6b67
pache/harmony/xnet/provider/jsse/OpenSSLCipher.java
0804bbcc7de405ce92436cf82d72194666017b43 05-Oct-2012 Kenny Root <kroot@google.com> am 206730de: am dfa280ba: Merge "OpenSSLMac: add license header"

* commit '206730de97cf8f3ebbe8998a86a3f8405c34f2a4':
OpenSSLMac: add license header
7842ba5ddb88f17c180bba8bfc32f2ef7270b382 05-Oct-2012 Kenny Root <kroot@google.com> am 080cda4a: am 7ae5f93f: Merge "OpenSSLMac: new OpenSSL HMAC connector"

* commit '080cda4ad77052269b3ac9a7db48cec05c49f3b4':
OpenSSLMac: new OpenSSL HMAC connector
725daeb9049fcbe761314e6263c14608ae7bb087 05-Oct-2012 Kenny Root <kroot@google.com> OpenSSLMac: add license header

Change-Id: Id205d75d0c82ee33698758f1d6fbec850971322b
pache/harmony/xnet/provider/jsse/OpenSSLMac.java
7ae5f93f03f60b349f611122c4944634cfba4f39 05-Oct-2012 Kenny Root <kroot@google.com> Merge "OpenSSLMac: new OpenSSL HMAC connector"
a9a21fc20ac86e723c141bc145f582a2ab83268a 04-Oct-2012 Kenny Root <kroot@google.com> OpenSSLMac: new OpenSSL HMAC connector

Change-Id: I6a6a9cbdcdc490a0bc1c313bbaf045a4fd99555e
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLDigestContext.java
pache/harmony/xnet/provider/jsse/OpenSSLMac.java
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
130e5d6b0281470f03abf810eb38aaa5aa1ca746 05-Oct-2012 Kenny Root <kroot@google.com> am a0592d4e: am d0670a67: Merge "OpenSSLCipher: use OpenSSL buf_len data"

* commit 'a0592d4ed7c71d5c1269d4e71611f10627fff8e7':
OpenSSLCipher: use OpenSSL buf_len data
81508e23428cffc070132f461c1166077910e836 05-Oct-2012 Kenny Root <kroot@google.com> OpenSSLCipher: use OpenSSL buf_len data

This allows us to exactly match other implementation outputs for the
same input values. What we were doing before was technically to the
API's documented behavior, but broke some other things.

Change-Id: I7e95dab4a7be8d737e862f6b6ddb04f6bbcd0dbe
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLCipher.java
f3cf8f7daed90edec16c9c1582d60fc21723eeb6 04-Oct-2012 Kenny Root <kroot@google.com> am a8969127: am 77be92fe: Merge "OpenSSLCipher: don\'t explode during null decrypt"

* commit 'a8969127cda9984754f758e1e3f839a83c5719f6':
OpenSSLCipher: don't explode during null decrypt
d57f3547302678e7f61016b121530105e4fc0819 04-Oct-2012 Kenny Root <kroot@google.com> am 46b18865: am 7efb2a19: Merge "OpenSSLCipher: only return block size multiples"

* commit '46b18865ebf78a72f5bf9faf3b33485ea3dfd6c9':
OpenSSLCipher: only return block size multiples
77be92fe27e1cc9204b0bac3b9a9a324fd41eb57 04-Oct-2012 Kenny Root <kroot@google.com> Merge "OpenSSLCipher: don't explode during null decrypt"
e0a42275cfb7edeb10118f2ab6005bb3095f38b5 04-Oct-2012 Kenny Root <kroot@google.com> OpenSSLCipher: only return block size multiples

There is a faulty test that called .getOutputSize(inputLen) and then
used the output of that to provide inputLen for the .doFinal(...) call.
Unfortunately, this is the only cipher that failed since we're not
returning exact multiples of block size for .getOutputSize(...) calls.

Instead we'll just return exact block size multiples so we don't run
afoul of any other broken code.

Change-Id: I1ca860d6df300ee67df90e575fc476d8291ec9c1
pache/harmony/xnet/provider/jsse/OpenSSLCipher.java
fac659c013ec9c2783f60afce39e83eb107f117d 04-Oct-2012 Kenny Root <kroot@google.com> OpenSSLCipher: don't explode during null decrypt

Other Cipher implementations return "null" when calling "doFinal()"
during decrypt mode without having ever called .update(...)
Change OpenSSLCipher to do the same.

Change-Id: I76e22702a446912df125af0ff518fb123d62f5a3
pache/harmony/xnet/provider/jsse/OpenSSLCipher.java
d5db85f89e11e1ad4f78686b86d27ad26cb1c938 04-Oct-2012 Brian Carlstrom <bdc@google.com> am d26da2f6: am 9ac72760: Merge "OpenSSLCipher: remove buffer for partial blocks"

* commit 'd26da2f66c9139280a7fbd434980b3bd8349b612':
OpenSSLCipher: remove buffer for partial blocks
5189c980ebdc842e0e5ca7d6794b4880aa0b6cd5 04-Oct-2012 Kenny Root <kroot@google.com> OpenSSLCipher: remove buffer for partial blocks

Some block ciphers buffer the first block used. We weren't accounting
for this so we started failing with DES3. This led to another issue that
OpenSSL can sometimes keep things in its internal buffer. Instead of
having multiple levels of buffering, just rely on OpenSSL to do the
buffering.

Change-Id: I40a6c7e92e70d3c9ae530f35e8a4234f62e8d225
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLCipher.java
5db76d31870b0ef3ced3b0f01584118b4b9a3e3d 03-Oct-2012 Kenny Root <kroot@google.com> am ed07842e: am db3690a2: Merge "Fix some failing unit tests"

* commit 'ed07842e67e28e57c0ef596e2e1e4772d54926da':
Fix some failing unit tests
db3690a2d37331bd48b67ba177f7fc1bb33c9276 03-Oct-2012 Kenny Root <kroot@google.com> Merge "Fix some failing unit tests"
a56d856815c0974298fbdd9210b8f5a890756add 03-Oct-2012 Kenny Root <kroot@google.com> am bec17d88: am dac74262: Merge "OpenSSLCipher: 3DES cipher name depends on key size"

* commit 'bec17d88296d0729e8f5047e91e156d2fbce3b08':
OpenSSLCipher: 3DES cipher name depends on key size
dac742628847c1abd746de773a3ccd37a406469d 03-Oct-2012 Kenny Root <kroot@google.com> Merge "OpenSSLCipher: 3DES cipher name depends on key size"
1fe411ff4e4aa4f24158effb6dbfd786bb30048a 03-Oct-2012 Kenny Root <kroot@google.com> Fix some failing unit tests

evpCipher can be null to handle re-initialization of CIPHER_CTX
instances.

Make the constructor of OpenSSLCipherContext public so it can be used in
testing.

Fix all of the things hidden by JNI_DEBUG that were not correct.

Throw a BadPaddingException when a decrypt fails. This particular error
is returned by OpenSSL in evp_enc.c from EVP_DecryptFinal_ex when the
padding check fails.

Change-Id: I77cad024db52986fe726443cd9b3ff52430a30dd
pache/harmony/xnet/provider/jsse/OpenSSLCipherContext.java
46a749879a6d52408e51938b9e63683b238d0bee 03-Oct-2012 Kenny Root <kroot@google.com> OpenSSLCipher: 3DES cipher name depends on key size

OpenSSL doesn't infer from the key size whether to use two-key or
three-key 3DES, so explicitly call it out.

Change-Id: Ibd93088844e7585e72a7c7857dd2af8a150b3780
pache/harmony/xnet/provider/jsse/OpenSSLCipher.java
b9fac1a0d7638d692d03416e5beab40cb8a1d643 03-Oct-2012 Brian Carlstrom <bdc@google.com> am 55e75879: am a4c696b7: Merge "Make ASN1 time locale safe."

* commit '55e75879622098428e3a7be4efd6636261d4fbe8':
Make ASN1 time locale safe.
a4c696b77b990cbf12e1e7eed630767317c19132 03-Oct-2012 Brian Carlstrom <bdc@google.com> Merge "Make ASN1 time locale safe."
c3e475e288f0027502b16f3cfea0ce5cc8d4bdfd 03-Oct-2012 Johan Redestig <johan.redestig@sonymobile.com> Make ASN1 time locale safe.

The ASN1 classes were using SimpleDateFormat with the
default locale which caused the to produce time strings
that did not follow the spec in some locales.

Change-Id: I74979e0b59db075c420b8281497e491b03621cca
pache/harmony/security/asn1/ASN1GeneralizedTime.java
pache/harmony/security/asn1/ASN1UTCTime.java
c2f3e11588854db37f609f60cea8ef946211a02f 03-Oct-2012 Kenny Root <kroot@google.com> am f8dac9e9: am d85dfd8d: Merge changes I81f1bec8,I4aa6e3a2

* commit 'f8dac9e9410705895e64187fd8ad75431e147957':
OpenSSLCipher: Add DESede support
Add Cipher support for AES through OpenSSL
9961a1e1fc3cf3fa8ceab5917eb49cedc996a2f6 01-Oct-2012 Kenny Root <kroot@google.com> OpenSSLCipher: Add DESede support

Change-Id: I81f1bec8e3562c3ed90b35a60829ca0dfc4d8341
pache/harmony/xnet/provider/jsse/OpenSSLCipher.java
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
13cf08b2f06e1f5f0278c449072898f5e147db49 24-Sep-2012 Kenny Root <kroot@google.com> Add Cipher support for AES through OpenSSL

Timings using encrypt with 256-bit key in CTR mode and PKCS5Padding:

implementation inputSize us linear runtime
OpenSSL 16 11.4 =
OpenSSL 32 12.1 =
OpenSSL 64 13.2 =
OpenSSL 128 15.1 =
OpenSSL 1024 44.0 =
OpenSSL 8192 275.0 ===
BouncyCastle 16 11.5 =
BouncyCastle 32 15.9 =
BouncyCastle 64 24.6 =
BouncyCastle 128 41.5 =
BouncyCastle 1024 277.2 ===
BouncyCastle 8192 2196.9 ==============================

Change-Id: I4aa6e3a2ca2b368fab2c602733b4f97e740d04fd
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLCipher.java
pache/harmony/xnet/provider/jsse/OpenSSLCipherContext.java
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
0df5a7ea6de1b66a1a27678e66909b85c1e464fe 27-Sep-2012 Kenny Root <kroot@google.com> am 96612f9c: am a233144d: Merge "Add serialization to OpenSSL-based keys"

* commit '96612f9cbfe5666958ec3608a669e6c585432049':
Add serialization to OpenSSL-based keys
d3df366d3fd59237f1fbf099e979e6843047032c 27-Sep-2012 Kenny Root <kroot@google.com> Add serialization to OpenSSL-based keys

Any OpenSSL keys that aren't ENGINE-based are serializable, so add the
code to be able to keep the Serializable contract.

Bug: http://code.google.com/p/android/issues/detail?id=37880
Change-Id: I6d5fd9a1c6817d97d7890e4cccd8c95253e95279
pache/harmony/xnet/provider/jsse/OpenSSLDSAPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAPublicKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateCrtKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPublicKey.java
b2fc6057db8c0c833db90f7ebe01d945213613fc 25-Sep-2012 Brian Carlstrom <bdc@google.com> am f80f3547: am 5e05b783: Merge "Fix Generic[Stream|Generic]Cipher to Generic[Stream|Block]Cipher in comments"

* commit 'f80f354718d9790ec98db3fd9377a7c40a99710f':
Fix Generic[Stream|Generic]Cipher to Generic[Stream|Block]Cipher in comments
ca3fd60b58369806a7d02f2204e4140ab70b353e 25-Sep-2012 Brian Carlstrom <bdc@google.com> Fix Generic[Stream|Generic]Cipher to Generic[Stream|Block]Cipher in comments

Change-Id: Iee2a86c764e5bd19135b371b100865fab2690965
pache/harmony/xnet/provider/jsse/ConnectionState.java
615225a35dbd838210270b282d1196deff643b51 22-Sep-2012 Brian Carlstrom <bdc@google.com> Add OpenSSLSocketImpl.setSoWriteTimeout to allow SO_SNDTIMEO to be specified

Bug: 6693087
Change-Id: Ie6903168ca0ada4516c55dfab5f7194baf965b4c
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
50c00238d15d5e42386c0a9e4315b4a0a8299eae 20-Sep-2012 Elliott Hughes <enh@google.com> am 7252fd9a: am 630a4982: Merge "Remove obsolete ThirdPartyProject.prop files."

* commit '7252fd9a6da4c733ccc5003e3575145d69e99c68':
Remove obsolete ThirdPartyProject.prop files.
e6281f0d5775a3d61d9ec27d29f32c170f05027b 20-Sep-2012 Elliott Hughes <enh@google.com> Remove obsolete ThirdPartyProject.prop files.

Change-Id: I5288c5c1f6ce094bcac2792f6fa7fc6a455f756a
ml/ThirdPartyProject.prop
9473606aca0af1a6410b2ea396c8a6609cf16940 20-Sep-2012 Geremy Condra <gcondra@google.com> Add cached trust anchors to the chain prior to checking pinning.

This avoids an issue where intermediate certs are assumed cached
rather than provided by the server.

Bug: 7195828
Change-Id: I44e033ddc40a7a259bac888bf2b873d9bb81becc
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
7b5bf805d03c2b71266886fa75513400817de9f1 19-Sep-2012 Geremy Condra <gcondra@google.com> Move null check for cert store to the consumer code.

This allows the check to operate if TrustManagerImpl gets a non-
AndroidCAStore cert store.

Bug:7190096
Change-Id: I7c55e48afdbee293e08a0594ad3957b4695a6415
pache/harmony/xnet/provider/jsse/PinListEntry.java
5ab2ad7ebf828d06710868f33458fb1fbe1aa50b 19-Sep-2012 Geremy Condra <gcondra@google.com> Migrate PinFailureLogger to use the DropBox.

Also change the DropBox add* methods to be static, since they can be.

Change-Id: Iedab6948754dfc0db5d432a918bdc6297e3b8f02
pache/harmony/xnet/provider/jsse/PinFailureLogger.java
924af71bb26b7c35f702de9a3425109c73184a53 19-Sep-2012 Geremy Condra <gcondra@google.com> Restructure logging to ease the transition to dropbox.

Bug: 7190096
Change-Id: Ib16bcd47712890fd627027ebacacc511870b31b0
pache/harmony/xnet/provider/jsse/CertPinManager.java
pache/harmony/xnet/provider/jsse/PinFailureLogger.java
pache/harmony/xnet/provider/jsse/PinListEntry.java
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
5c9add3e84fd426fafbec289738f1f09c49aaf90 18-Sep-2012 Geremy Condra <gcondra@google.com> Add logging to detect cert pin failures caused by MITM proxies.

Change-Id: Ie9554aaa824506a75534d888432ed8a91e14e386
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
pache/harmony/xnet/provider/jsse/TrustedCertificateStore.java
5a97188382a40d3345300b92147f80b230b620bc 17-Sep-2012 Brian Carlstrom <bdc@google.com> Make PinListEntry and PinEntryException public for CertPinManagerTest

Change-Id: If61f800e20613e37a076bf049c259abca1072e4b
pache/harmony/xnet/provider/jsse/PinEntryException.java
pache/harmony/xnet/provider/jsse/PinListEntry.java
719abfb38ff2db32b373d7dec6e254d2026dfd6d 15-Sep-2012 Elliott Hughes <enh@google.com> am d23dd0d4: am 90450038: Merge "Consistently use "charsetName" for charset names."

* commit 'd23dd0d42acab1c9b5b2cd4421b196120369d72e':
Consistently use "charsetName" for charset names.
9b9e9145bc55a47be42a9d3f7ecc9f6b533739b2 14-Sep-2012 Elliott Hughes <enh@google.com> Consistently use "charsetName" for charset names.

Change-Id: I147217077790c1ddfb815e870409abade31839c6
pache/harmony/security/x509/AuthorityKeyIdentifier.java
d43b9ef11a1095967a3396b246639b563e1a4128 12-Sep-2012 Kenny Root <kroot@google.com> Add consistent reasons for NullPointerException

Semi-automated replacement of empty and non-conforming
NullPointerException reason messages.

(cherry-pick of 86acc043d3334651ee26c65467d78d6cefedd397.)

Change-Id: I6d893979f5c20a50e841e32af9fd7b2d8bc9d54d
pache/harmony/crypto/internal/NullCipherSpi.java
pache/harmony/security/SystemScope.java
pache/harmony/security/provider/cert/X509CRLImpl.java
pache/harmony/security/provider/crypto/SHA1withDSA_SignatureImpl.java
pache/harmony/xml/ExpatAttributes.java
pache/harmony/xml/dom/NodeImpl.java
pache/harmony/xml/parsers/DocumentBuilderFactoryImpl.java
pache/harmony/xml/parsers/SAXParserFactoryImpl.java
pache/harmony/xnet/provider/jsse/FileClientSessionCache.java
86acc043d3334651ee26c65467d78d6cefedd397 12-Sep-2012 Kenny Root <kroot@google.com> Add consistent reasons for NullPointerException

Semi-automated replacement of empty and non-conforming
NullPointerException reason messages.

Change-Id: Iedeb4b21949e973c4042ce5982dda315f2e785e1
pache/harmony/crypto/internal/NullCipherSpi.java
pache/harmony/security/SystemScope.java
pache/harmony/security/provider/cert/X509CRLImpl.java
pache/harmony/security/provider/crypto/SHA1withDSA_SignatureImpl.java
pache/harmony/xml/ExpatAttributes.java
pache/harmony/xml/dom/NodeImpl.java
pache/harmony/xml/parsers/DocumentBuilderFactoryImpl.java
pache/harmony/xml/parsers/SAXParserFactoryImpl.java
pache/harmony/xnet/provider/jsse/FileClientSessionCache.java
e88bbba97a2a68287b93fecba822d11f272325b7 12-Sep-2012 Geremy Condra <gcondra@google.com> Added event logging to PinListEntry.

This is done by adding a stub EventLogger that writes to the
usual logs if not overriden by the framework. If it has been
then we will wind up writing the code + Objects to the event
log.

cherry-picked from 52dc295e93679baa72f95b5b873dd21d5a2ccb32

Change-Id: I2c887c233d019910c9b018c4639a36c0808efc02
pache/harmony/xnet/provider/jsse/PinListEntry.java
6d2a17ab04ab0967e3bff7fe6280066ef66d1d76 11-Jun-2012 Geremy Condra <gcondra@google.com> Added basic cert pinning support.

This has four main changes:

First, it adds a CertPinManager to TrustManagerImpl that checks to
ensure that the chain is properly pinned.

Second, it adds the CertPinManager and associated classes to
implement cert pinning at this level.

Third, it changes the callers of checkServerTrusted to pass in a
hostname where possible, allowing them to make use of the pinning
transparently.

Finally, it changes checkServerTrusted to return the ultimate
chain that was verified, which is useful for implementing pinning
at a higher level.

cherry-picked from 5315f29b2de4aace0077b78f0b99634fda440b85

Change-Id: I150e010da3e2aeed57bd5330ff113d3a7fbbee2a
pache/harmony/xnet/provider/jsse/CertPinManager.java
pache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
pache/harmony/xnet/provider/jsse/PinEntryException.java
pache/harmony/xnet/provider/jsse/PinListEntry.java
pache/harmony/xnet/provider/jsse/PinManagerException.java
pache/harmony/xnet/provider/jsse/SSLSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketWrapper.java
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
fe8b870db2b374e21c69c2ff0050e6a34e0d8d94 05-Sep-2012 Brian Carlstrom <bdc@google.com> Tracking upgrade to bouncycastle 1.47

Change-Id: Ie1f2ae92638e81ccd7e4ec2459199e6eecdac75f
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
f0993272562ebc6e8d77024b985c45fae9f92ed4 12-Sep-2012 Brian Carlstrom <bdc@google.com> am a1359997: am 9f519e17: Merge "Add OpenSSLProvider support for Cipher.RSA/None/PKCS1Padding"

* commit 'a1359997a83e4d1aefdb7ae23f73b61420d37964':
Add OpenSSLProvider support for Cipher.RSA/None/PKCS1Padding
0a156e0126e8015f2791e9a7dd48bbdaeae0c335 12-Sep-2012 Brian Carlstrom <bdc@google.com> Add OpenSSLProvider support for Cipher.RSA/None/PKCS1Padding

Summary:
- Add OpenSSLProvider support for Cipher.RSA/None/PKCS1Padding
Added NativeCrypto.RSA_private_decrypt and NativeCrypto.RSA_public_encrypt
- Changed OpenSSLSignatureRawRSA to use new Cipher.RSA/None/PKCS1Padding
Removed now obsoleted NativeCrypto APIs for
RSA_padding_add_PKCS1_type_1 and RSA_padding_check_PKCS1_type_1
- added wrap/unwrap support OpenSSLCipherRSA
Needed for SSLEngine (and fallback SSLSocket implementation)
which are now picking up the new Cipher.RSA/None/PKCS1Padding
- expanded CipherTest to sanity test all algorithms and PKCS1 padding

Change-Id: I03566cc86ffce07d44d5e0094fa82c9c24587c26
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLCipherRSA.java
pache/harmony/xnet/provider/jsse/OpenSSLCipherRawRSA.java
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
pache/harmony/xnet/provider/jsse/OpenSSLSignatureRawRSA.java
c44b3f5d857d0d3f4d3668de905cdac5080ede3b 01-Sep-2012 Kenny Root <kroot@google.com> Better OpenSSL key comparison

Use native code to compare OpenSSL keys instead of converting them to
Java BigIntegers first.

Change-Id: If795c9c26e41174755cdab34ff70e01c7487c9bd
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateCrtKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateKey.java
7695a9b3261bfee3a810e0829bd8082fe1fcb6a4 30-Aug-2012 Brian Carlstrom <bdc@google.com> Disable SSL compression

Bug: 7079965

Change-Id: I8e060a827613e212bbcced66507fbf124bb04543
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
796b0d2f4508e3933e53df2d372090c8634164ee 21-Aug-2012 Kenny Root <kroot@google.com> Remember key aliases for OpenSSLKeys from ENGINEs

Since it's not easy (or sometimes impossible) to retrieve key IDs for
keys loaded from an ENGINE, remember them when we create them.

(cherry-picked from 86bdaf9b40263efae243d685d449e1ae30b0b161)

Change-Id: I3920f56214d9eade87d51d30b024f5aeda9e8344
pache/harmony/xnet/provider/jsse/OpenSSLDSAPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLEngine.java
pache/harmony/xnet/provider/jsse/OpenSSLKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateKey.java
783004cceef470884b3ee6946cbbfc4af0f28ae7 20-Aug-2012 Brian Carlstrom <bdc@google.com> Restore ability for SSLSocket.close() to interrupt reads and writes

SSLSocketTest.test_SSLSocket_interrupt didn't catch this regression so
added new test_SSLSocket_interrupt_read to cover this case
specifically. Also cleanup SSLSocketTest to use Executors like
NativeCryptoTest instead of Threads for better error checking.

Bug: 7014266
Change-Id: I1160cd283310a0c6197cd3271a25830e0e2b1524
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
62fc526d80608925cad24c3d6d91657f63a56fcf 16-Aug-2012 Kenny Root <kroot@google.com> Add new Android-only algos to StandardNames

The ProviderTest fails if we don't add these to StandardNames.

Change the name of Signature.RAWRSA to "NONEwithRSA" so it matches the
convention in existing algorithms.

Change-Id: Id126eca46ee3b9f9d19aee596c1babd489693c7a
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
cdad5434dff71f87b4e85c6faf6e0c30a80672d7 16-Aug-2012 Kenny Root <kroot@google.com> Merge "Call ENGINE_add to prevent ENGINEs from unloading"
106a8928fb4249f2f3d4dba1dddbe73ca5cb3d61 16-Aug-2012 Kenny Root <kroot@google.com> Call ENGINE_add to prevent ENGINEs from unloading

The only user of the OpenSSLEngine interface is a dynamic engine (loaded
from eng_dyn.c), so it will unload the .so when references to it
decrease to zero.

Calling ENGINE_add will add the loaded engine to the list of loaded
engines. The next time ENGINE_by_id is called, it will just use the one
from the list instead of loading the .so again.

You can still control whether the engine is ref-counted or copied with
ENGINE_set_flags(ret, ENGINE_FLAGS_BY_ID_COPY) in the engine
initialization method.

Change-Id: Ic005e9ea22a3c6027e3a5aab2adf41fb7995c1f0
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLEngine.java
84818197ed60f59a86ba8d9274e1639d222f4040 15-Aug-2012 Kenny Root <kroot@google.com> Do better comparisons for ENGINE-based keys

ENGINE-based keys need only be compared by their modulus in actuality,
because given a good random number generator each modulus should be
unique.

Change-Id: Iea1f19126c5ce306d63b3a1bcb05a43139a86846
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateCrtKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateKey.java
d762af619aa85042c08553425a4ca4ef7900d45a 10-Aug-2012 Kenny Root <kroot@google.com> Fix OpenSSLCipherRawRSA doFinal array copy

System.arraycopy was pointing the wrong way making calls to doFinal()
with offset markers get zeroed output instead of the actual output.

Also fix tests that checked RSA cipher behavior to match RI.

Bug: 6951038
Change-Id: Ife84c177a2c06a2c27b98df9960cbd3c4b62d984
pache/harmony/xnet/provider/jsse/OpenSSLCipherRawRSA.java
83a7cea6ad5c5f066e55aeddd6da27d3ef5e62c1 07-Aug-2012 Kenny Root <kroot@google.com> Add chain building to TrustedCertificateStore

Since TrustedCertificateStore has information needed, use it to build
certificate chains.

OpenSSL uses Authority Key Identifier in extensions to determine if the
certificate is the same as itself. There are problems with key rotation
when a different certificate serial signs a key with the same subject
identifier. It appears to be the same with the old code, but it may
generate an invalid chain.

(cherry-picked from 3fb088d79e446063ef743362a030e1cfb80b2178)

Change-Id: I8149bed1a0ae537f75da5dc3f3d7e3ccab353f91
pache/harmony/security/x509/AuthorityKeyIdentifier.java
pache/harmony/security/x509/SubjectKeyIdentifier.java
pache/harmony/xnet/provider/jsse/TrustedCertificateStore.java
c5ddc93173f32383ab456c0a24739e7cb2d19c42 02-Aug-2012 Kenny Root <kroot@google.com> Add raw RSA Cipher to OpenSSLProvider

Recent changes in the way that Android Keystore (accessed via KeyChain)
necessitate all key operations be done with a provider that understands
the new OpenSSLKey object.

This adds Cipher support for the RSA algorithm in "RSA/ECB/NoPadding"
and "RSA/None/NoPadding" modes.

Change-Id: I98a8eaf3514763a863b2751bba999fbd48609c96
pache/harmony/xnet/provider/jsse/OpenSSLCipherRawRSA.java
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
bc5d94b62ec601430c68c7c48add44f6d3c5724a 03-Aug-2012 Brian Carlstrom <bdc@google.com> Merge "Simplify locking and close race in getSecureRandomService()"
b9d36450c63be9096984ea167aace421af2ef05b 03-Aug-2012 Brian Carlstrom <bdc@google.com> Simplify locking and close race in getSecureRandomService()

Change-Id: I5c482d9a2d2a9282d7a5e5d4c4de52be05c60b93
pache/harmony/security/fortress/Services.java
7c10bc697cfee271a4cc9561c86be388a85edcd5 03-Aug-2012 Brian Carlstrom <bdc@google.com> Merge "Add raw RSA signature support"
7501e29e0182accf28cc317870a3bbe1e25f4bfa 31-Jul-2012 Kenny Root <kroot@google.com> Add raw RSA signature support

With the new Keystore changes, this is the only way you can get raw RSA
signatures which a lot of native code expects to be able to do.

(cherry-picked from c531f5f402b4cedcc35a0b7f0b540dc84c545106)

Bug: 6787078
Change-Id: I1c5ddd5287be1ab71347eedc864a41c24e156cb4
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
pache/harmony/xnet/provider/jsse/OpenSSLSignatureRawRSA.java
c7a56c94bdea0e20123ae6fba5eca5b8d984c670 01-Aug-2012 Brian Carlstrom <bdc@google.com> Avoid ConcurrentModificationException on providers

Previously concurrently adding/removing providers in one thread and
doing algorithm lookups on another thread would cause
ConcurrentModificationExceptions such as:

java.util.ConcurrentModificationException
at java.util.ArrayList$ArrayListIterator.next(ArrayList.java:569)
at org.apache.harmony.security.fortress.Services.updateServiceInfo(Services.java:186)
at org.apache.harmony.security.fortress.Services.refresh(Services.java:234)
at org.apache.harmony.security.fortress.Engine.getInstance(Engine.java:137)
at java.security.KeyFactory.getInstance(KeyFactory.java:81)

Also do some general cleanup and add similar protection on services.

Change-Id: I706c45655924dfccc3383fca57653d0c5b461721
pache/harmony/security/fortress/Engine.java
pache/harmony/security/fortress/Services.java
10be789f42863b6d3cb2991d0439dd6528288bac 09-Dec-2011 Jesse Wilson <jessewilson@google.com> Add a test for KxmlSerializer attributes with whitespace chars.

Delete some unused Kxml classes while I'm in the area, and
combine our two classes named KXmlSerializerTest.

(cherry-pick of 22a12704190060f74e308a5b5aa32d0b7f715183.)

Change-Id: Id8b3f72edc58547e49ad86c51a171dce3669be3f
ml/ThirdPartyProject.prop
46aabcb28b0e3b807f6db8c33173962d6f2cb71f 12-Jun-2012 Kenny Root <kroot@google.com> Add OpenSSL provider for SHA1PRNG

(cherry-pick of 4718b07e482ccb083ce3dfff228d0615b96a8dd2 and 84fb77d814b0ad04d70addb04847797925acf805.)

Change-Id: Ib45c646a8596bf5ea0629408d6057d3828a1ac94
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
pache/harmony/xnet/provider/jsse/OpenSSLRandom.java
20484654bc7c2407da40226d5188acfc37ee1c2b 09-Aug-2011 Elliott Hughes <enh@google.com> Remove more cruft.

Unused imports and bogus comments.

(cherry-pick of 9af8c0318fac8bf03ee145da01b0c38a503791fc.)

Change-Id: I2bddb32028b71964407e86c4dbef5516673c27eb
pache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
pache/harmony/xnet/provider/jsse/Logger.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
3ff7a80532c9edbcca3331de2b9e87bbf16a0c96 24-Jul-2012 Brian Carlstrom <bdc@google.com> 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
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
52ec5bcc7d5d042d7ba6d0244d98ee72007a95e4 24-Jul-2012 Brian Carlstrom <bdc@google.com> Signature.verify should not throw if called twice

Bug: http://code.google.com/p/android/issues/detail?id=34933
Change-Id: Iad18e46729dcd283f4cecd65994ac7b741bd3036
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
fe1daea160b11cbb422e64ad7fc34a7caea32ab5 24-Jul-2012 Brian Carlstrom <bdc@google.com> Merge "Fix OpenSSLSocketImpl.close race"
df9f5967a3b8dc2f61183d155791393b67980511 24-Jul-2012 Brian Carlstrom <bdc@google.com> Fix OpenSSLSocketImpl.close race

Move the NativeCrypto.SSL_interrupt call within the close
synchronization. Otherwise there can be problems if
NativeCrypto_SSL_interrupt tries to use the SSL* and another thread
has called NativeCrypto_SSL_free.

Bug: 6707288
Change-Id: Id8b0311b10124f2a08f8e0f24595a6ee46805c33
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
fc7d051b4a8a79687a13228184f03a82270b262b 24-Jul-2012 Brian Carlstrom <bdc@google.com> Provider should enumerate services in the order they are added

Bug: http://code.google.com/p/android/issues/detail?id=21449
Change-Id: Ie520a8b47adab0583ed1c5cb0da7f43c2eb452ee
pache/harmony/luni/util/TwoKeyHashMap.java
f0c85fa16995e1c715c679aea704392a162f493a 13-Jul-2012 Brian Carlstrom <bdc@google.com> Merge "CertificateRequest should handle case where certificate is requested but none is available."
7c935d4e4ca990334200cf5eb4fbcfac718c6b45 04-Jun-2012 gcollins <gcollins@antennasoftware.com> CertificateRequest should handle case where certificate is requested but none is available.

Android SSL client was not handling a CertificateRequest where there was no cert to send.
It had a problem because it was assuming that if the CertificateMessage response is not null,
it means there is a cert included, which is not true (if it has no cert to send an empty CertificateMessage
is sent to the server). So I updated the CertificateVerify creation check to also check whether the CertificateMessage
contained any certs (ClientHandshakeImpl.java).
In testing I found that the same error was in the server code so I made the same change there
(ServerHandshakeImpl.java).
I added two test cases to SSLEngineTest - one to directly test the scenario (test_SSLEngine_clientAuthWantedNoClientCert)
and one to just double-check that the server would not allow the connection if setNeedClientAuth (test_SSLEngine_clientAuthNeededNoClientCert).

Bug: http://code.google.com/p/android/issues/detail?id=31903
Change-Id: Ideb57d6ccbcdd54ca24dc3063e60aba2653c8414
pache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
pache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
1982194cb9067e3311ac491b4d02a6ead611fd59 17-May-2012 Jesse Wilson <jessewilson@google.com> Change OpenSSLSocketImpl to forbid empty lists of NPN protocols.

Change-Id: I65d5d7b8d69ddfd551cbbe6da063f5ac277c5f45
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
679ac55c3c037887edfc6ce6f42a23cd7c11cd12 12-May-2012 Jesse Wilson <jessewilson@google.com> Only use SSL CUTTHROUGH (False Start) if the server supports NPN.

We enable cutthrough on the client if the server supports NPN.
We never enable cutthrough on the server because most relevant
protocols (ie. HTTP) are client-speaks-first and those don't
benefit from cutthrough on the server.

I verified this by enabling NPN on both client and server and
checking that the client's Application Data was sent before the
server's Change Cipher Spec. To increase the likelihood of this
otherwise racy situation I put the server in SSL debug mode
after it receiving next_protos_advertised_callback. OpenSSL's
debug mode adds a 1-second sleep before each read and write.

Bug: http://b/6331035

Change-Id: I879b5fb26dc237392a36fe0585c8a6519c0e5220
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
908975092f7ac7b7562f242c5fd99fbf228acf0f 02-May-2012 Selim Gurun <sgurun@google.com> Provide key context

Bug: 6249185

Make the key context available.

Change-Id: I51967e2a164b3f83d5d5096add7199c3a121da06
pache/harmony/xnet/provider/jsse/OpenSSLDSAPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateKey.java
88f3ec9ebfd60998eb321f8c182009dace9bf983 01-May-2012 Brian Carlstrom <bdc@google.com> NativeCrypto should honor timeout less than one second

Bug: http://code.google.com/p/android/issues/detail?id=29680
Change-Id: I4507a1e9fe37b1c095f7bb4d3e3a55d6d738f7ad
pache/harmony/xnet/provider/jsse/NativeCrypto.java
0afb10f667ef9c19aa2ea4797af6ba0bc328f148 01-May-2012 Brian Carlstrom <bdc@google.com> Avoid session reuse to fix test_SSL_do_handshake_clientCertificateRequested_throws_after_renegotiate for OpenSSL 1.0.1

Bug: 6229570
Change-Id: I891d10db104fda9978310b8be3420e1729971b27
pache/harmony/xnet/provider/jsse/NativeCrypto.java
4b2058331094aa5a3b26e65026748ba406594816 30-Apr-2012 Brian Carlstrom <bdc@google.com> Tracking openssl-1.0.1b

Change-Id: I418a5b36670c6cc72e1e6cc29add950409f97f9f
pache/harmony/xnet/provider/jsse/NativeCrypto.java
ebe87d125b8cc83238914f84f5f7aa799c0d83bd 15-Apr-2012 Brian Carlstrom <bdc@google.com> Use SSL_CTX_set_session_id_context in ServerSessionContext

Without this, OpenSSL with fail when SSLSessions are reused on an
SSLServerSocket when client certificates are requested.

Bug: 6329719
Change-Id: I9b14b32cccee1e5aba1215cebf81eb05a788d63b
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/ServerSessionContext.java
3d74b4bec8543e6e3f89eafe3afe0925f3a69f01 28-Mar-2012 Brian Carlstrom <bdc@google.com> Disable TLSv1.1 and TLSv1.2 by default

Bug: 6234791

Change-Id: I5d829211c9e1d5672fc96e42ef603c53d789e695
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
12b42fd0252d5423e167dbccd2e09b82018b7a5b 28-Mar-2012 Brian Carlstrom <bdc@google.com> Merge "Use WRAP/UNWRAP for key exchange"
b9f9831a0800adbb6b67ab5bdc62292aa034992b 28-Mar-2012 Brian Carlstrom <bdc@google.com> Use WRAP/UNWRAP for key exchange

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

Change-Id: I1a2be021e0a22ec6a00ba354fb3f19a78c601be9
pache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
pache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
087043baca7e2de81bd10c7955f73f8597d7bb83 26-Mar-2012 Kenny Root <kroot@google.com> Merge "More support for ENGINE-based keys"
beac31ef5949d994a7096f20f12fcf929b06884d 26-Mar-2012 Kenny Root <kroot@google.com> More support for ENGINE-based keys

Tweak some of the parameters for RSA and DSA keys to allow ENGINE-based
keys to exist without needing to define private key material.

Change-Id: Ide2884d6d97636ae2178f8e789eaeec1babd9650
pache/harmony/xnet/provider/jsse/OpenSSLDSAParams.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateCrtKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateKey.java
600dc4949de6bf5608e5f5a5214cde59299b683a 26-Mar-2012 Jesse Wilson <jessewilson@google.com> Don't use the SSL_CTX prefix for a method that takes an SSL.

The implementation is asymmetric: enabling NPN is per-context, but
actually looking up the negotiated protocol is per-SSL. This caused
me to screw up in following the SSL_CTX naming scheme; I applied it
in too many places.

Change-Id: I5bd1be334d513f220086c901527d0b8416f2ba3f
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
3a906b6e3555a999b929a129bc896f3e64afc659 26-Mar-2012 Jesse Wilson <jessewilson@google.com> Merge "Expose NPN in OpenSSL."
25977e422febea04dac9fb9c35d7271d55d3b6b8 23-Mar-2012 Jesse Wilson <jessewilson@google.com> Expose NPN in OpenSSL.

This is derived from costin's change Ib18da136cb628515d6909c438cd0809452d7058a.
It moves the protocols data to the AppData's callbacks so the memory can be
released when the handshake completes.

Change-Id: Id61feaa6f28250e393f5c8093688b099e92dce9c
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
5b7f91c1e6e208187cef57ab8a5de0a7f35e817f 22-Mar-2012 Brian Carlstrom <bdc@google.com> Split OpenSSLRSAPrivateCrtKey from OpenSSLRSAPrivateKey

Change-Id: I6a58044162758b3b74db5d17e9044f97dbe53bae
pache/harmony/xnet/provider/jsse/OpenSSLEngine.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAKeyPairGenerator.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateCrtKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
3e6dd45baa0d7f9b4fa06f4ade76e088b59cc7bf 16-Mar-2012 Brian Carlstrom <bdc@google.com> Tracking openssl-1.0.1

Bug: 6168278

Change-Id: I240d2cbc91f616fd486efc5203e2221c9896d90f
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
pache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLRecordProtocol.java
pache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
95ae73a81948944b24aa4962e9e0ec375fae8467 13-Mar-2012 Kenny Root <kroot@google.com> Merge "Add support for OpenSSL engines"
41e34229c07e8d05090560ff80558fa222623769 09-Mar-2012 Kenny Root <kroot@google.com> Add support for OpenSSL engines

This allows OpenSSL ENGINE to be used for RSA and DSA private key
operations.

Also add in support for directly passing an OpenSSLKey to the
OpenSSLSocketImpl in case we are using ENGINEs.

Change-Id: Ia31735109052a13e421900b69ba5de13bbce0f6f
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLEngine.java
pache/harmony/xnet/provider/jsse/OpenSSLKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
f52b35a5bc22f53b663ea22954135b69f8636bf4 08-Mar-2012 Brian Carlstrom <bdc@google.com> getPeerHostName should check for null InetAddress

The address can be null for SSLSockets that have not been connected.

Bug: 5835165

(cherry picked from commit cb047c49abcf3b7b5c231b68431c291fe2d81b52)

Change-Id: I12eb92ab0cdb42b89333361a485979c48365d5da
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
ffec9b8990adcdaab295e112ca3c3ebf83488199 08-Mar-2012 Brian Carlstrom <bdc@google.com> Use KeyManagementException with causes to report errors

Before the code would squash excecptions into null values, then turn
the values back into KeyManagementException. Now the code preservers
the underlying exception as the cause of the KeyManagementException.

(cherry picked from commit b6d100ca03dd4c576c6735ce510cecc70d2e6617)

Change-Id: Ia833145839578760ed9b49c626e8d4ab86ceacbe
pache/harmony/xnet/provider/jsse/SSLParametersImpl.java
60003bff55e4d9fa936078063bf007ffccc79553 16-Feb-2012 Selim Gurun <sgurun@google.com> Merge "Add a way to clear stored trusted certificates."
7a61ad51ba5f5a0b439b2f3eacb1e0f99f909606 16-Feb-2012 Selim Gurun <sgurun@google.com> Add a way to clear stored trusted certificates.

Bug: 6009802

Update the TrustManagerImpl Api to allow clearing stored certificates.
This is needed so we can remove CAs when credential storage is updated.

Change-Id: I024f7e8b12b60ea0ee35d7f94280e0e3d6db039f
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
pache/harmony/xnet/provider/jsse/TrustedCertificateIndex.java
68dc9c0f9ea2913a627aa3df81f4956efa48a980 06-Feb-2012 Kenny Root <kroot@google.com> OpenSSL block ciphers, part 1

This implements the NativeCrypto piece necessary to do basic block
cipher operations. More work will need to be done to enable useful
modes.

This gives us the ability to replace BouncyCastle's ECB mode that it
bases the higher level CBC, CTR, etc modes on. However, calling through
JNI to OpenSSL for 16-byte blocks for AES ends up being the same speed
as the Java implementation.

Further enhancements to use large blocks during the JNI call should show
marked improvements in speed.

Change-Id: I594a6d13ce5101a1ef2877b84edaa5e5b65e1e71
pache/harmony/xnet/provider/jsse/NativeCrypto.java
d036721c2ecd146acef9f36408c7a397dd0a0785 03-Feb-2012 Kenny Root <kroot@google.com> OpenSSL keys add hashCode, equals, and toString

Change-Id: I8d0d8eac1e5a4ee455de1ed51bc8b610df1f45d7
pache/harmony/xnet/provider/jsse/OpenSSLDSAParams.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAPublicKey.java
pache/harmony/xnet/provider/jsse/OpenSSLKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPublicKey.java
91bb5fbe55b854df891ff7720e30d42081dbcd58 03-Feb-2012 Kenny Root <kroot@google.com> Throw exceptions on wrong key type in Signature

Our engine can handle both RSA and DSA, but we need to throw an error if
the wrong key type is supplied after we've initialized to emulate other
providers.

Also, apparently OpenSSL is really flexible, because calling
EVP_SignInit had the same effect as EVP_VerifyInit. Change this to be
correct even though the underlying implementation in OpenSSL doesn't
care.

Change-Id: If9223d17909fcf86437b9669c204fc544e6d12ff
pache/harmony/xnet/provider/jsse/OpenSSLDSAPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAPublicKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPublicKey.java
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
746a236e2be5dee62c482e27f4c682496d071d8b 01-Feb-2012 Kenny Root <kroot@google.com> Add OpenSSL KeyPairGenerator and KeyFactory

Refactor the way OpenSSL keys are handled so we can generate OpenSSL
keys with the KeyPairGenerator and KeyFactory and pass them around
without keeping the context in the OpenSSLSignature where it originated.

Change-Id: Ib66bd1914e241a240cd97b1ea37e8526998107d9
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAKeyPairGenerator.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAParams.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLDSAPublicKey.java
pache/harmony/xnet/provider/jsse/OpenSSLKey.java
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAKeyFactory.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAKeyPairGenerator.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPrivateKey.java
pache/harmony/xnet/provider/jsse/OpenSSLRSAPublicKey.java
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
5b57eb538f8da8e97cf88a310d75d14dfc91624c 31-Jan-2012 Kenny Root <kroot@google.com> Add signatures to the OpenSSLProvider

Now that OpenSSLSignature is a full-fledged Signature provider, we can
add it to our OpenSSLProvider.

Change-Id: If8539acdf895082cef38eed97a706dbbcdff6853
pache/harmony/security/provider/cert/X509CertImpl.java
pache/harmony/security/utils/JarUtils.java
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
1dfb8aa653d52268087f450e9b5a865e08b56d98 31-Jan-2012 Kenny Root <kroot@google.com> Add signature generation to OpenSSLSignature

Change-Id: I1203516d95a937edb48959146bbec64b338e4f1e
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
7eeb1d7024f830b89f17489befeb5688624ae6dd 30-Jan-2012 Brian Carlstrom <bdc@google.com> am a5aec70a: am 806d834d: Ensure faster OpenSSLSignature is used when possible by doing proper case insensitive comparison

* commit 'a5aec70ab8db56172804108077d5c9d7d8ced789':
Ensure faster OpenSSLSignature is used when possible by doing proper case insensitive comparison
806d834df24db86be0540ce0846e03fc4d43cb0b 28-Jan-2012 Brian Carlstrom <bdc@google.com> Ensure faster OpenSSLSignature is used when possible by doing proper case insensitive comparison

Bug: 5934554
Change-Id: I640cd54c227df2bf662d484cb2af95ece4d13421
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
27c744cc67c7b155bd2d47551205fb1720e7e196 20-Dec-2011 Jesse Wilson <jessewilson@google.com> Support in-memory HTTPS session caching for wrapped sockets.

Previously we couldn't reuse sessions with HttpsURLConnection
because the host was incorrect (getInetAddress returns null
for wrapped sockets) and because the compression method was
different (NULL vs. ZLIB).

This improves HttpsURLConnection request/response time on
localhost from ~275ms to ~145ms (without connection pooling).

Change-Id: I97bc343326658690b00589c0c804c2378b91ae61
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
8626012f833cada8b06c3d82860d2dbe4107ce7a 15-Nov-2011 Jesse Wilson <jessewilson@google.com> Don't fail GeneralName parsing if the DNS name contains a wildcard.

This doesn't impact host name validation, which reparses the DNS name
into component parts and uses strict wildcard matching rules against
a particular host name.

Bug: http://b/issue?id=5534658
Bug: http://code.google.com/p/android/issues/detail?id=21311
Change-Id: Iaeaf72a6f8b9ebd9ee2fe68f1bc7830f174f2310
pache/harmony/security/x509/GeneralName.java
e3df4987da1cc4af786b54e6a446687ec148d5a9 24-Oct-2011 Brian Carlstrom <bdc@google.com> Move OpenSSLSocketImpl.close resource cleanup into a finally clause

Bug: 5466273

(cherry picked from commit d3433cea484f380ab2c889c10e9d9d3268046a6c)

Change-Id: I8618be21a2227d66ea66352342b530906605160f
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
d3433cea484f380ab2c889c10e9d9d3268046a6c 24-Oct-2011 Brian Carlstrom <bdc@google.com> Move OpenSSLSocketImpl.close resource cleanup into a finally clause

Bug: 5466273

Change-Id: I64758dfd3ca1c35d08616c63982223d84fdc2759
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
17b6b6b0535f9ef8cec04e21b818fedd3bf9ff33 19-Oct-2011 Brian Carlstrom <bdc@google.com> Fix backwards Engine cache test

Also fix SignatureTestMD2withRSA to clean up its test provider.
Add context information on failures to CertificateTest.

Bug: 5479141
Change-Id: I9a5ce60cfda63cfc418e72464eb1d3ef81dab0c0
pache/harmony/security/fortress/Engine.java
3267a46b52d848e1e9e20c226512688f0c50d4c3 25-Aug-2011 Jeff Sharkey <jsharkey@android.com> Return real FileDescriptor in Socket wrappers.

In classes that wrap another Socket, return the real FileDescriptor
from the wrapped Socket.

Bug: 5189186
Change-Id: I157feb6991def9110eaf0ea82365b6f5b95b9372
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketWrapper.java
29b3bd4475263c4a16c6850d45aca045ed4a926a 24-Jul-2011 Jesse Wilson <jessewilson@google.com> Update both SSLSessions to not use AccessControlContext.

When we fully removed the security manager security theatre
we broke 'equals' on some AccessControlContexts that were used
in map keys. Now we don't include the AccessControlContexts in
the map keys.

This fixes this test:
tests.api.javax.net.ssl.SSLSessionBindingListenerTest#test_valueUnbound

Change-Id: I685416c65056c9c540bf75c4aab5e884b66a4394
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/SSLSessionImpl.java
487c58a9ff0cb4c6e074b2f5d99a0c3efa54fa37 16-Jul-2011 Brian Carlstrom <bdc@google.com> Replace NativeCrypto.verifySignature with OpenSSLSignature

Bug: http://code.google.com/p/android/issues/detail?id=18458
Bug: 5037994
Change-Id: Ie9521df80b3b50e69b5cf9e6f8eb861845b4d30e
pache/harmony/security/provider/cert/X509CertImpl.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
6611bab7cb4ace7320a0584c4777f86a0da17e72 07-Jul-2011 Brian Carlstrom <bdc@google.com> Merge "Avoid NullPointerException with IoUtils.closeQuietly"
eda571883445b108e7f9e7337e2d80f1d8329fc8 07-Jul-2011 Brian Carlstrom <bdc@google.com> Avoid NullPointerException with IoUtils.closeQuietly

Change-Id: Ibe9ab00205701ad5eaeb3b4299f1fe4508625d1b
pache/harmony/xnet/provider/jsse/TrustedCertificateStore.java
0409667e1f87d26710bd8d42dcf81002fee57523 07-Jul-2011 Jesse Wilson <jessewilson@google.com> Merge "Fix a performance regression in XML documents with entities."
5e60d541ae2a4085f4c6f3739c6cff84469bc052 07-Jul-2011 Jesse Wilson <jessewilson@google.com> Fix a performance regression in XML documents with entities.

In Honeycomb we regressed so that documents containing many
HTML entities (like &amp;) were exponentially slow in the number
of entities.

This is the time to parse a 2000-character text containing
either 50% or 100% entities. Note that 100% entities was more
than 2x as slow as 50% entities.

run % ms
before 0.5 140.4
after 0.5 21.2
before 1.0 401.9
after 1.0 41.6

Bug: http://code.google.com/p/android/issues/detail?id=18102
Change-Id: I1aee43a0111e1e2b7e439b70d9ba5961ec69dced
pache/harmony/xml/parsers/DocumentBuilderImpl.java
9bb229396a11df479dbc0688de0b925d23a82869 02-Jul-2011 Brian Carlstrom <bdc@google.com> Merge "Small code cleanup in TrustedCertificateStore.findIssuer"
bd7005d38883b9917b6452bbbadbda14fd141dad 01-Jul-2011 Brian Carlstrom <bdc@google.com> Small code cleanup in TrustedCertificateStore.findIssuer

Change-Id: Ia51868df6856e14b5b82d78745c2390ce11bf6e0
pache/harmony/xnet/provider/jsse/TrustedCertificateStore.java
d8e6e701b29c32484b062933fa905601ce638513 01-Jul-2011 Brian Carlstrom <bdc@google.com> Updating comment to reflect move from keychain uid to system uid

Bug: 4970237
Change-Id: I9d207a3d226019d8f9e584b7be7f586176a133cc
pache/harmony/xnet/provider/jsse/TrustedCertificateStore.java
638000042da777f6d628d88dadde957c52597710 29-Jun-2011 Brian Carlstrom <bdc@google.com> Add ExceptionCheck after all places we setCallbackState

Also remove byte versions of SSL_read and SSL_write matching rest of
libcore to avoid making the change in even more places.

Note that testing this change required improving SSL_renegotiate which
is only used for testing.

Change-Id: If425764da3a36508a6c65d90eb3d36c5a018fd18
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
5f7beb162c46a281b272d11fec6fe23b8e0796c3 27-Jun-2011 Brian Carlstrom <bdc@google.com> TrustedCertificateStore additions for TrustedCredentials Fragment
Avoid StrictMode violation by not touching file system in constructor

Change-Id: Ic22387752617a5d8142c16c415b6996e62414442
pache/harmony/xnet/provider/jsse/TrustedCertificateStore.java
0c58d22d44cfb56f0c80f0fa1c69297ba45f3afc 23-Jun-2011 Jesse Wilson <jessewilson@google.com> Don't trigger a reverse DNS lookup from a log statement.

Also nuke a bunch of redundant Javadoc and promote the
shutdownInput/shutdownOutput methods that always throw
to SSLSocket.

Change-Id: I077f7413bb6cba66be6204c68f7911b51a191643
http://code.google.com/p/android/issues/detail?id=13117
http://b/3478027
pache/harmony/xnet/provider/jsse/AbstractSessionContext.java
pache/harmony/xnet/provider/jsse/FileClientSessionCache.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketImpl.java
90b140190f219fd63ede200a63da40bf9e6ca98d 06-Jun-2011 Elliott Hughes <enh@google.com> Remove some unnecessary cruft.

Change-Id: I8d83954d42f3511a24a44a33c3b28f04af6d3b82
pache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
pache/harmony/xnet/provider/jsse/DelegatedTask.java
pache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
e26b27faf689c17b7894c78caee32432176349ec 04-Jun-2011 Elliott Hughes <enh@google.com> Remove more dead "security theater" cruft.

There's probably still more stuff lying around that isn't useful,
but this was all I had time for on this particular Friday afternoon...

Change-Id: I69593f6c9ab5534d581c703cc85a9766ba8e40e5
pache/harmony/security/DefaultPolicyScanner.java
pache/harmony/security/PolicyEntry.java
pache/harmony/security/UnresolvedPrincipal.java
pache/harmony/security/fortress/DefaultPolicy.java
pache/harmony/security/fortress/DefaultPolicyParser.java
pache/harmony/security/fortress/PolicyUtils.java
pache/harmony/security/fortress/SecurityUtils.java
cbec51f5f2b9c425ce551405518e48d4046adb35 31-May-2011 Brian Carlstrom <bdc@google.com> SHA1_MessageDigestImpl should work for inputs of 256 Megabytes

Bug: 4501620
Change-Id: I57dc9b1308994bac96e3db8ccb2db4b368dd0552
pache/harmony/security/provider/crypto/SHA1_MessageDigestImpl.java
5292410e4ebf7fb5149eefd2f52fcb94c46690a6 24-May-2011 Jesse Wilson <jessewilson@google.com> Rewrite parsing for java.net.URL.

This fixes many broken cases on handling relative URLs.

We normalize all URLs by default. This will result
in more URL equality than before. Previously the URLs
http://android.com/a/../ and http://android.com/ were not
equal; now they are equal.

Change-Id: I8cf7be2e42eeb1386520be2698d8f14e0a55decb
http://b/4361656
pache/harmony/luni/util/URLUtil.java
54709bdf6b22d02efed7d2fd967cbd4d11b3942d 25-May-2011 Brian Carlstrom <bdc@google.com> am e2fdfbde: Merge "OpenSSLSocketImpl should tolerate X509KeyManager returning null values"

* commit 'e2fdfbde569a4cc284590c92bc57dc15dcc29a9c':
OpenSSLSocketImpl should tolerate X509KeyManager returning null values
aba5e8c281fb9c6be23229246473fa0b433dd997 25-May-2011 Brian Carlstrom <bdc@google.com> OpenSSLSocketImpl should tolerate X509KeyManager returning null values

While this started out as the small fix in
OpenSSLSocketImpl.setCertificate and the corresponding test
test_SSLSocket_clientAuth_bogusAlias, the need to test the behavior of
the X509KeyManager returning null on the RI led to test maintenance to
get libcore.javax.net.ssl tests working on RI 7 thanks to a test
dependency that was added on the new InetAddress.getLoopbackAddress().

Change-Id: I3d8ed1ce453cc3a0b53e23e39c02e6a71413649c
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
4280237a545e7482b6ea954fd862878867b8f896 22-May-2011 Brian Carlstrom <bdc@google.com> Ensure signature verification fast path is used with alternatively formatted signature algorithm names

Change-Id: Icebe7794babfc93592674cc14dd83c2556642fad
pache/harmony/security/provider/cert/X509CertImpl.java
0d4daefcf389b6433a0af481ef44a84a2546541a 21-May-2011 Elliott Hughes <enh@google.com> Suppress some FindBugs warnings.

Also globally replace "for(" with "for (".

Change-Id: I27fe17460e6745b9ca823f42e57c86fe8af31979
pache/harmony/lang/annotation/AnnotationFactory.java
c3d80a43de12b7b012d44dc2bea82f0b624e408e 20-May-2011 Brian Carlstrom <bdc@google.com> am c77290ea: Remove IndexedPKIXParameters

* commit 'c77290eaef032e5e8952d65e0456b091b6b50804':
Remove IndexedPKIXParameters
dc915c69ba2495dd2cf965d16058d0b13762142c 20-May-2011 Elliott Hughes <enh@google.com> Move the floating-point parsing code, and tidy up some documentation.

Change-Id: Ibdc1716847f4c6a85a7c24766feffc8768819cef
pache/harmony/luni/util/FloatingPointParser.java
pache/harmony/luni/util/HexStringParser.java
c77290eaef032e5e8952d65e0456b091b6b50804 20-May-2011 Brian Carlstrom <bdc@google.com> Remove IndexedPKIXParameters

Change-Id: Idaaa1952d1b6148c51b3da5d1771105e8bde8a03
pache/harmony/xnet/provider/jsse/IndexedPKIXParameters.java
pache/harmony/xnet/provider/jsse/JSSEProvider.java
pache/harmony/xnet/provider/jsse/RootKeyStoreSpi.java
pache/harmony/xnet/provider/jsse/SSLParametersImpl.java
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
pache/harmony/xnet/provider/jsse/TrustedCertificateIndex.java
pache/harmony/xnet/provider/jsse/TrustedCertificateKeyStoreSpi.java
pache/harmony/xnet/provider/jsse/TrustedCertificateStore.java
553d98af897f7202de5e5a776287de0b5ca8fe39 19-May-2011 Elliott Hughes <enh@google.com> Expose accept(2).

The implementation of PlainSocketImpl.accept is made ugly by the fact that the
SocketImpl we mutate may share its FileDescriptor with a SocketChannel, so we
need to mutate the FileDescriptor itself, and can't simply swap in a new one.
I've raised http://b/4452981 to see if we can integrate the nio and io socket
classes more closely, to avoid this kind of mess.

Bug: 3107501
Change-Id: I4964b64c25e936a44d1e4c22504ca29bba247ab6
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/luni/platform/Platform.java
23ec09188303a874b3b391f96ae0a29af002bff9 19-May-2011 Elliott Hughes <enh@google.com> Implement recvfrom(2).

This one's a little bit hairy because of multiple return values.

Bug: 3107501
Change-Id: I3bd35647d94bb6bc2192d6f31a39ecca07a3926e
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
20024ef4bbd35a0450b9f21bd2ccfef04ce13787 18-May-2011 Brian Carlstrom <bdc@google.com> am 0162c72d: Merge "Simplify KeyChain API by removing now unneeded CA certificate lookup (2 of 3)"

* commit '0162c72d58f1683cf0be369709de2450daab375c':
Simplify KeyChain API by removing now unneeded CA certificate lookup (2 of 3)
17da3dfaf359de021b753570e25a033ae8927432 17-May-2011 Brian Carlstrom <bdc@google.com> am 3041d84e: Merge "Make CertInstaller installed CA certs trusted by applications via default TrustManager (2 of 6)"

* commit '3041d84e3c0ac7711868bdd7556047a3422e3052':
Make CertInstaller installed CA certs trusted by applications via default TrustManager (2 of 6)
dfe69fa450bb1c92c589e703c6dc72aa0e364bb3 17-May-2011 Brian Carlstrom <bdc@google.com> Simplify KeyChain API by removing now unneeded CA certificate lookup (2 of 3)

frameworks/base

Remove getCaCertificates and findIssuer from IKeyChainService,
these are now done via libcore's TrustedCertificateStore (as part
of the default TrustManager implementation)

keystore/java/android/security/IKeyChainService.aidl

Simplify KeyChain API. Now that the CA certificates are visible
through the default TrustManager, the KeyChain is solely focused on
retrieving PrivateKeys and their associated certificates. The
calling API for KeyChain to simply a single KeyChain.get() call
that returns a KeyChainResult, removing the need for a KeyChain
instance that needs to be closed.

keystore/java/android/security/KeyChain.java
keystore/java/android/security/KeyChainResult.java

master/libcore

Remove getDefaultIndexedPKIXParameters and
getIndexedPKIXParameters which was used as part of the prototype
of looking up CAs via the KeyChain but is obsoleted by the new
default TrustManager implementation.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLParametersImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerImpl.java

packages/apps/KeyChain

Tracking simplified IKeyChainService, removing now unneeded
implementation, updating tests.

src/com/android/keychain/KeyChainService.java
tests/src/com/android/keychain/tests/KeyChainServiceTest.java
tests/src/com/android/keychain/tests/KeyChainTestActivity.java

Change-Id: I5c0df3b67248bb8014c85a5997098d5e70fbc505
pache/harmony/xnet/provider/jsse/SSLParametersImpl.java
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
1b3c5388d0fffde4392007eb1b0be011a5dfae82 12-May-2011 Brian Carlstrom <bdc@google.com> Make CertInstaller installed CA certs trusted by applications via default TrustManager (2 of 6)

frameworks/base

Adding IKeyChainService APIs for CertInstaller and Settings use
keystore/java/android/security/IKeyChainService.aidl

libcore

Improve exceptions to include more information
luni/src/main/java/javax/security/auth/x500/X500Principal.java

Move guts of RootKeyStoreSpi to TrustedCertificateStore, leaving only KeyStoreSpi methods.
Added support for adding user CAs in a separate directory for system.
Added support for removing system CAs by placing a copy in a sytem directory
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/RootKeyStoreSpi.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustedCertificateStore.java

Formerly static methods on RootKeyStoreSpi are now instance methods on TrustedCertificateStore
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerImpl.java

Added test for NativeCrypto.X509_NAME_hash_old and X509_NAME_hash
to make sure the implementing algorithms doe not change since
TrustedCertificateStore depend on X509_NAME_hash_old (OpenSSL
changed the algorithm from MD5 to SHA1 when moving from 0.9.8 to
1.0.0)

luni/src/test/java/org/apache/harmony/xnet/provider/jsse/NativeCryptoTest.java

Extensive test of new TrustedCertificateStore behavior
luni/src/test/java/org/apache/harmony/xnet/provider/jsse/TrustedCertificateStoreTest.java

TestKeyStore improvements
- Refactored TestKeyStore to provide simpler createCA method (and
internal createCertificate)
- Cleaned up to remove use of BouncyCastle specific X509Principal
in the TestKeyStore API when the public X500Principal would do.
- Cleaned up TestKeyStore support methods to not throw Exception
to remove need for static blocks for catch clauses in tests.

support/src/test/java/libcore/java/security/TestKeyStore.java
luni/src/test/java/libcore/java/security/KeyStoreTest.java
luni/src/test/java/org/apache/harmony/xnet/provider/jsse/NativeCryptoTest.java

Added private PKIXParameters contructor for use by
IndexedPKIXParameters to avoid wart of having to lookup and pass
a TrustAnchor to satisfy the super-class sanity check.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/IndexedPKIXParameters.java
luni/src/main/java/java/security/cert/PKIXParameters.java

packages/apps/CertInstaller

Change CertInstaller to call IKeyChainService.installCertificate
for CA certs to pass them to the KeyChainServiceTest which will
make them available to all apps through the
TrustedCertificateStore. Change PKCS12 extraction to use AsyncTask.

src/com/android/certinstaller/CertInstaller.java

Added installCaCertsToKeyChain and hasCaCerts accessor for use by
CertInstaller. Use hasUserCertificate() internally. Cleanup coding
style.

src/com/android/certinstaller/CredentialHelper.java

packages/apps/KeyChain

Added MANAGE_ACCOUNTS so that IKeyChainService.reset
implementation can remove KeyChain accounts.

AndroidManifest.xml

Implement new IKeyChainService methods:
- Added IKeyChainService.installCaCertificate to install certs
provided by CertInstaller using the TrustedCertificateStore.
- Added IKeyChainService.reset to allow Settings to remove the
KeyChain accounts so that any app granted access to keystore
credentials are revoked when the keystore is reset.

src/com/android/keychain/KeyChainService.java

packages/apps/Settings

Changed com.android.credentials.RESET credential reset action to
also call IKeyChainService.reset to remove any installed user CAs
and remove KeyChain accounts to have AccountManager revoke
credential granted to private keys removed during the RESET.

src/com/android/settings/CredentialStorage.java

Added toast text value for failure case

res/values/strings.xml

system/core

Have init create world readable /data/misc/keychain to allow apps
to access user added CA certificates installed by the CertInstaller.

rootdir/init.rc

Change-Id: Ief57672eea38b3eece23b14c94dedb9ea4713744
pache/harmony/xnet/provider/jsse/IndexedPKIXParameters.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
pache/harmony/xnet/provider/jsse/RootKeyStoreSpi.java
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
pache/harmony/xnet/provider/jsse/TrustedCertificateStore.java
90d96a4f168b7e56cff54dc94dca2f3cde60ebcd 17-May-2011 Elliott Hughes <enh@google.com> Add sendto(2) and reimplement all network writes in terms of it.

Note that this doesn't fix http://b/4182806.

Bug: 3107501
Change-Id: I9b56eae226389a63a12b4c0499d40d5a54a462e2
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
e27d02044ec399884bfd4343d513bf270b9b9b11 16-May-2011 Elliott Hughes <enh@google.com> Remove OSNetworkSystem.close.

For now I'm keeping AsynchronousCloseMonitor as a special case in native code.
We can see about doing something more general-purpose in a later pass.

Bug: 3107501
Change-Id: Ib79b9fc0bebfafc2d14896d957bd8591ae8e6e97
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
2bad9bff258de6275bd3847e5e9f3169b0a93c61 12-May-2011 Elliott Hughes <enh@google.com> Reimplement OSNetworkSystem.isConnected in Java.

We can do this in Java now we've exposed poll(2).

Change-Id: I9f2700d09134198c1cd2681e3814fb482e8e271c
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
70c820401677ca251ad09ac64cc23c760764e75d 12-May-2011 Elliott Hughes <enh@google.com> Expose poll(2) and reimplement java.nio.channels.Selector.

This also adds UnsafeArrayList<T>, which is like ArrayList but lets you access
the underlying array (as opposed to ArrayList.toArray which creates a copy).

Bug: 3107501
Change-Id: I8dc570a9fd7951b1435047017ea7aa19f8f8fc53
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
a7bb29434692e01aed843b88cd042628bab74a23 11-May-2011 Elliott Hughes <enh@google.com> Clean up the select(2) implementation.

I wasn't planning on touching this code (since I want to replace it), but the
purported "fix" for http://code.google.com/p/android/issues/detail?id=6309 was
actually a regression. The supplied test fails on the RI. This patch replaces
the bogus test with new tests, and reverts the old "fix".

This was found while trying to work out what "true" and "false" return values
from OSNetworkSystem.select are supposed to mean. This patch also switches to
a more traditional int return value.

Bug: 3107501
Change-Id: Iddce55e081d440b7eb3ddcf94db7d0739dc89c70
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
32b0fa4d1a31ef07bc4297c615f0fe50e9aa7c21 11-May-2011 Elliott Hughes <enh@google.com> DatagramSocket.disconnect is really a connect(2) of an AF_UNSPEC sockaddr.

Bug: 3107501
Change-Id: Ib04369b9ca63ff3fe7eb87dcbf2926fe704813e3
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
8e0bdcf8bb815078e28679b8111d590d2da83328 11-May-2011 Jesse Wilson <jessewilson@google.com> Merge "Dont line wrap Base64." into dalvik-dev
32b2c95c350002f67c8b3e65777161feda766b72 10-May-2011 Jesse Wilson <jessewilson@google.com> Dont line wrap Base64.

Change-Id: I9a16a09dad9ff170921591455b17a3b738e70655
pache/harmony/luni/util/Base64.java
pache/harmony/security/provider/cert/X509CertFactoryImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
996bf79565ac88402920bd826d6f85952c83be20 10-May-2011 Elliott Hughes <enh@google.com> Expose connect(2).

The new NET_FAILURE_RETRY in Posix.cpp is intended to replace the legacy one
in NetFd.h, but during the transition we need both. The new one also takes care
of the asynchronous Socket.close semantics, and changes the behavior when the
FileDescriptor is invalid on entry: that is now reported as EBADF; it's only
reported as "Socket closed" when we've been round the loop at least once,
giving us reason to believe the socket was ever open. Having had to debug this
distinction, I think the new semantics are less confusing.

Bug: 3107501
Change-Id: I243dc4fa2eddde7ba40e9b66ec8fc555bc4e80f9
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
da15009528cc8300a6251f1d0931ac8657c9fc31 09-May-2011 Elliott Hughes <enh@google.com> Expose bind(2).

I've renamed the java.net.InetAddress to struct sockaddr conversion functions
too, after initially screwing up this patch by copy & pasting a usage of the
one that only one caller actually wants. Now the name's so ugly no-one will
be likely to use it by accident.

Bug: 3107501
Change-Id: I869a8d27fc40e462505e02bf25a67e771a403e92
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
c06e5e270b958aeb8060cd7f2576c0f1e6ac415e 05-May-2011 Elliott Hughes <enh@google.com> Set the sin6_scope_id field when translating an Inet6Address to a sockaddr.

This basically means link-local IPv6 addresses have never worked on Android.

Change-Id: I343493cbbde1e4441385487f054c4bdad5dcef52
pache/harmony/luni/platform/OSNetworkSystem.java
4bccd48c4bab2c92a34caf3401d379895d2947b6 02-May-2011 Elliott Hughes <enh@google.com> Merge "Rewrite blocking connects in terms of the non-blocking primitives." into dalvik-dev
220c0af1763283b75617226efe3919c3e3b044c8 30-Apr-2011 Elliott Hughes <enh@google.com> Rewrite blocking connects in terms of the non-blocking primitives.

This simplifies OSNetworkSystem, getting us closer to replacing the
connect(2)-related bits with our new POSIX interface. It also lets
us remove cruft on the Java side that was resetting the socket's
blocking/non-blocking state (which should never have been touched),
which in turn fixes bug 4193212.

Detail messages for socket timeouts get better too, now we're throwing
on the Java side.

The only thing that's worse is that we used to get away with throwing
a checked exception from native code, which simplified our "throws"
clauses. Now we actually have to jump through a few hoops to make javac
happy. (Especially awkward because SocketTimeoutException isn't a
SocketException.) Stupid checked exceptions.

Bug: 4193212
Bug: 3107501
Change-Id: I00695d22094e6d785458dfbb7050fbaecf2db89f
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
d7a21ec11a89594497f35f731b42d98af72e1235 30-Apr-2011 Brian Carlstrom <bdc@google.com> resolved conflicts for merge of 7195b3b9 to dalvik-dev

Change-Id: Ie1f2d796466f1799929b010d67585fd551b6f840
0c814baa7aff1b0845b2ad36c62dc791700732e1 30-Apr-2011 Brian Carlstrom <bdc@google.com> am 347b2a60: Avoid loading all CA certs into Zygote memory, lazily load instead (2 of 3)

* commit '347b2a604114602da9bc4ae040278f74d11c2f51':
Avoid loading all CA certs into Zygote memory, lazily load instead (2 of 3)
7195b3b965df5c3288435d94e8d13bd256e33890 30-Apr-2011 Brian Carlstrom <bdc@google.com> Merge "Fix X509CertImpl.verify(PublicKey, String) to respect provider argument"
91922d920e0020bde20ef5ae21b66cab847dd58b 30-Apr-2011 Brian Carlstrom <bdc@google.com> Fix X509CertImpl.verify(PublicKey, String) to respect provider argument

Mostly a cleanup of CertificateTest, but it found one small bug in X509CertImpl
- X509CertImpl.verify with a specific provider should use that provider,
not ignore it and use the NativeCrypto fast path
- Fix the bad testGetEncoded logic that was expected PEM bytes to
equal a DER encodi
- Remove libcore and harmony dependencies that were preventing these
from running on the RI
- Note testSerializationCompatibility is still failing, but is fixed
by the unmerged 46c6fad9fad8f3dbbc82516232a225f37d332ca7

Bug: 1635707
Change-Id: Ib86d21d6458cf1438c6ddd715ccb5a4f8a9af9e6
pache/harmony/security/provider/cert/X509CertImpl.java
347b2a604114602da9bc4ae040278f74d11c2f51 26-Apr-2011 Brian Carlstrom <bdc@google.com> Avoid loading all CA certs into Zygote memory, lazily load instead (2 of 3)

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 add remove certimport.sh script used to
generate it. Preserved the useful comments from certimport.sh in
the new README.cacerts

luni/src/main/files/cacerts.bks
luni/src/main/files/certimport.sh
luni/src/main/files/README.cacerts

Recanonicalize cacerts files using updated vendor/google/tools/cacerts/certimport.py
(See below discussion of certimport.py changes for details)

luni/src/main/files/cacerts/00673b5b.0
luni/src/main/files/cacerts/03e16f6c.0
luni/src/main/files/cacerts/08aef7bb.0
luni/src/main/files/cacerts/0d188d89.0
luni/src/main/files/cacerts/10531352.0
luni/src/main/files/cacerts/111e6273.0
luni/src/main/files/cacerts/1155c94b.0
luni/src/main/files/cacerts/119afc2e.0
luni/src/main/files/cacerts/11a09b38.0
luni/src/main/files/cacerts/12d55845.0
luni/src/main/files/cacerts/17b51fe6.0
luni/src/main/files/cacerts/1920cacb.0
luni/src/main/files/cacerts/1dac3003.0
luni/src/main/files/cacerts/1dbdda5b.0
luni/src/main/files/cacerts/1dcd6f4c.0
luni/src/main/files/cacerts/1df5ec47.0
luni/src/main/files/cacerts/1e8e7201.0
luni/src/main/files/cacerts/1eb37bdf.0
luni/src/main/files/cacerts/219d9499.0
luni/src/main/files/cacerts/23f4c490.0
luni/src/main/files/cacerts/27af790d.0
luni/src/main/files/cacerts/2afc57aa.0
luni/src/main/files/cacerts/2e8714cb.0
luni/src/main/files/cacerts/2fa87019.0
luni/src/main/files/cacerts/2fb1850a.0
luni/src/main/files/cacerts/33815e15.0
luni/src/main/files/cacerts/343eb6cb.0
luni/src/main/files/cacerts/399e7759.0
luni/src/main/files/cacerts/3a3b02ce.0
luni/src/main/files/cacerts/3ad48a91.0
luni/src/main/files/cacerts/3c58f906.0
luni/src/main/files/cacerts/3c860d51.0
luni/src/main/files/cacerts/3d441de8.0
luni/src/main/files/cacerts/3e7271e8.0
luni/src/main/files/cacerts/418595b9.0
luni/src/main/files/cacerts/455f1b52.0
luni/src/main/files/cacerts/46b2fd3b.0
luni/src/main/files/cacerts/48478734.0
luni/src/main/files/cacerts/4d654d1d.0
luni/src/main/files/cacerts/4e18c148.0
luni/src/main/files/cacerts/4fbd6bfa.0
luni/src/main/files/cacerts/5021a0a2.0
luni/src/main/files/cacerts/5046c355.0
luni/src/main/files/cacerts/524d9b43.0
luni/src/main/files/cacerts/56b8a0b6.0
luni/src/main/files/cacerts/57692373.0
luni/src/main/files/cacerts/58a44af1.0
luni/src/main/files/cacerts/594f1775.0
luni/src/main/files/cacerts/5a3f0ff8.0
luni/src/main/files/cacerts/5a5372fc.0
luni/src/main/files/cacerts/5cf9d536.0
luni/src/main/files/cacerts/5e4e69e7.0
luni/src/main/files/cacerts/60afe812.0
luni/src/main/files/cacerts/635ccfd5.0
luni/src/main/files/cacerts/67495436.0
luni/src/main/files/cacerts/69105f4f.0
luni/src/main/files/cacerts/6adf0799.0
luni/src/main/files/cacerts/6e8bf996.0
luni/src/main/files/cacerts/6fcc125d.0
luni/src/main/files/cacerts/72f369af.0
luni/src/main/files/cacerts/72fa7371.0
luni/src/main/files/cacerts/74c26bd0.0
luni/src/main/files/cacerts/75680d2e.0
luni/src/main/files/cacerts/7651b327.0
luni/src/main/files/cacerts/76579174.0
luni/src/main/files/cacerts/7999be0d.0
luni/src/main/files/cacerts/7a481e66.0
luni/src/main/files/cacerts/7a819ef2.0
luni/src/main/files/cacerts/7d3cd826.0
luni/src/main/files/cacerts/7d453d8f.0
luni/src/main/files/cacerts/81b9768f.0
luni/src/main/files/cacerts/8470719d.0
luni/src/main/files/cacerts/84cba82f.0
luni/src/main/files/cacerts/85cde254.0
luni/src/main/files/cacerts/86212b19.0
luni/src/main/files/cacerts/87753b0d.0
luni/src/main/files/cacerts/882de061.0
luni/src/main/files/cacerts/895cad1a.0
luni/src/main/files/cacerts/89c02a45.0
luni/src/main/files/cacerts/8f7b96c4.0
luni/src/main/files/cacerts/9339512a.0
luni/src/main/files/cacerts/9685a493.0
luni/src/main/files/cacerts/9772ca32.0
luni/src/main/files/cacerts/9d6523ce.0
luni/src/main/files/cacerts/9dbefe7b.0
luni/src/main/files/cacerts/9f533518.0
luni/src/main/files/cacerts/a0bc6fbb.0
luni/src/main/files/cacerts/a15b3b6b.0
luni/src/main/files/cacerts/a3896b44.0
luni/src/main/files/cacerts/a7605362.0
luni/src/main/files/cacerts/a7d2cf64.0
luni/src/main/files/cacerts/ab5346f4.0
luni/src/main/files/cacerts/add67345.0
luni/src/main/files/cacerts/b0f3e76e.0
luni/src/main/files/cacerts/bc3f2570.0
luni/src/main/files/cacerts/bcdd5959.0
luni/src/main/files/cacerts/bda4cc84.0
luni/src/main/files/cacerts/bdacca6f.0
luni/src/main/files/cacerts/bf64f35b.0
luni/src/main/files/cacerts/c0cafbd2.0
luni/src/main/files/cacerts/c215bc69.0
luni/src/main/files/cacerts/c33a80d4.0
luni/src/main/files/cacerts/c527e4ab.0
luni/src/main/files/cacerts/c7e2a638.0
luni/src/main/files/cacerts/c8763593.0
luni/src/main/files/cacerts/ccc52f49.0
luni/src/main/files/cacerts/cdaebb72.0
luni/src/main/files/cacerts/cf701eeb.0
luni/src/main/files/cacerts/d16a5865.0
luni/src/main/files/cacerts/d537fba6.0
luni/src/main/files/cacerts/d64f06f3.0
luni/src/main/files/cacerts/d777342d.0
luni/src/main/files/cacerts/d8274e24.0
luni/src/main/files/cacerts/dbc54cab.0
luni/src/main/files/cacerts/ddc328ff.0
luni/src/main/files/cacerts/e48193cf.0
luni/src/main/files/cacerts/e60bf0c0.0
luni/src/main/files/cacerts/e775ed2d.0
luni/src/main/files/cacerts/e7b8d656.0
luni/src/main/files/cacerts/e8651083.0
luni/src/main/files/cacerts/ea169617.0
luni/src/main/files/cacerts/eb375c3e.0
luni/src/main/files/cacerts/ed049835.0
luni/src/main/files/cacerts/ed524cf5.0
luni/src/main/files/cacerts/ee7cd6fb.0
luni/src/main/files/cacerts/f4996e82.0
luni/src/main/files/cacerts/f58a60fe.0
luni/src/main/files/cacerts/f61bff45.0
luni/src/main/files/cacerts/f80cc7f6.0
luni/src/main/files/cacerts/fac084d7.0
luni/src/main/files/cacerts/facacbc6.0
luni/src/main/files/cacerts/fde84897.0
luni/src/main/files/cacerts/ff783690.0

Change IntegralToString.intToHexString to take width argument to
allow for leading zero padding. Updated existing callers to
specify 0 padding desired. Add testing of new padding
functionality.

luni/src/main/java/java/lang/Character.java
luni/src/main/java/java/lang/Integer.java
luni/src/main/java/java/lang/IntegralToString.java
luni/src/test/java/libcore/java/lang/IntegralToStringTest.java

Improved to throw Exceptions with proper causes

luni/src/main/java/java/security/KeyStore.java
luni/src/main/java/java/security/Policy.java
luni/src/main/java/java/security/cert/CertificateFactory.java
luni/src/main/java/javax/crypto/Cipher.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSignature.java

Indentation fixes

luni/src/main/java/java/security/SecureRandom.java

Fix X509CRLSelector.getIssuerNames to clone result and added test to cover this.

luni/src/main/java/java/security/cert/X509CRLSelector.java
luni/src/test/java/libcore/java/security/cert/X509CRLSelectorTest.java

Fixed bug where we created an X500Principal via a String
representation instead of from its original encoded bytes. This
led to a difficult to track down bug where CA 418595b9.0 where the
NativeCode.X509_NAME_hash of a Harmony (but not BouncyCastle)
X509Certificate would not hash to the expected value because the
encoded form used an ASN.1 PrintableString instead of the
UTF8String form found in the original certificate.

luni/src/main/java/org/apache/harmony/security/x501/Name.java

Add a new RootKeyStoreSpi and register it as the
AndroidCAStore. This new read-only KeyStore implementation that
looks for certificates in $ANDROID_ROOT/etc/security/cacerts/
directory, which is /system/etc/security/cacerts/ on devices. The
files are stored in the directory based on the older md5 based
OpenSSL X509_NAME_hash function (now referred to as
X509_NAME_hash_old in OpenSSL 1.0)

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/RootKeyStoreSpi.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/JSSEProvider.java

Added OpenSSL compatible X509_NAME_hash and X509_NAME_hash_old
functions for producting an int hash value from an X500Principal.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java

Changed TrustManagerFactoryImpl to use AndroidCAStore for its default KeyStore

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java

Changed TrustManagerImpl to be AndroidCAStore aware. If it detects
an AndroidCAStore, it avoids generating the acceptedIssuers array
at constructions, since doing so would force us to parse all
certificates in the store and the value is only typically used by
SSLServerSockets when requesting a client certifcate. Because we
don't load all the trusted CAs into the IndexedPKIXParameters at
startup in the case of AndroidCAStore, we now check for new CAs
when examining the cert chain for unnecessary TrustAnchors and for
a newly discovered issuer at the end of the chain before
validation.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerImpl.java

Updated KeyStoreTest to cope with read only KeyStore. Update
test_cacerts_bks (now renamed test_cacerts) to use the
AndroidCAStore for validating system CA certificate
validity. Register AndroidCAStore as an expected KeyStore type
with StandardNames.

luni/src/test/java/libcore/java/security/KeyStoreTest.java
support/src/test/java/libcore/java/security/StandardNames.java

Added test of X500Principal serialization while investigating Name
encoding issue. However, the actual Name bug was found and
verified by the new test_cacerts test.

luni/src/test/java/libcore/javax/security/auth/x500/X500PrincipalTest.java

vendor/google

Change canonical format for checked in cacerts to have PEM
certificate at the top, as required by Harmony's X.509
CertificateFactory.

tools/cacerts/certimport.py

Change-Id: If0c9de430f13babb07f96a1177897c536f3db08d
pache/harmony/security/x501/Name.java
pache/harmony/xnet/provider/jsse/JSSEProvider.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
pache/harmony/xnet/provider/jsse/RootKeyStoreSpi.java
pache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
b05f5c7ec0eb1f7471f20bb8493c5397c55fb3a0 07-Apr-2011 Brian Carlstrom <bdc@google.com> am 3258b524: libcore key chain support

* commit '3258b52429c7768ea91bda93c5a15257cdd390e5':
libcore key chain support
3258b52429c7768ea91bda93c5a15257cdd390e5 18-Mar-2011 Brian Carlstrom <bdc@google.com> libcore key chain support

Allow access to default IndexedPKIXParameters, similar to access to
default TrustManager. Needed to allow framework to add/remove trusted
CAs at runtime.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLParametersImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerImpl.java

Add test support for looking up a cert by an issuer for use in key chain tests.

support/src/test/java/libcore/java/security/TestKeyStore.java

Add test support SSLSocketFactory that sets desired client auth on
each created socket. For use with MockWebServer for key chain testing.

support/src/test/java/libcore/javax/net/ssl/TestSSLContext.java

Change-Id: Iecdbd40c67f1673bda25a52b4e229156c805d564
pache/harmony/xnet/provider/jsse/SSLParametersImpl.java
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
b974666d79ebc392b37ec1ae83aae57ae6331c08 06-Apr-2011 Elliott Hughes <enh@google.com> Finish setsockopt(2).

Bug: 3107501
Change-Id: I8f026dcba78acb555834bdcc594e114238f3cc52
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
5d3f5200f3511c9a7107bcc0a996c7afa1b39aaf 01-Apr-2011 Elliott Hughes <enh@google.com> Don't cache the underlying Socket's underlying SocketImpl's underlying FileDescriptor in OpenSSLSocketImpl.

(OpenSSLSocketImpl, of course, being a Socket, not a SocketImpl.)

Bug: 4192414

git cherry-pick dc33f53f38600943c84146320c748e3c46fd2e7b

Change-Id: I8f481e0fe217aac782ad9d9e9053681ad69e62ef
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
dc33f53f38600943c84146320c748e3c46fd2e7b 01-Apr-2011 Elliott Hughes <enh@google.com> Don't cache the underlying Socket's underlying SocketImpl's underlying FileDescriptor in OpenSSLSocketImpl.

(OpenSSLSocketImpl, of course, being a Socket, not a SocketImpl.)

Bug: 4192414

Change-Id: I3c7d0fed70b1b98dc8fcc73f35b3feb0e1eeb2f9
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
0a9d1ee45a9884a9616624d747172e18734e8fe0 31-Mar-2011 Elliott Hughes <enh@google.com> Add getsockname(2) and getsockopt(2).

Bug: 3107501
Change-Id: Ibb0d5a576ecb46e51dbda6051776145eec9e7fe1
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
d320e321d5567a4ac94b6e5874eda4b1f1189e13 30-Mar-2011 Elliott Hughes <enh@google.com> Move and rename an implementation detail.

Change-Id: I563c2fd6689dd7249049671c3c01c6434d9b5fa5
pache/harmony/luni/platform/FileDescriptorHandler.java
454a95f6a28855aa3c88d168b15a45bf315efc99 30-Mar-2011 Elliott Hughes <enh@google.com> Add socket(2) and start adding setsockopt(2).

I've added just enough setsockopt to keep the hack from our old socket
creation code. More later (but not necessarily right away).

Bug: 3107501
Change-Id: Id57bdd3c760bc58ed79d675b268c55493cbc24c8
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
8b15dcc5890963edad4dfcf558cc16027c7985e5 29-Mar-2011 Elliott Hughes <enh@google.com> Add sendfile(2).

This patch marks the end of OSFileSystem.

Having to support a Java "long*" for sendfile(2) gave me an opportunity to go
back and improve my ioctl(2) to use a corresponding "int*" equivalent, instead
of its previous special-case hack.

Bug: 3107501
Change-Id: I9fde4777700552263fab4fe9aeb556174163e3dc
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/OSFileSystem.java
pache/harmony/luni/platform/Platform.java
bbac92e691de7d570928ddfba639067978e55b06 29-Mar-2011 Elliott Hughes <enh@google.com> Add readv(2)/writev(2).

The old implementation would cheat if it was given non-direct buffers, copying
them into newly-allocated direct buffers. (The network Channel implementations
are worse: they copy all the data into a single buffer, and then read/write
that. I'll get to them eventually.)

Bug: 3107501
Change-Id: I1655bacb042e7ebcde7e5bc5cf2c71e7ce5e30af
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/OSFileSystem.java
ee1d5475eca8a8d42e73bbd00386f50e10250ec6 29-Mar-2011 Jesse Wilson <jessewilson@google.com> Remove the caching from ClassMembers.

Callers who call getFields() will no longer benefit from a cache
if they call that method multiple times in a row. Similarly for
getMethods(). These caches optimized those calls, but only as a
side-effect of our intended optimization: to make looking up a
single member fast. Now that we do that directly, these caches
are less useful.

Change-Id: Ibc560710165f6f1ea081c357b8b375ae48289631
http://b/4087759
pache/harmony/kernel/vm/ReflectionAccess.java
461d0d860814c68154d8dd06d24f94118f33d28a 29-Mar-2011 Elliott Hughes <enh@google.com> Add ioctl(2) for int*.

I'm not adding the "struct ifreq" stuff yet because that's really hairy and I
plan on rewriting the NetworkInterface implementation anyway, so it'll mainly
be based on /proc. With any luck, we won't even need those other ioctls then.

I'm not sure _this_ ioctl is a good idea, but it does seem like a slight
improvement on the old code, and we can always move it back out if/when these
APIs become more public.

Bug: 3107501
Change-Id: Iceac15e4a107c33bfc8795976a747c2ffa59a183
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/OSFileSystem.java
6789e65622548dd7d2842ec77c19004afc9d4426 28-Mar-2011 Jesse Wilson <jessewilson@google.com> Permit general and parameter entity features to be disabled for Expat SAX.

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

(We'll keep supporting the native Expat parser until the the Java Kxml
parser is as fast).

Change-Id: I6492634a777a591f5da4ea7a4cdeca81c1f6cc65
pache/harmony/xml/ExpatReader.java
78c7cc547101002b9f9043cf3845970719d1bda8 26-Mar-2011 Elliott Hughes <enh@google.com> Add write(2).

Note that this is a functional change, because the old code was wrong: it
assumed that short writes don't happen. I thought we'd (I'd) cleaned this
up just recently, but it looks like I must have only gone through the network
code. Embarrassing.

This also cleans up the previous read change a bit, factoring out a bit more
duplication, and taking advantage of the fact that we now get decent
exceptions thrown from invalid FileDescriptors (meaning we can remove explicit
checks).

Bug: 3107501
Change-Id: I8bd5324836c9d151dceaef5b84ec523a67391b64
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/OSFileSystem.java
26c7025a7a919044771fb89031161bd26fe03032 26-Mar-2011 Elliott Hughes <enh@google.com> Add read(2).

For both byte[]s and ByteBuffers.

Bug: 3107501
Change-Id: I93b781069ade4507371c8fe8c5fda0163fbb2dbb
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/OSFileSystem.java
fc549a0b0388987b26dea524894d75a63d14783b 25-Mar-2011 Elliott Hughes <enh@google.com> Add fcntl(2).

I initially used overloading, but that actually decreases safety in practice
because which overload you need is (uniquely) determined by the specific
command you're issuing. Forcing callers to explicitly state what they're
doing works around this. As it was, I had to use strace(1) to find my bug.

Bug: 3107501
Change-Id: Ia54b72dd6453372922f01b22f382eb93ac91aaa7
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/OSFileSystem.java
e1502d64e937001636fca3d62b2552ef2a34d05f 24-Mar-2011 Elliott Hughes <enh@google.com> Add listen(2).

Bug: 3107501
Change-Id: I3677bb4ddb3f3d0e58a6833165504f47bb309630
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
59e4744d27231f260271dbbca406e0cc39768116 24-Mar-2011 Elliott Hughes <enh@google.com> Add shutdown(2).

Bug: 3107501
Change-Id: I30354c4cc6e86a4e7b0e3f84e95719539db1d297
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/xnet/provider/jsse/SSLSocketImpl.java
0ac77ac8e915bff1a863e371f9b363033f9cf759 23-Mar-2011 Elliott Hughes <enh@google.com> Add open(2).

Bug: 3107501
Change-Id: I404030b4c678862465d04f723a6a324663e0af25
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/OSFileSystem.java
5aafac4db69e6d087c512cdfa5c7c0e2f1611681 19-Mar-2011 Jesse Wilson <jessewilson@google.com> Move URLConnection classes to libcore.net.

Change-Id: I14bf8373dfce50dda94e1a64419b9a8a9cf3c82e
pache/harmony/luni/internal/net/www/protocol/file/FileURLConnection.java
pache/harmony/luni/internal/net/www/protocol/file/Handler.java
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLInputStream.java
pache/harmony/luni/internal/net/www/protocol/ftp/Handler.java
pache/harmony/luni/internal/net/www/protocol/http/AbstractHttpInputStream.java
pache/harmony/luni/internal/net/www/protocol/http/AbstractHttpOutputStream.java
pache/harmony/luni/internal/net/www/protocol/http/ChunkedInputStream.java
pache/harmony/luni/internal/net/www/protocol/http/ChunkedOutputStream.java
pache/harmony/luni/internal/net/www/protocol/http/FixedLengthInputStream.java
pache/harmony/luni/internal/net/www/protocol/http/FixedLengthOutputStream.java
pache/harmony/luni/internal/net/www/protocol/http/Handler.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnectionPool.java
pache/harmony/luni/internal/net/www/protocol/http/HttpHeaders.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/http/RetryableOutputStream.java
pache/harmony/luni/internal/net/www/protocol/http/UnknownLengthHttpInputStream.java
pache/harmony/luni/internal/net/www/protocol/https/Handler.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/jar/Handler.java
pache/harmony/luni/internal/net/www/protocol/jar/JarURLConnectionImpl.java
dedaccdfa07c370a58cba08b096133ad9eec0ec3 18-Mar-2011 Elliott Hughes <enh@google.com> Add lseek(2).

Bug: 3107501
Change-Id: Ie27e2ae1c7d37de5f02b1d81ee2005182339f881
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/OSFileSystem.java
f5333fd2094bdac4d6506177b1964b79afa64d77 18-Mar-2011 Elliott Hughes <enh@google.com> Add ftruncate(2).

The claim that "the port library" modifies the file offset appears to only ever
have been true of Harmony's Win32 implementation. Certainly, this is not the
behavior of ftruncate(2), so we can lose the cruft.

Bug: 3107501
Change-Id: I35092fd986296b78c4847c7215765f9997339f37
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/OSFileSystem.java
6fc1a0e1e68dc2e0d12341548e58fa7f1c5dafc4 18-Mar-2011 Elliott Hughes <enh@google.com> Add sysconf(3).

This gives us a getpagesize(3) replacement right now, and will let us implement
Runtime.availableProcessors here rather than in the VM in a later change.

Bug: 3107501
Change-Id: I6fc1f83d36b026fbe8d37eca525550479677f2de
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/OSFileSystem.java
2f75ad8e64570c7adfb3e95de91ef64d3e4b1806 18-Mar-2011 Elliott Hughes <enh@google.com> Merge "Add fstat(2), lstat(2), and stat(2)." into dalvik-dev
a879e74388e30203ad94719723b455f1367303cf 18-Mar-2011 Jesse Wilson <jessewilson@google.com> Merge "Use the '@hide' tag rather than reflection and initialization order tricks." into dalvik-dev
b74b0c7dabd2b9d562a1b77388052a191d1bb400 18-Mar-2011 Jesse Wilson <jessewilson@google.com> Use the '@hide' tag rather than reflection and initialization order tricks.

Change-Id: I6e72ff327673103306e788558c449927e9049883
http://code.google.com/p/android/issues/detail?id=15388
pache/harmony/kernel/vm/LangAccess.java
47cb338d43f75dd998b29caaaa9446c5705217d1 18-Mar-2011 Elliott Hughes <enh@google.com> Add fstat(2), lstat(2), and stat(2).

Bug: 3107501
Change-Id: Ic36f9ffd03446d6e0189470f42abdadde57327df
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/OSFileSystem.java
32c2297a959b72abdb18743f0519e1d8b7c7ea88 17-Mar-2011 Elliott Hughes <enh@google.com> Remove bogus "super()" calls.

I've left one in java.util.concurrent, since we have an upstream there.

Change-Id: I60945e48a41433fc7eaef6086433ec4bf434097f
pache/harmony/luni/util/TwoKeyHashMap.java
pache/harmony/security/SystemScope.java
pache/harmony/xnet/provider/jsse/EndOfBufferException.java
pache/harmony/xnet/provider/jsse/EndOfSourceException.java
pache/harmony/xnet/provider/jsse/KeyManagerImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLServerSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLEngineImpl.java
pache/harmony/xnet/provider/jsse/SSLServerSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/SSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLSessionImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketImpl.java
ml/sax/SAXException.java
ml/sax/SAXNotRecognizedException.java
ml/sax/SAXNotSupportedException.java
ml/sax/helpers/ParserAdapter.java
ml/sax/helpers/XMLFilterImpl.java
52724d3ebd4ccaaa4b9f5576e329d4272cde8ea9 17-Mar-2011 Elliott Hughes <enh@google.com> Add fsync(2) and fdatasync(2).

Interesting parts to this change:
* first BlockGuard support (and general delegation support).
* first rethrowing of ErrnoException as IOException.
* switching FileChannelImpl from int to FileDescriptor.

The special case in FileDescriptor.sync has been removed. Testing with the RI
showed that it doesn't treat syncing a FileDescriptor that corresponds to a
socket as a special case --- it throws SyncFailedException just like normal.

Bug: 3107501
Change-Id: I99faf120bd802aec0397a79772ed38c5e1542fed
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/OSFileSystem.java
cdf7a1f942469221bcfd63d9cdf71851b011eaf0 16-Mar-2011 Elliott Hughes <enh@google.com> Expose POSIX constants.

And use them, too. This patch is a little confusing because we already had
constants in Java that were using the POSIX names but that didn't actually
correspond to the constants whose names they'd stolen. Ugh.

Bug: 3107501
Change-Id: Ib64a109c9340b0ecdf80bec91074206c001f455a
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/OSFileSystem.java
f934c3d2c8dd9e6bc5299cef41adace2a671637d 15-Mar-2011 Elliott Hughes <enh@google.com> Make OSMemory the semi-supported libcore.io.Memory.

Looks like we're not going to bother with a separate libcore.os package,
when libcore.io will do.

Change-Id: I2806c59349ed4b6410d768c4207c384ced973c54
pache/harmony/luni/platform/OSMemory.java
2f03ccad590827233fcba84a8b6eafcd414e5fe7 08-Mar-2011 Elliott Hughes <enh@google.com> Use -fvisibility and clean up a little.

The visibility change isn't obviously useful, but it's a good excuse to clean
up some of our networking code a little.

Change-Id: I165b32b9c76a3707c512e07de07992f63673ab4f
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
ff8234c90ecab9f1db368924bf92a5b16460f9b5 08-Mar-2011 Elliott Hughes <enh@google.com> Factor out our single-byte InputStream.read/OutputStream.write implementations.

Change-Id: I00106a51a32ea84a39256d5629369170b892a039
pache/harmony/luni/internal/net/www/protocol/http/AbstractHttpInputStream.java
pache/harmony/xnet/provider/jsse/SSLSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketOutputStream.java
608263018762d64a07276b7c8f58102455ccecc8 08-Mar-2011 Elliott Hughes <enh@google.com> Fix short writes in Socket OutputStreams.

Also tidy some code and fix some comments.

The OpenSSL OutputStream is already correct: it handles this in the native code.

Bug: http://code.google.com/p/android/issues/detail?id=15304
Change-Id: I69645543ec01f1eecdae4418f86c3a1911c0f752
pache/harmony/xnet/provider/jsse/SSLSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketInputStream.java
pache/harmony/xnet/provider/jsse/SSLSocketOutputStream.java
eb8027492e81d5d3a0d1cd49494c59f9a03eeaa3 07-Mar-2011 Elliott Hughes <enh@google.com> Remove useless overrides of InputStream.read(byte[]) and OutputStream.write(byte[]).

For the particular stream in the bug, the useless override assumes that the
implementation of read(byte[], int, int) or write(byte[], int, int) doesn't
do anything special. A dangerous and non-local assumption. (In the bug, we
need to change the three-argument write.)

Bug: http://code.google.com/p/android/issues/detail?id=15304
Change-Id: I915d4a2e20c98f8e7f5775b555ae77d496a535d0
pache/harmony/security/provider/cert/X509CertFactoryImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketInputStream.java
pache/harmony/xnet/provider/jsse/SSLSocketOutputStream.java
8de7cf6bff36093dda9e25a1ab3718720cb54906 07-Mar-2011 Elliott Hughes <enh@google.com> Move the various concrete SocketImpl classes into java.net.

Also do some trivial tidying of dead code.

Bug: http://code.google.com/p/android/issues/detail?id=15304
Change-Id: If7186dda6bf31e2c2ef00ac6f386cbc9a78847fd
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainServerSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/net/SocketInputStream.java
pache/harmony/luni/net/SocketOutputStream.java
pache/harmony/luni/net/Socks4Message.java
9229d47c1288e25ead3a2dc27fac8a4a2ee932a3 07-Mar-2011 Elliott Hughes <enh@google.com> Kill many of the stl_style_names in Java.

Change-Id: I4473a6efc74a49dd3b480a48d4c697fc773e08f8
pache/harmony/luni/util/Base64.java
pache/harmony/luni/util/HexStringParser.java
cb1ed37295a7c13781a599d02687884243526c37 25-Feb-2011 Elliott Hughes <enh@google.com> Merge "Fix more FindBugs warnings: RR_NOT_CHECKED." into dalvik-dev
f5309a39506c967feda8766feeba7f7271a458cb 25-Feb-2011 Elliott Hughes <enh@google.com> Fix more FindBugs warnings: RR_NOT_CHECKED.

"This method ignores the return value of one of the variants of
java.io.InputStream.read() which can return multiple bytes. If the return
value is not checked, the caller will not be able to correctly handle the
case where fewer bytes were read than the caller requested. This is a
particularly insidious kind of bug, because in many programs, reads from input
streams usually do read the full amount of data requested, causing the
program to fail only sporadically."

Change-Id: I7d7c62836f2037f0cbb4bb0708bd4f034a22a2fc
pache/harmony/security/provider/cert/X509CertFactoryImpl.java
pache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java
pache/harmony/xnet/provider/jsse/CertificateRequest.java
pache/harmony/xnet/provider/jsse/ClientHello.java
pache/harmony/xnet/provider/jsse/ClientKeyExchange.java
pache/harmony/xnet/provider/jsse/ServerHello.java
5e8d3957944a24ac8068e3faf7cfe1dc4f69b962 25-Feb-2011 Elliott Hughes <enh@google.com> Fix more FindBugs warnings: SIC_INNER_SHOULD_BE_STATIC.

"This class is an inner class, but does not use its embedded reference to
the object which created it."

Change-Id: I975a29744e334ace8604c2ebb70ceee7e731b0a9
ml/sax/helpers/XMLReaderAdapter.java
196f44e24830d0e7fd17eba627704a162eba779e 25-Feb-2011 Elliott Hughes <enh@google.com> Fix more FindBugs warnings: DMI_INVOKING_HASHCODE_ON_ARRAY.

"The code invokes hashCode on an array."

Change-Id: Ib47f878fd42a56fdcdb46b83fd8a4f528af2a534
pache/harmony/security/x509/AlgorithmIdentifier.java
pache/harmony/security/x509/Extension.java
pache/harmony/security/x509/GeneralName.java
pache/harmony/security/x509/TBSCertList.java
b16edf548fa6bb9cd93b238e7820bc92195e5e2f 25-Feb-2011 Elliott Hughes <enh@google.com> Fix more FindBugs warnings: BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS.

"The equals(Object o) method shouldn't make any assumptions about the type
of o. It should simply return false if o is not the same type as this."

Change-Id: Ib16eb57e8876ec117634b4c9b069a4dccc61c657
pache/harmony/xnet/provider/jsse/AbstractSessionContext.java
pache/harmony/xnet/provider/jsse/ByteArray.java
pache/harmony/xnet/provider/jsse/ClientSessionContext.java
pache/harmony/xnet/provider/jsse/IndexedPKIXParameters.java
8216dc1fd9d31867770439985c3d66570330e4c7 23-Feb-2011 Elliott Hughes <enh@google.com> Remove most of our remaining non-API StringBuffer usage.

Change-Id: Ia2c621d8a9dfe04cd55aac652d1ac9ea4398afd1
pache/harmony/security/x501/AttributeTypeAndValue.java
pache/harmony/security/x501/AttributeValue.java
pache/harmony/security/x501/Name.java
pache/harmony/security/x509/AlgorithmIdentifier.java
pache/harmony/security/x509/AlternativeName.java
pache/harmony/security/x509/AuthorityKeyIdentifier.java
pache/harmony/security/x509/BasicConstraints.java
pache/harmony/security/x509/CRLDistributionPoints.java
pache/harmony/security/x509/CRLNumber.java
pache/harmony/security/x509/Certificate.java
pache/harmony/security/x509/CertificateIssuer.java
pache/harmony/security/x509/CertificateList.java
pache/harmony/security/x509/CertificatePolicies.java
pache/harmony/security/x509/DistributionPoint.java
pache/harmony/security/x509/DistributionPointName.java
pache/harmony/security/x509/ExtendedKeyUsage.java
pache/harmony/security/x509/Extension.java
pache/harmony/security/x509/ExtensionValue.java
pache/harmony/security/x509/Extensions.java
pache/harmony/security/x509/GeneralNames.java
pache/harmony/security/x509/GeneralSubtree.java
pache/harmony/security/x509/InfoAccessSyntax.java
pache/harmony/security/x509/InhibitAnyPolicy.java
pache/harmony/security/x509/InvalidityDate.java
pache/harmony/security/x509/IssuingDistributionPoint.java
pache/harmony/security/x509/KeyUsage.java
pache/harmony/security/x509/NameConstraints.java
pache/harmony/security/x509/PolicyConstraints.java
pache/harmony/security/x509/PolicyInformation.java
pache/harmony/security/x509/ReasonCode.java
pache/harmony/security/x509/ReasonFlags.java
pache/harmony/security/x509/SubjectKeyIdentifier.java
pache/harmony/security/x509/TBSCertList.java
pache/harmony/security/x509/TBSCertificate.java
pache/harmony/security/x509/Utils.java
a7ef55258ac71153487357b861c7639d627df82f 22-Feb-2011 Elliott Hughes <enh@google.com> Simplify internal libcore logging.

Expose LOGE and friends for use from Java. This is handy because it lets me use
printf debugging even when I've broken String or CharsetEncoder or something
equally critical. It also lets us remove internal use of java.util.logging,
which is slow and ugly.

I've also changed Thread.suspend/resume/stop to actually throw
UnsupportedOperationException rather than just logging one and otherwise
doing nothing.

Bug: 3477960
Change-Id: I0c3f804b1a978bf9911cb4a9bfd90b2466f8798f
pache/harmony/luni/internal/net/www/protocol/http/HttpHeaders.java
pache/harmony/xml/ExpatParser.java
cfb6bd546b6a1443de313fb0abd17c2ad8c9f09f 18-Feb-2011 Jesse Wilson <jessewilson@google.com> Merge "Remove low-hanging fruit from zygote heap." into dalvik-dev
21f21e9f56ab8c9abfd8728473533fcaafafeac0 18-Feb-2011 Jesse Wilson <jessewilson@google.com> Remove low-hanging fruit from zygote heap.

Change-Id: If6b5e61089140e99babdebd5036b9c9f4ef0c1f3
pache/harmony/security/asn1/BerInputStream.java
pache/harmony/xnet/provider/jsse/IndexedPKIXParameters.java
6aa068b481cc4cca7765ce90fdf32f3eb2b5a77c 18-Feb-2011 Elliott Hughes <enh@google.com> Fix various FindBugs warnings.

Only the ChunkHandler and ZoneInfo ones were real bugs. The former is only
called with one input value that doesn't exercise the bug, and the latter
would cause us to think that a time zone that stopped using daylight time
before 1970 was still using daylight time (which would defeat various
optimizations, but should otherwise be harmless).

The other stuff is trivia not worth individual changes.

Change-Id: Ib0752560cd16edc6538d1fc2b234451a66d48171
pache/harmony/lang/annotation/AnnotationFactory.java
pache/harmony/luni/lang/reflect/GenericSignatureParser.java
pache/harmony/luni/lang/reflect/ListOfVariables.java
pache/harmony/xnet/provider/jsse/SSLSocketInputStream.java
ml/sax/helpers/XMLReaderFactory.java
5558f048777e00c8ecb389482b947bea4a1fd589 18-Feb-2011 Elliott Hughes <enh@google.com> Fix a FindBugs warning in ImplForVariable.

FindBugs pointed out that if we ever took the "if" that was marked with a
FIXME, we'd throw a NullPointerException. Which makes it more likely that
the FIXME's suggestion of throwing AssertionError is a good one. Done.

Change-Id: I0d62450860555b37381a9b81c0a9babe79a7acce
pache/harmony/luni/lang/reflect/GenericSignatureParser.java
pache/harmony/luni/lang/reflect/ImplForVariable.java
cd5770741b91e7957e893582cc7d6cd37c8ad568 17-Feb-2011 Elliott Hughes <enh@google.com> Fix NativeCrypto FindBugs warnings.

Change-Id: I102367575b1257582bb20c659223e3f02650fda4
pache/harmony/xnet/provider/jsse/NativeCrypto.java
8e9f4948e08c238998b44228ee30aea9d57a7573 17-Feb-2011 Elliott Hughes <enh@google.com> Tidy nio->io charset name conversion.

Change-Id: I60fa7540ecaff49486985f90098f7cb9157aa9cd
pache/harmony/luni/util/HistoricalNamesUtil.java
aa37e2512b13deab2e82800c71327dd74c362577 17-Feb-2011 Elliott Hughes <enh@google.com> Move SneakyThrow to libcore.util.

Change-Id: Ibd3dc18cf8352ee259b3665bcdc80a13842acb64
pache/harmony/luni/util/SneakyThrow.java
81a1715404ffd60fee3457865f3c89d1020f4a1c 17-Feb-2011 Elliott Hughes <enh@google.com> Merge "Tidy up the bidi code a little." into dalvik-dev
bb1c04167bdff1939e9e71ed04c57337d4951008 17-Feb-2011 Elliott Hughes <enh@google.com> Tidy up the bidi code a little.

If we do ever use this, we should probably kill the run class completely; we
don't expose it to callers, and we could easily cope with a simple int[]
internally.

Change-Id: Ic03fbf7e56251a35b5db31509fbca15ab6d6f01a
pache/harmony/text/BidiRun.java
pache/harmony/text/NativeBidi.java
dbe726cf316481c0e0b4c60a411730fb423266df 17-Feb-2011 Elliott Hughes <enh@google.com> Remove an unused class.

Change-Id: Ie328c31e0cbedb2e282270f9688edd85689679bb
pache/harmony/kernel/vm/VM.java
6d82ce5d35a5e84aedf08528fd98b849f3f565a6 15-Feb-2011 Elliott Hughes <enh@google.com> Move ZoneInfo and ZoneInfoDB into libcore.util.

Change-Id: I91385512ec27aa2aebdc163ae204e542efa58f21
pache/harmony/luni/internal/util/ZoneInfo.java
pache/harmony/luni/internal/util/ZoneInfoDB.java
65c53ceda4279ee7c19cf42d7c265cd601340ca0 15-Feb-2011 Elliott Hughes <enh@google.com> Improve TimeZone's behavior for "pre-historic" dates.

By pre-historic I mean "before the beginning of our table of transitions". It's
not entirely obvious what the right behavior is, but it's pretty obvious that
our old behavior was unhelpful and inconsistent. This is an attempt at a
reasonable semantics, backed by tests.

Also add a test for an unrelated TimeZone bug (already fixed).

Bug: http://code.google.com/p/android/issues/detail?id=14395
Bug: http://code.google.com/p/android/issues/detail?id=11918
Change-Id: I230ab21f9a38e37d6d0a44f97d5a8ac8b01df7d9
pache/harmony/luni/internal/util/ZoneInfo.java
pache/harmony/luni/internal/util/ZoneInfoDB.java
6017a82e369f3f616c3da7434a56d3c596c6083f 11-Feb-2011 Jesse Wilson <jessewilson@google.com> Merge "Move tests from java.injected into libcore." into dalvik-dev
3a3511edad46420b4287017ac66fe4783cb804db 11-Feb-2011 Jesse Wilson <jessewilson@google.com> Move tests from java.injected into libcore.

Change-Id: Ia3fee27c8f8ca38120eea3fc2582d3e1b2504cea
pache/harmony/xnet/provider/jsse/ClientSessionContext.java
pache/harmony/xnet/provider/jsse/FileClientSessionCache.java
c729e213248a11cce7a186c559cee78afff91837 11-Feb-2011 Jesse Wilson <jessewilson@google.com> Rely on string to do case mapping.

The motivation for this is to remove the only test in our
java-internal directory.

Change-Id: Ieb138f5cb4698cf117ab4fb2d21b800af9756873
pache/harmony/archive/util/Util.java
56099d23fcb002b164bff8fb7f14d6ec0453509e 09-Feb-2011 Jesse Wilson <jessewilson@google.com> Remove redundant URL encoders and decoders.

http://b/3436051
http://b/2753295

Change-Id: I5836eab395214767efa4a3d8e8002cff72738854
pache/harmony/luni/internal/net/www/protocol/file/FileURLConnection.java
pache/harmony/luni/internal/net/www/protocol/jar/JarURLConnectionImpl.java
pache/harmony/luni/util/Util.java
26ce8fbd8fe488cc969b08f64c56525662763dc4 08-Feb-2011 Jesse Wilson <jessewilson@google.com> resolved conflicts for merge of 6186821c to dalvik-dev

Change-Id: Ic6f0172767d6feedb188d3a5e7488a67702ef8c4
6186821cb13f4ac7ff50950c813394367e021eae 08-Feb-2011 Jesse Wilson <jessewilson@google.com> Move libcore.base classes to libcore.util and libcore.io.

Change-Id: I2340a9dbad3561fa681a8ab47d4f406e72c913e3
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/util/ZoneInfo.java
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/util/Base64.java
pache/harmony/security/asn1/DerOutputStream.java
pache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java
pache/harmony/xml/dom/ElementImpl.java
pache/harmony/xml/dom/InnerNodeImpl.java
pache/harmony/xnet/provider/jsse/ClientHello.java
pache/harmony/xnet/provider/jsse/ClientKeyExchange.java
pache/harmony/xnet/provider/jsse/DigitalSignature.java
pache/harmony/xnet/provider/jsse/KeyManagerFactoryImpl.java
pache/harmony/xnet/provider/jsse/Logger.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/SSLServerSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/SSLSessionImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java
ml/sax/ext/Attributes2Impl.java
efb32502d686b06ddf60828d9abe3d4e0577e5dc 02-Feb-2011 Brian Carlstrom <bdc@google.com> am 4155a249: Performance improvements to NativeCrypto based MessageDigest API

* commit '4155a2498a57fb09e92815f8993a70c216ddc5ec':
Performance improvements to NativeCrypto based MessageDigest API
6ed93fa8be996378e766d3fd2586b51c6fe656b1 02-Feb-2011 Jesse Wilson <jessewilson@google.com> Don't parse or format IP addresses in cert code.

We used to include a full IP address parser and formatter. The
formatter handled one interesting case: a 2x length byte[]
containing both an IP route and mask. Although our code supported
parsing and formatting these, they do not occur in practice. The
Java APIs don't support NameConstraints, which is the only part of
the spec that uses them.

Change-Id: I7a4b22b40a37d6f26ec09fc5188ec1ba43e4d249
http://b/3385492
pache/harmony/security/x509/GeneralName.java
4155a2498a57fb09e92815f8993a70c216ddc5ec 02-Feb-2011 Brian Carlstrom <bdc@google.com> Performance improvements to NativeCrypto based MessageDigest API

NativeCrypto API improvements:
- Move to using EVP_MD related native methods, some of which are derived
from the EVP_MD_CTX versions with similar name. The new
EVP_get_digestbyname allows one time lookup of the EVP_MD from the
string name, avoiding doing it on every call to EVP_DigestInit.
- EVP_MD_CTX_create is now removed, it is just done as part of
EVP_DigestInit and EVP_VerifyInit to an extra JNI call.
- EVP_DigestFinal now destroys the EVP_MD_CTX to avoid needing to make
another call JNI call to EVP_MD_CTX_destroy. EVP_MD_CTX_destroy is
kept for cases when EVP_DigestFinal is never called.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java

In addition to the improved NativeCrypto API to allow better
performance for callers, the implementations use of
throwExceptionIfNecessary was made conditional based on the status
code from various operations, which had a noticeable impact on
performance compared to android.security.MessageDigest

luni/src/main/native/NativeCrypto.cpp

Updated MessageDigest.getInstance default implementation to use new
NativeCrypto API. An EVP_MD instance is looked up at class load time
for a specific digest type and then used to call
NativeCrypto.EVP_DigestInit as needed, avoiding a lookup of EVP_MD for
each new digest. The EVP_MD is also for a one-time lookup the digest
output size in bytes, to avoid native calls for
engineGetDigestLength. Finally, the creation of the EVP_MD_CTX is now
lazy, only created when needed, avoiding unnecessarily create/free in
reset cases such as engineDigest. See also external/bouncycastle's
OpenSSLDigest implementation which had similar optimizations.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLMessageDigestJDK.java

OpenSSLSignature also used EVP_MD_CTX_create, and its EVP_VerifyInit
was changed similar to EVP_DigestInit to internally allocate the
EVP_MD_CTX on the call to init.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSignature.java

Fix test to work with arbitrary provider order

luni/src/test/java/org/apache/harmony/security/tests/java/security/MessageDigest2Test.java

Fix CloseGuard warnings

luni/src/test/java/tests/security/MessageDigestTest.java

Bug: 3392028
Change-Id: Idb266ebc0918ffd5550e0f457784256400cd2ff0
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLMessageDigestJDK.java
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
c0779d54195b5b81be9c29e1b46a18022758ef27 31-Jan-2011 Brian Carlstrom <bdc@google.com> am c906eaf2: am 7374d4fa: am 90ff8e2c: Remember intermediate CAs in TrustMangerImpl\'s IndexedPKIXParameters

* commit 'c906eaf2617d6c8f9eb7a3578386845da390956c':
Remember intermediate CAs in TrustMangerImpl's IndexedPKIXParameters
c906eaf2617d6c8f9eb7a3578386845da390956c 31-Jan-2011 Brian Carlstrom <bdc@google.com> am 7374d4fa: am 90ff8e2c: Remember intermediate CAs in TrustMangerImpl\'s IndexedPKIXParameters

* commit '7374d4fa11bad613cb64938c2f189d7907d5b6f8':
Remember intermediate CAs in TrustMangerImpl's IndexedPKIXParameters
90ff8e2c017c4332686ff79ea9968a009a703b7e 30-Jan-2011 Brian Carlstrom <bdc@google.com> Remember intermediate CAs in TrustMangerImpl's IndexedPKIXParameters

Bug: 3404902
Change-Id: I4a3c35fd2981933c255e5d3a620675b9575083d4
pache/harmony/xnet/provider/jsse/IndexedPKIXParameters.java
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
750d24b13461035a89c9af8ec7555588da1cc3d0 27-Jan-2011 Elliott Hughes <enh@google.com> Better tests for Float.parseFloat/Double.parseDouble, plus some fixes.

I'm not happy with the magic 1024s, and I had hoped to have one hack to
cover both harmony bugs. But this passes all our existing tests, all
harmony's existing tests, and the new tests I wrote while looking at
the code. (The new tests all pass on the RI too.)

I've also made a few doc comments slightly less unclear.

Change-Id: Ib72fd20bb3b157c7db5a09913247eed3cc746a2e
pache/harmony/luni/util/FloatingPointParser.java
8899157a607a6bfd4ca4f361c77db8726885e47b 26-Jan-2011 Elliott Hughes <enh@google.com> Minor float/double parsing improvements.

This removes some duplication and fixes an actual bug: we'd accept strings
like ".NaN" or "Infinity." because the length check was done incorrectly.

Also add explicit unit tests for some Double.toString duplicate bug reports,
since that ought to be SOP.

(I'm here to fix an unrelated bug, but want to keep this cleanup separate.)

Change-Id: I197613afe52fae8da7a1598bb6b43514dcc03b98
pache/harmony/luni/util/FloatingPointParser.java
4885c704f5dba084fc8abc80be390025810aa9ca 25-Jan-2011 Brian Carlstrom <bdc@google.com> am e7291d0d: am c009a7d9: am 1c64b3ad: SSLSocket.close() should not throw an IOException if there is a problem sending a close notify

* commit 'e7291d0d02c84ff650cd50297a348f61fe4978b6':
SSLSocket.close() should not throw an IOException if there is a problem sending a close notify
5e8b7db626a67fa45434edd228bbf7ff247aee3f 25-Jan-2011 Jesse Wilson <jessewilson@google.com> Merge "Use generics in Harmony's ASN.1, X.501 and X.509." into dalvik-dev
5c27fb80ffd335aa45dc8829ba3ecbc18c01e4e8 25-Jan-2011 Jesse Wilson <jessewilson@google.com> Use generics in Harmony's ASN.1, X.501 and X.509.

This change cleans up this code and uses modern Java idioms. It should not
change the behavior.

Change-Id: Ie869ced7c9e18634409ae194aa9a2c2a5e5ca530
pache/harmony/security/asn1/ASN1Any.java
pache/harmony/security/asn1/ASN1BitString.java
pache/harmony/security/asn1/ASN1Boolean.java
pache/harmony/security/asn1/ASN1Choice.java
pache/harmony/security/asn1/ASN1Constructed.java
pache/harmony/security/asn1/ASN1Constructured.java
pache/harmony/security/asn1/ASN1Enumerated.java
pache/harmony/security/asn1/ASN1Exception.java
pache/harmony/security/asn1/ASN1Explicit.java
pache/harmony/security/asn1/ASN1GeneralizedTime.java
pache/harmony/security/asn1/ASN1Implicit.java
pache/harmony/security/asn1/ASN1Integer.java
pache/harmony/security/asn1/ASN1OctetString.java
pache/harmony/security/asn1/ASN1Oid.java
pache/harmony/security/asn1/ASN1OpenType.java
pache/harmony/security/asn1/ASN1Primitive.java
pache/harmony/security/asn1/ASN1Sequence.java
pache/harmony/security/asn1/ASN1SequenceOf.java
pache/harmony/security/asn1/ASN1Set.java
pache/harmony/security/asn1/ASN1SetOf.java
pache/harmony/security/asn1/ASN1StringType.java
pache/harmony/security/asn1/ASN1Time.java
pache/harmony/security/asn1/ASN1Type.java
pache/harmony/security/asn1/ASN1TypeCollection.java
pache/harmony/security/asn1/ASN1UTCTime.java
pache/harmony/security/asn1/ASN1ValueCollection.java
pache/harmony/security/asn1/BerInputStream.java
pache/harmony/security/asn1/BerOutputStream.java
pache/harmony/security/asn1/BitString.java
pache/harmony/security/asn1/DerInputStream.java
pache/harmony/security/asn1/DerOutputStream.java
pache/harmony/security/asn1/InformationObjectSet.java
pache/harmony/security/asn1/ObjectIdentifier.java
pache/harmony/security/pkcs10/CertificationRequest.java
pache/harmony/security/pkcs10/CertificationRequestInfo.java
pache/harmony/security/pkcs7/AuthenticatedAttributes.java
pache/harmony/security/pkcs7/ContentInfo.java
pache/harmony/security/pkcs7/SignedData.java
pache/harmony/security/pkcs7/SignerInfo.java
pache/harmony/security/pkcs8/PrivateKeyInfo.java
pache/harmony/security/provider/cert/X509CertFactoryImpl.java
pache/harmony/security/provider/cert/X509CertImpl.java
pache/harmony/security/provider/cert/X509CertPathImpl.java
pache/harmony/security/utils/JarUtils.java
pache/harmony/security/x501/AttributeType.java
pache/harmony/security/x501/AttributeTypeAndValue.java
pache/harmony/security/x501/AttributeValue.java
pache/harmony/security/x501/Attributes.java
pache/harmony/security/x501/DirectoryString.java
pache/harmony/security/x501/Name.java
pache/harmony/security/x509/AccessDescription.java
pache/harmony/security/x509/AlgorithmIdentifier.java
pache/harmony/security/x509/AlternativeName.java
pache/harmony/security/x509/AuthorityKeyIdentifier.java
pache/harmony/security/x509/BasicConstraints.java
pache/harmony/security/x509/CRLDistributionPoints.java
pache/harmony/security/x509/CRLNumber.java
pache/harmony/security/x509/Certificate.java
pache/harmony/security/x509/CertificateIssuer.java
pache/harmony/security/x509/CertificateList.java
pache/harmony/security/x509/CertificatePolicies.java
pache/harmony/security/x509/DNParser.java
pache/harmony/security/x509/DistributionPoint.java
pache/harmony/security/x509/DistributionPointName.java
pache/harmony/security/x509/EDIPartyName.java
pache/harmony/security/x509/ExtendedKeyUsage.java
pache/harmony/security/x509/Extension.java
pache/harmony/security/x509/ExtensionValue.java
pache/harmony/security/x509/Extensions.java
pache/harmony/security/x509/GeneralName.java
pache/harmony/security/x509/GeneralNames.java
pache/harmony/security/x509/GeneralSubtree.java
pache/harmony/security/x509/GeneralSubtrees.java
pache/harmony/security/x509/InfoAccessSyntax.java
pache/harmony/security/x509/InhibitAnyPolicy.java
pache/harmony/security/x509/InvalidityDate.java
pache/harmony/security/x509/IssuingDistributionPoint.java
pache/harmony/security/x509/KeyUsage.java
pache/harmony/security/x509/NameConstraints.java
pache/harmony/security/x509/ORAddress.java
pache/harmony/security/x509/OtherName.java
pache/harmony/security/x509/PolicyConstraints.java
pache/harmony/security/x509/PolicyInformation.java
pache/harmony/security/x509/PolicyQualifierInfo.java
pache/harmony/security/x509/PrivateKeyUsagePeriod.java
pache/harmony/security/x509/ReasonCode.java
pache/harmony/security/x509/ReasonFlags.java
pache/harmony/security/x509/SubjectKeyIdentifier.java
pache/harmony/security/x509/SubjectPublicKeyInfo.java
pache/harmony/security/x509/TBSCertList.java
pache/harmony/security/x509/TBSCertificate.java
pache/harmony/security/x509/Time.java
pache/harmony/security/x509/Utils.java
pache/harmony/security/x509/Validity.java
pache/harmony/security/x509/X509PublicKey.java
be57694064c2271ffceb96d13875e34019e73348 25-Jan-2011 Owen Lin <owenlin@google.com> resolved conflicts for merge of 21b8960a to dalvik-dev

Change-Id: Ide01710e59fc6028f4b2443afee85204815dc775
e7291d0d02c84ff650cd50297a348f61fe4978b6 25-Jan-2011 Brian Carlstrom <bdc@google.com> am c009a7d9: am 1c64b3ad: SSLSocket.close() should not throw an IOException if there is a problem sending a close notify

* commit 'c009a7d975c70e31f0a5e9eb7b404195823d93a4':
SSLSocket.close() should not throw an IOException if there is a problem sending a close notify
1c64b3adb85345659ac60ad82216268acba18764 24-Jan-2011 Brian Carlstrom <bdc@google.com> SSLSocket.close() should not throw an IOException if there is a problem sending a close notify

Bug: 3350645
Change-Id: I23844fc94a26175247538c95d8cddec90f368d64
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
21b8960a3603018081ec3309cc54aa8d27164454 24-Jan-2011 Owen Lin <owenlin@google.com> am ae5bfd1b: am eb05c75f: Merge "Skip bytes by reading if the file is not seekable." into honeycomb

* commit 'ae5bfd1b0d665233a1e6e2b7da7d4cf872a91d8d':
Skip bytes by reading if the file is not seekable.
eb05c75f33355d9549834d843911ba836d051d52 24-Jan-2011 Owen Lin <owenlin@google.com> Merge "Skip bytes by reading if the file is not seekable." into honeycomb
08eee0f04268acee9d7f1cb8635a2c6ccd3bac51 21-Jan-2011 Jesse Wilson <jessewilson@google.com> am 980c8fb5: resolved conflicts for merge of e1c91159 to master

* commit '980c8fb5294de36c96713500703e5aee0120ade5':
Handle the CacheResponse returning a null body.
980c8fb5294de36c96713500703e5aee0120ade5 21-Jan-2011 Jesse Wilson <jessewilson@google.com> resolved conflicts for merge of e1c91159 to master

Change-Id: I7f6968670040b1dabfa9220baaae64abb9fcf40b
0de447809731c0b76654416d17bb0d8744dcf742 21-Jan-2011 Elliott Hughes <enh@google.com> Merge "Add an @hidden Byte.toHexString that does the right thing, and use it." into dalvik-dev
4b25199bc0b7a64a6feaa60e7d5d6b0474341234 21-Jan-2011 Elliott Hughes <enh@google.com> Add an @hidden Byte.toHexString that does the right thing, and use it.

Turns out most callers don't actually give a toss about case anyway, since
they're just for debugging output.

Bug: 3371169
Change-Id: Ib8dc079be2dcbf6f2415ecb9b71d034ee71f68eb
pache/harmony/security/utils/Array.java
pache/harmony/security/x509/GeneralName.java
pache/harmony/xnet/provider/jsse/HandshakeIODataStream.java
pache/harmony/xnet/provider/jsse/Logger.java
2932bab4ee385a107734e2a00010df3b89eda590 21-Jan-2011 Brian Carlstrom <bdc@google.com> am 42b5b3b2: am f8cff2f7: am 57537553: Defend against null directory list in FileClientSessionCache

* commit '42b5b3b2f9d984a710388a7152bbbfabf48b9138':
Defend against null directory list in FileClientSessionCache
42b5b3b2f9d984a710388a7152bbbfabf48b9138 21-Jan-2011 Brian Carlstrom <bdc@google.com> am f8cff2f7: am 57537553: Defend against null directory list in FileClientSessionCache

* commit 'f8cff2f759dd794cbeaec079501548eb8fcf50f6':
Defend against null directory list in FileClientSessionCache
afd9b157f467b7c4f2f0b5592dca72f18d844602 20-Jan-2011 Jesse Wilson <jessewilson@google.com> Handle the CacheResponse returning a null body.

Change-Id: I45c4d6b7cac5cabd8c42f5e17d110fb5b3ecc9cc
http://b/3373699
pache/harmony/luni/internal/net/www/protocol/http/AbstractHttpInputStream.java
57537553cb179690f40debdf1132f5ed02aa4ae3 20-Jan-2011 Brian Carlstrom <bdc@google.com> Defend against null directory list in FileClientSessionCache

Bug: 3363561
Change-Id: Idc45f7ed85d4e2a78078f06f4d9bbf903efdac69
pache/harmony/xnet/provider/jsse/FileClientSessionCache.java
0f524004b71b732c888d10eab57008bc65d8a3e0 20-Jan-2011 Owen Lin <owenlin@google.com> Skip bytes by reading if the file is not seekable.

And also add unit test for FileInputStream.skip() for a pipe.

bug: 3298498

Change-Id: Iceecdd42654700e00f15b53759a3761e1c4da943
pache/harmony/luni/platform/IFileSystem.java
5d0cc20dcd910199ba613d912d9dad4876152930 20-Jan-2011 Jesse Wilson <jessewilson@google.com> am d63ca955: am 0e6ef4e7: am d5d70a00: Merge "Fix URL character bugs by adding yet another encoder." into honeycomb

* commit 'd63ca955dca5eaa786666e9d4d9b4e97ceb049ad':
Fix URL character bugs by adding yet another encoder.
d63ca955dca5eaa786666e9d4d9b4e97ceb049ad 20-Jan-2011 Jesse Wilson <jessewilson@google.com> am 0e6ef4e7: am d5d70a00: Merge "Fix URL character bugs by adding yet another encoder." into honeycomb

* commit '0e6ef4e70f9521ed475f6898055ac740cef2770e':
Fix URL character bugs by adding yet another encoder.
d1b5e5da828434388e486a388710d21e4306dae0 20-Jan-2011 Jesse Wilson <jessewilson@google.com> Fix URL character bugs by adding yet another encoder.

We don't have an encoder that ignores already escaped
characters.

Change-Id: I9ff080ad1745136b7d7313d78af2b0ca1785b200
http://b/3360947
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
a4a517c05815ce95849e1007d6e126dc3bcc0091 14-Jan-2011 Brian Carlstrom <bdc@google.com> Merge "GeneralName toLowerCase should use Locale.US" into dalvik-dev
fe921473907c2388cf13d014dd3bcf32d2b6d04a 13-Jan-2011 Brian Carlstrom <bdc@google.com> GeneralName toLowerCase should use Locale.US

Bug: 3325637
Change-Id: I8fbbb18debc3c288240d1dde12d032ed583e7cbe
pache/harmony/security/x509/GeneralName.java
fb0ec0e650bf8be35acb0d47da0311a7c446aa33 14-Jan-2011 Elliott Hughes <enh@google.com> Remove useless android-changed comments.

I've changed useful ones to regular comments or TODOs, as appropriate.

I've left ones in code like java.util.concurrent where we really are
tracking an upstream source, making the change markers useful.

I've left a handful of others where I intend to actually investigate
the implied TODOs before deciding how to resolve them.

Change-Id: Iaf71059b818596351cf8ee5a3cf3c85586051fa6
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSFileSystem.java
pache/harmony/luni/util/DeleteOnExit.java
pache/harmony/security/asn1/ASN1Integer.java
pache/harmony/security/asn1/ObjectIdentifier.java
pache/harmony/security/fortress/Services.java
pache/harmony/security/pkcs7/SignerInfo.java
pache/harmony/security/provider/cert/Cache.java
pache/harmony/security/provider/crypto/RandomBitsSupplier.java
pache/harmony/security/utils/AlgNameMapper.java
pache/harmony/security/utils/JarUtils.java
pache/harmony/security/x501/AttributeTypeAndValue.java
pache/harmony/security/x509/GeneralName.java
pache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
pache/harmony/xnet/provider/jsse/KeyManagerImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLContextImpl.java
pache/harmony/xnet/provider/jsse/SSLInputStream.java
pache/harmony/xnet/provider/jsse/SSLParametersImpl.java
pache/harmony/xnet/provider/jsse/SSLSessionImpl.java
pache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
pache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java
ml/sax/ext/Attributes2Impl.java
2feeee4119506ed1511942f80fc2f7eb431afab7 13-Jan-2011 Elliott Hughes <enh@google.com> Remove non-API uses of Vector.

Change-Id: I27902950af0349619f4cb826d41db8926df0d34a
pache/harmony/xnet/provider/jsse/CertificateMessage.java
pache/harmony/xnet/provider/jsse/CertificateRequest.java
pache/harmony/xnet/provider/jsse/HandshakeProtocol.java
pache/harmony/xnet/provider/jsse/KeyManagerImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/SSLSessionImpl.java
ml/sax/helpers/AttributeListImpl.java
ml/sax/helpers/NamespaceSupport.java
ml/sax/helpers/ParserAdapter.java
118abc3050371812703e4fabf03f4399d01fb28c 13-Jan-2011 Elliott Hughes <enh@google.com> Kill most users of StringTokenizer.

I've left a handful that actually make some use of it, in classes we
don't care about anyway (XML preferences and the like).

Change-Id: I754262ee600d8a16046b537a6d6258db849db89b
pache/harmony/security/fortress/DefaultPolicyParser.java
78e3320540c8bdcbefba5ae1222ee18f6679ab33 13-Jan-2011 Elliott Hughes <enh@google.com> Most callers of toLowerCase/toUpperCase should pass Locale.US to avoid problems in Turkey.

Some callers should be replaced with equalsIgnoreCase instead.

The one exception is StreamTokenizer, where the RI uses the default
locale, which is arguably the right thing to do. No-one cares because
that's legacy API, but I've added a test anyway.

I've left HttpCookie and GeneralName for my co-conspirators because the
appropriate resolutions aren't as obvious there...

Bug: 3325637
Change-Id: Ia37a1caaa91b11763ae43e61e445adb45c30f793
pache/harmony/luni/util/FloatingPointParser.java
pache/harmony/xnet/provider/jsse/HandshakeIODataStream.java
pache/harmony/xnet/provider/jsse/KeyManagerImpl.java
pache/harmony/xnet/provider/jsse/Logger.java
618afdc12b918bd128aec6cf610a54dd4d0bacbb 13-Jan-2011 Jesse Wilson <jessewilson@google.com> am 8b652b16: am 600f780e: am a8b58362: Merge "Fix bugs in toString() in reflection classes." into honeycomb

* commit '8b652b16465e8d3e9afa681d2999febfe10a84b6':
Fix bugs in toString() in reflection classes.
8b652b16465e8d3e9afa681d2999febfe10a84b6 13-Jan-2011 Jesse Wilson <jessewilson@google.com> am 600f780e: am a8b58362: Merge "Fix bugs in toString() in reflection classes." into honeycomb

* commit '600f780e27510687d5935e0b62759f1bfdc1b8e8':
Fix bugs in toString() in reflection classes.
a8b58362c8ee5aaca620854935a60b033b0733a1 13-Jan-2011 Jesse Wilson <jessewilson@google.com> Merge "Fix bugs in toString() in reflection classes." into honeycomb
7281ea4092279f3091ffa3be91a4c66c3b63e080 13-Jan-2011 Jesse Wilson <jessewilson@google.com> Fix bugs in toString() in reflection classes.

Change-Id: Iceba152e1825eb859b23f9eb7463c4ed2e32bac9
http://b/3073292
pache/harmony/luni/lang/reflect/ImplForWildcard.java
3b4d88a6bc4f983acc4f0dec5087d7250d33f714 12-Jan-2011 Elliott Hughes <enh@google.com> Merge "Change all "final static"s to "static final"." into dalvik-dev
c23cf7e4ebd1abd50b0bc5dac7683cd0c8c8bce3 12-Jan-2011 Jesse Wilson <jessewilson@google.com> am a6b80b72: am 99d1e354: am 09c46404: Fix Document.getElementsByTagName to return the root node.

* commit 'a6b80b7219c4d556b56e2de3bde28f276a45e6c9':
Fix Document.getElementsByTagName to return the root node.
0d4ce4227fa818288b8db762b640dfa21e3162f5 12-Jan-2011 Elliott Hughes <enh@google.com> Change all "final static"s to "static final".

Just so we sound like native speakers.

Change-Id: I4d98ec7519af8c1578609945ca9d480484b82874
pache/harmony/kernel/vm/VM.java
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/security/asn1/ASN1GeneralizedTime.java
pache/harmony/security/asn1/ASN1Oid.java
pache/harmony/security/asn1/ASN1UTCTime.java
pache/harmony/security/asn1/DerOutputStream.java
pache/harmony/xnet/provider/jsse/HandshakeProtocol.java
ml/sax/helpers/NamespaceSupport.java
ml/sax/helpers/ParserAdapter.java
a6b80b7219c4d556b56e2de3bde28f276a45e6c9 12-Jan-2011 Jesse Wilson <jessewilson@google.com> am 99d1e354: am 09c46404: Fix Document.getElementsByTagName to return the root node.

* commit '99d1e354bc4faaeac8a6de338c7e56964af030ea':
Fix Document.getElementsByTagName to return the root node.
09c4640423dbe85c606c5b46312cd5c0e5c94eeb 12-Jan-2011 Jesse Wilson <jessewilson@google.com> Fix Document.getElementsByTagName to return the root node.

I introduced this regression when changing Element.getElementsByTagName
to not return itself. Note that one of our tests (GetElementsByTagNameNS)
had the wrong expectation here; the new result is consistent with the RI.

Also fix a related problem in InnerNodeImpl which assumes the document
field is always non-null. It can be null for Doctype nodes!

Change-Id: I40b5bb52b8396cd282cd5465029a9f0c4040de0c
pache/harmony/xml/dom/DocumentImpl.java
pache/harmony/xml/dom/ElementImpl.java
pache/harmony/xml/dom/InnerNodeImpl.java
pache/harmony/xml/dom/NodeImpl.java
c4bce9ccde4168cbbf80c4d4c305b6615d317184 12-Jan-2011 Jesse Wilson <jessewilson@google.com> am b7ccc2d0: Merge "Expand predefined entities by default, even if coalescing is off."

* commit 'b7ccc2d092e8a500f8d646a9ea0c535a1d440956':
Expand predefined entities by default, even if coalescing is off.
b7ccc2d092e8a500f8d646a9ea0c535a1d440956 12-Jan-2011 Jesse Wilson <jessewilson@google.com> Merge "Expand predefined entities by default, even if coalescing is off."
83092fddaf8852029f89ca3bce117d627a6ab68e 11-Jan-2011 Jesse Wilson <jessewilson@google.com> am 18c7f7e1: am e235e372: am a28b4cea: Merge "Fix cloneNode to work when no namespace is set." into honeycomb

* commit '18c7f7e11b45d577785e4fa9730f5c28ccec0f8d':
Fix cloneNode to work when no namespace is set.
18c7f7e11b45d577785e4fa9730f5c28ccec0f8d 11-Jan-2011 Jesse Wilson <jessewilson@google.com> am e235e372: am a28b4cea: Merge "Fix cloneNode to work when no namespace is set." into honeycomb

* commit 'e235e3723884b57d73a8a7279eb21b71ed3bf877':
Fix cloneNode to work when no namespace is set.
0463b62eef5a7e8a477ddf7a972af198e46ecd5f 11-Jan-2011 Jesse Wilson <jessewilson@google.com> Expand predefined entities by default, even if coalescing is off.

Change-Id: I43f0a720e96486a83692a9f08368359f13c875fb
http://b/3341115
pache/harmony/xml/parsers/DocumentBuilderImpl.java
a28b4cea38c9ea8e710404bb1e7593c8ca7ad5cd 11-Jan-2011 Jesse Wilson <jessewilson@google.com> Merge "Fix cloneNode to work when no namespace is set." into honeycomb
9c075bb3e84c6eaafd016cbc1bf69a6e989eedf3 11-Jan-2011 Jesse Wilson <jessewilson@google.com> Fix cloneNode to work when no namespace is set.

Change-Id: I0bcbc79832f06613c82f93c0f8805a43a1cf2094
http://code.google.com/p/android/issues/detail?id=2735
pache/harmony/xml/dom/AttrImpl.java
pache/harmony/xml/dom/DocumentImpl.java
pache/harmony/xml/dom/ElementImpl.java
pache/harmony/xml/dom/NodeImpl.java
b2097e76ab184a863838017ac442b744e7bf7c23 11-Jan-2011 Elliott Hughes <enh@google.com> am 66d9e787: am cbe26f42: am c8dde40c: Merge "Get memory for direct byte buffers from the Java heap rather than the native heap." into honeycomb

* commit '66d9e787af999d3c6b26cfd46e10e0750a5f3e6e':
Get memory for direct byte buffers from the Java heap rather than the native heap.
66d9e787af999d3c6b26cfd46e10e0750a5f3e6e 11-Jan-2011 Elliott Hughes <enh@google.com> am cbe26f42: am c8dde40c: Merge "Get memory for direct byte buffers from the Java heap rather than the native heap." into honeycomb

* commit 'cbe26f42f5b57db71402fbb1955898d3ab79e350':
Get memory for direct byte buffers from the Java heap rather than the native heap.
d3050ebb8f54d45f21df7be979ec090e58ac0029 11-Jan-2011 Jesse Wilson <jessewilson@google.com> am 75582a19: Merge commit \'e80fc1da\' into manualmerge

* commit '75582a192a436f30af115bddf709fa41c544d2e3':
Don't permit DocumentFragments in the node hierarchy.
75582a192a436f30af115bddf709fa41c544d2e3 11-Jan-2011 Jesse Wilson <jessewilson@google.com> Merge commit 'e80fc1da' into manualmerge

Conflicts:
luni/src/main/java/org/apache/harmony/xml/dom/NodeImpl.java

Change-Id: I0e6af0c9b4d0f322e1f74c639707916daa153e71
c8dde40c3c62ceb79fc0b62f445d9a539fd470d3 11-Jan-2011 Elliott Hughes <enh@google.com> Merge "Get memory for direct byte buffers from the Java heap rather than the native heap." into honeycomb
5c0408af32a2b1c78b2d5a93cca60b0fffddd7da 11-Jan-2011 Jesse Wilson <jessewilson@google.com> Don't permit DocumentFragments in the node hierarchy.

Change-Id: Icae3e3e41b4315f975892d5aafeae62d4799036d
http://code.google.com/p/android/issues/detail?id=2735
pache/harmony/xml/dom/DocumentImpl.java
pache/harmony/xml/dom/InnerNodeImpl.java
pache/harmony/xml/dom/NodeImpl.java
3676bd288bce270a51b1c51f1052b76e83e71412 11-Jan-2011 Elliott Hughes <enh@google.com> Get memory for direct byte buffers from the Java heap rather than the native heap.

Since the removal of tracked external allocations, there's been no accounting
of direct byte buffers. This fixes that, and moves us to a much simpler
situation where the GC is responsible for this memory too. It also means that
we don't need finalizers: now only memory-mapped blocks need finalizers (to call
munmap(3)).

Change-Id: I6b43f74074e496eeb2a36b620af19e4926ceb8cf
pache/harmony/luni/platform/OSMemory.java
78d7b70250da7e2baa25c6de0be56696d7a3dc16 11-Jan-2011 Jesse Wilson <jessewilson@google.com> am c99feaab: Merge commit \'763220b4\' into manualmerge

* commit 'c99feaab70680820bdc7e8c36cb1f73402dbd45b':
Fix GetElementsByTagName to not include the element itself.
c99feaab70680820bdc7e8c36cb1f73402dbd45b 11-Jan-2011 Jesse Wilson <jessewilson@google.com> Merge commit '763220b4' into manualmerge

Conflicts:
luni/src/main/java/org/apache/harmony/xml/dom/NodeImpl.java

Change-Id: I9ecdb5fb1ac11a87a70ed659700dd7386e46652f
6a3dda3cd755cb77c7234f3c7bee782d92ceccf7 10-Jan-2011 Jesse Wilson <jessewilson@google.com> Fix GetElementsByTagName to not include the element itself.

Change-Id: I8ee8222cc36c691917a7d48f748f5aeb153b95af
http://code.google.com/p/android/issues/detail?id=2735#c11
pache/harmony/xml/dom/ElementImpl.java
pache/harmony/xml/dom/NamedNodeMapImpl.java
pache/harmony/xml/dom/NodeImpl.java
25c17227e6979687145c102c404084cc2dc367dd 10-Jan-2011 Jesse Wilson <jessewilson@google.com> am 97bfa99b: Merge "Break dependency from libcore to Apache XML libraries."

* commit '97bfa99b73cba7e1d04eb761167c95140c249010':
Break dependency from libcore to Apache XML libraries.
f029395dff382fc4dcba0689fd948ec06644e1f0 10-Jan-2011 Jesse Wilson <jessewilson@google.com> Break dependency from libcore to Apache XML libraries.

Change-Id: I482ba29551423c682696db44f78bc6b74fa04341
http://b/1414929
pache/harmony/xml/dom/DOMConfigurationImpl.java
pache/harmony/xml/dom/DOMErrorImpl.java
pache/harmony/xml/dom/NodeImpl.java
pache/xalan/Version.java
pache/xalan/Version.src
pache/xalan/extensions/ExpressionContext.java
pache/xalan/extensions/ExpressionVisitor.java
pache/xalan/extensions/ExtensionHandler.java
pache/xalan/extensions/ExtensionNamespaceSupport.java
pache/xalan/extensions/ExtensionNamespacesManager.java
pache/xalan/extensions/ExtensionsTable.java
pache/xalan/extensions/ObjectFactory.java
pache/xalan/processor/ProcessorAttributeSet.java
pache/xalan/processor/ProcessorCharacters.java
pache/xalan/processor/ProcessorDecimalFormat.java
pache/xalan/processor/ProcessorExsltFuncResult.java
pache/xalan/processor/ProcessorExsltFunction.java
pache/xalan/processor/ProcessorGlobalParamDecl.java
pache/xalan/processor/ProcessorGlobalVariableDecl.java
pache/xalan/processor/ProcessorImport.java
pache/xalan/processor/ProcessorInclude.java
pache/xalan/processor/ProcessorKey.java
pache/xalan/processor/ProcessorLRE.java
pache/xalan/processor/ProcessorNamespaceAlias.java
pache/xalan/processor/ProcessorOutputElem.java
pache/xalan/processor/ProcessorPreserveSpace.java
pache/xalan/processor/ProcessorStripSpace.java
pache/xalan/processor/ProcessorStylesheetDoc.java
pache/xalan/processor/ProcessorStylesheetElement.java
pache/xalan/processor/ProcessorTemplate.java
pache/xalan/processor/ProcessorTemplateElem.java
pache/xalan/processor/ProcessorText.java
pache/xalan/processor/ProcessorUnknown.java
pache/xalan/processor/StylesheetHandler.java
pache/xalan/processor/TransformerFactoryImpl.java
pache/xalan/processor/WhitespaceInfoPaths.java
pache/xalan/processor/XSLProcessorVersion.src
pache/xalan/processor/XSLTAttributeDef.java
pache/xalan/processor/XSLTElementDef.java
pache/xalan/processor/XSLTElementProcessor.java
pache/xalan/processor/XSLTSchema.java
pache/xalan/processor/package.html
pache/xalan/res/XSLMessages.java
pache/xalan/res/XSLTErrorResources.java
pache/xalan/res/XSLTInfo.properties
pache/xalan/res/package.html
pache/xalan/serialize/SerializerUtils.java
pache/xalan/templates/AVT.java
pache/xalan/templates/AVTPart.java
pache/xalan/templates/AVTPartSimple.java
pache/xalan/templates/AVTPartXPath.java
pache/xalan/templates/AbsPathChecker.java
pache/xalan/templates/Constants.java
pache/xalan/templates/DecimalFormatProperties.java
pache/xalan/templates/ElemApplyImport.java
pache/xalan/templates/ElemApplyTemplates.java
pache/xalan/templates/ElemAttribute.java
pache/xalan/templates/ElemAttributeSet.java
pache/xalan/templates/ElemCallTemplate.java
pache/xalan/templates/ElemChoose.java
pache/xalan/templates/ElemComment.java
pache/xalan/templates/ElemCopy.java
pache/xalan/templates/ElemCopyOf.java
pache/xalan/templates/ElemElement.java
pache/xalan/templates/ElemEmpty.java
pache/xalan/templates/ElemExsltFuncResult.java
pache/xalan/templates/ElemExsltFunction.java
pache/xalan/templates/ElemExtensionCall.java
pache/xalan/templates/ElemExtensionDecl.java
pache/xalan/templates/ElemExtensionScript.java
pache/xalan/templates/ElemFallback.java
pache/xalan/templates/ElemForEach.java
pache/xalan/templates/ElemIf.java
pache/xalan/templates/ElemLiteralResult.java
pache/xalan/templates/ElemMessage.java
pache/xalan/templates/ElemNumber.java
pache/xalan/templates/ElemOtherwise.java
pache/xalan/templates/ElemPI.java
pache/xalan/templates/ElemParam.java
pache/xalan/templates/ElemSort.java
pache/xalan/templates/ElemTemplate.java
pache/xalan/templates/ElemTemplateElement.java
pache/xalan/templates/ElemText.java
pache/xalan/templates/ElemTextLiteral.java
pache/xalan/templates/ElemUnknown.java
pache/xalan/templates/ElemUse.java
pache/xalan/templates/ElemValueOf.java
pache/xalan/templates/ElemVariable.java
pache/xalan/templates/ElemVariablePsuedo.java
pache/xalan/templates/ElemWhen.java
pache/xalan/templates/ElemWithParam.java
pache/xalan/templates/FuncDocument.java
pache/xalan/templates/FuncFormatNumb.java
pache/xalan/templates/FuncKey.java
pache/xalan/templates/KeyDeclaration.java
pache/xalan/templates/NamespaceAlias.java
pache/xalan/templates/OutputProperties.java
pache/xalan/templates/RedundentExprEliminator.java
pache/xalan/templates/Stylesheet.java
pache/xalan/templates/StylesheetComposed.java
pache/xalan/templates/StylesheetRoot.java
pache/xalan/templates/TemplateList.java
pache/xalan/templates/TemplateSubPatternAssociation.java
pache/xalan/templates/VarNameCollector.java
pache/xalan/templates/WhiteSpaceInfo.java
pache/xalan/templates/XMLNSDecl.java
pache/xalan/templates/XSLTVisitable.java
pache/xalan/templates/XSLTVisitor.java
pache/xalan/templates/XUnresolvedVariable.java
pache/xalan/templates/XUnresolvedVariableSimple.java
pache/xalan/templates/package.html
pache/xalan/transformer/ClonerToResultTree.java
pache/xalan/transformer/Counter.java
pache/xalan/transformer/CountersTable.java
pache/xalan/transformer/DecimalToRoman.java
pache/xalan/transformer/KeyIterator.java
pache/xalan/transformer/KeyManager.java
pache/xalan/transformer/KeyTable.java
pache/xalan/transformer/MsgMgr.java
pache/xalan/transformer/NodeSortKey.java
pache/xalan/transformer/NodeSorter.java
pache/xalan/transformer/SerializerSwitcher.java
pache/xalan/transformer/TrAXFilter.java
pache/xalan/transformer/TransformState.java
pache/xalan/transformer/TransformerClient.java
pache/xalan/transformer/TransformerHandlerImpl.java
pache/xalan/transformer/TransformerIdentityImpl.java
pache/xalan/transformer/TransformerImpl.java
pache/xalan/transformer/TreeWalker2Result.java
pache/xalan/transformer/XalanProperties.java
pache/xalan/transformer/XalanTransformState.java
pache/xalan/transformer/package.html
pache/xalan/xslt/EnvironmentCheck.java
pache/xalan/xslt/ObjectFactory.java
pache/xalan/xslt/SecuritySupport.java
pache/xalan/xslt/SecuritySupport12.java
pache/xalan/xslt/package.html
pache/xml/dtm/Axis.java
pache/xml/dtm/DTM.java
pache/xml/dtm/DTMAxisIterator.java
pache/xml/dtm/DTMAxisTraverser.java
pache/xml/dtm/DTMConfigurationException.java
pache/xml/dtm/DTMDOMException.java
pache/xml/dtm/DTMException.java
pache/xml/dtm/DTMFilter.java
pache/xml/dtm/DTMIterator.java
pache/xml/dtm/DTMManager.java
pache/xml/dtm/DTMWSFilter.java
pache/xml/dtm/ObjectFactory.java
pache/xml/dtm/SecuritySupport.java
pache/xml/dtm/SecuritySupport12.java
pache/xml/dtm/ref/ChunkedIntArray.java
pache/xml/dtm/ref/CoroutineManager.java
pache/xml/dtm/ref/DTMAxisIterNodeList.java
pache/xml/dtm/ref/DTMAxisIteratorBase.java
pache/xml/dtm/ref/DTMChildIterNodeList.java
pache/xml/dtm/ref/DTMDefaultBase.java
pache/xml/dtm/ref/DTMDefaultBaseIterators.java
pache/xml/dtm/ref/DTMDefaultBaseTraversers.java
pache/xml/dtm/ref/DTMDocumentImpl.java
pache/xml/dtm/ref/DTMManagerDefault.java
pache/xml/dtm/ref/DTMNamedNodeMap.java
pache/xml/dtm/ref/DTMNodeIterator.java
pache/xml/dtm/ref/DTMNodeList.java
pache/xml/dtm/ref/DTMNodeListBase.java
pache/xml/dtm/ref/DTMNodeProxy.java
pache/xml/dtm/ref/DTMStringPool.java
pache/xml/dtm/ref/DTMTreeWalker.java
pache/xml/dtm/ref/ExpandedNameTable.java
pache/xml/dtm/ref/ExtendedType.java
pache/xml/dtm/ref/IncrementalSAXSource.java
pache/xml/dtm/ref/IncrementalSAXSource_Filter.java
pache/xml/dtm/ref/NodeLocator.java
pache/xml/dtm/ref/SecuritySupport.java
pache/xml/dtm/ref/SecuritySupport12.java
pache/xml/dtm/ref/dom2dtm/DOM2DTM.java
pache/xml/dtm/ref/dom2dtm/DOM2DTMdefaultNamespaceDeclarationNode.java
pache/xml/dtm/ref/sax2dtm/SAX2DTM.java
pache/xml/dtm/ref/sax2dtm/SAX2DTM2.java
pache/xml/dtm/ref/sax2dtm/SAX2RTFDTM.java
pache/xml/res/XMLErrorResources.java
pache/xml/res/XMLMessages.java
pache/xml/serializer/AttributesImplSerializer.java
pache/xml/serializer/CharInfo.java
pache/xml/serializer/DOM3Serializer.java
pache/xml/serializer/DOMSerializer.java
pache/xml/serializer/ElemContext.java
pache/xml/serializer/ElemDesc.java
pache/xml/serializer/EncodingInfo.java
pache/xml/serializer/Encodings.java
pache/xml/serializer/Encodings.properties
pache/xml/serializer/ExtendedContentHandler.java
pache/xml/serializer/ExtendedLexicalHandler.java
pache/xml/serializer/HTMLEntities.properties
pache/xml/serializer/Method.java
pache/xml/serializer/NamespaceMappings.java
pache/xml/serializer/ObjectFactory.java
pache/xml/serializer/OutputPropertiesFactory.java
pache/xml/serializer/OutputPropertyUtils.java
pache/xml/serializer/SecuritySupport.java
pache/xml/serializer/SecuritySupport12.java
pache/xml/serializer/SerializationHandler.java
pache/xml/serializer/Serializer.java
pache/xml/serializer/SerializerBase.java
pache/xml/serializer/SerializerConstants.java
pache/xml/serializer/SerializerFactory.java
pache/xml/serializer/SerializerTrace.java
pache/xml/serializer/SerializerTraceWriter.java
pache/xml/serializer/ToHTMLStream.java
pache/xml/serializer/ToSAXHandler.java
pache/xml/serializer/ToStream.java
pache/xml/serializer/ToTextSAXHandler.java
pache/xml/serializer/ToTextStream.java
pache/xml/serializer/ToUnknownStream.java
pache/xml/serializer/ToXMLSAXHandler.java
pache/xml/serializer/ToXMLStream.java
pache/xml/serializer/TransformStateSetter.java
pache/xml/serializer/TreeWalker.java
pache/xml/serializer/Version.java
pache/xml/serializer/Version.src
pache/xml/serializer/WriterChain.java
pache/xml/serializer/WriterToASCI.java
pache/xml/serializer/WriterToUTF8Buffered.java
pache/xml/serializer/XMLEntities.properties
pache/xml/serializer/XSLOutputAttributes.java
pache/xml/serializer/dom3/DOM3SerializerImpl.java
pache/xml/serializer/dom3/DOM3TreeWalker.java
pache/xml/serializer/dom3/DOMConstants.java
pache/xml/serializer/dom3/DOMErrorHandlerImpl.java
pache/xml/serializer/dom3/DOMErrorImpl.java
pache/xml/serializer/dom3/DOMLocatorImpl.java
pache/xml/serializer/dom3/DOMOutputImpl.java
pache/xml/serializer/dom3/DOMStringListImpl.java
pache/xml/serializer/dom3/LSSerializerImpl.java
pache/xml/serializer/dom3/NamespaceSupport.java
pache/xml/serializer/output_html.properties
pache/xml/serializer/output_text.properties
pache/xml/serializer/output_unknown.properties
pache/xml/serializer/output_xml.properties
pache/xml/serializer/package.html
pache/xml/serializer/utils/AttList.java
pache/xml/serializer/utils/DOM2Helper.java
pache/xml/serializer/utils/Messages.java
pache/xml/serializer/utils/MsgKey.java
pache/xml/serializer/utils/SerializerMessages.java
pache/xml/serializer/utils/SerializerMessages_ca.java
pache/xml/serializer/utils/SerializerMessages_cs.java
pache/xml/serializer/utils/SerializerMessages_de.java
pache/xml/serializer/utils/SerializerMessages_en.java
pache/xml/serializer/utils/SerializerMessages_es.java
pache/xml/serializer/utils/SerializerMessages_fr.java
pache/xml/serializer/utils/SerializerMessages_hu.java
pache/xml/serializer/utils/SerializerMessages_it.java
pache/xml/serializer/utils/SerializerMessages_ja.java
pache/xml/serializer/utils/SerializerMessages_ko.java
pache/xml/serializer/utils/SerializerMessages_pl.java
pache/xml/serializer/utils/SerializerMessages_pt_BR.java
pache/xml/serializer/utils/SerializerMessages_ru.java
pache/xml/serializer/utils/SerializerMessages_sk.java
pache/xml/serializer/utils/SerializerMessages_sl.java
pache/xml/serializer/utils/SerializerMessages_sv.java
pache/xml/serializer/utils/SerializerMessages_tr.java
pache/xml/serializer/utils/SerializerMessages_zh.java
pache/xml/serializer/utils/SerializerMessages_zh_CN.java
pache/xml/serializer/utils/SerializerMessages_zh_TW.java
pache/xml/serializer/utils/StringToIntTable.java
pache/xml/serializer/utils/SystemIDResolver.java
pache/xml/serializer/utils/URI.java
pache/xml/serializer/utils/Utils.java
pache/xml/serializer/utils/WrappedRuntimeException.java
pache/xml/serializer/utils/XML11Char.java
pache/xml/serializer/utils/XMLChar.java
pache/xml/utils/AttList.java
pache/xml/utils/BoolStack.java
pache/xml/utils/Constants.java
pache/xml/utils/DOM2Helper.java
pache/xml/utils/DOMBuilder.java
pache/xml/utils/DOMHelper.java
pache/xml/utils/DOMOrder.java
pache/xml/utils/DefaultErrorHandler.java
pache/xml/utils/FastStringBuffer.java
pache/xml/utils/IntStack.java
pache/xml/utils/IntVector.java
pache/xml/utils/NSInfo.java
pache/xml/utils/NameSpace.java
pache/xml/utils/NamespaceSupport2.java
pache/xml/utils/NodeConsumer.java
pache/xml/utils/NodeVector.java
pache/xml/utils/ObjectFactory.java
pache/xml/utils/ObjectPool.java
pache/xml/utils/ObjectStack.java
pache/xml/utils/ObjectVector.java
pache/xml/utils/PrefixResolver.java
pache/xml/utils/PrefixResolverDefault.java
pache/xml/utils/QName.java
pache/xml/utils/SAXSourceLocator.java
pache/xml/utils/SecuritySupport.java
pache/xml/utils/SecuritySupport12.java
pache/xml/utils/StopParseException.java
pache/xml/utils/StringBufferPool.java
pache/xml/utils/StringToIntTable.java
pache/xml/utils/StringVector.java
pache/xml/utils/StylesheetPIHandler.java
pache/xml/utils/SuballocatedIntVector.java
pache/xml/utils/SystemIDResolver.java
pache/xml/utils/ThreadControllerWrapper.java
pache/xml/utils/TreeWalker.java
pache/xml/utils/URI.java
pache/xml/utils/UnImplNode.java
pache/xml/utils/WrappedRuntimeException.java
pache/xml/utils/XML11Char.java
pache/xml/utils/XMLChar.java
pache/xml/utils/XMLCharacterRecognizer.java
pache/xml/utils/XMLReaderManager.java
pache/xml/utils/XMLString.java
pache/xml/utils/XMLStringDefault.java
pache/xml/utils/XMLStringFactory.java
pache/xml/utils/package.html
pache/xml/utils/res/CharArrayWrapper.java
pache/xml/utils/res/IntArrayWrapper.java
pache/xml/utils/res/LongArrayWrapper.java
pache/xml/utils/res/StringArrayWrapper.java
pache/xml/utils/res/XResourceBundle.java
pache/xml/utils/res/XResourceBundleBase.java
pache/xml/utils/res/XResources_cy.java
pache/xml/utils/res/XResources_de.java
pache/xml/utils/res/XResources_el.java
pache/xml/utils/res/XResources_en.java
pache/xml/utils/res/XResources_es.java
pache/xml/utils/res/XResources_fr.java
pache/xml/utils/res/XResources_he.java
pache/xml/utils/res/XResources_hy.java
pache/xml/utils/res/XResources_it.java
pache/xml/utils/res/XResources_ja_JP_A.java
pache/xml/utils/res/XResources_ja_JP_HA.java
pache/xml/utils/res/XResources_ja_JP_HI.java
pache/xml/utils/res/XResources_ja_JP_I.java
pache/xml/utils/res/XResources_ka.java
pache/xml/utils/res/XResources_ko.java
pache/xml/utils/res/XResources_sv.java
pache/xml/utils/res/XResources_zh_CN.java
pache/xml/utils/res/XResources_zh_TW.java
pache/xpath/Arg.java
pache/xpath/CachedXPathAPI.java
pache/xpath/Expression.java
pache/xpath/ExpressionNode.java
pache/xpath/ExpressionOwner.java
pache/xpath/ExtensionsProvider.java
pache/xpath/FoundIndex.java
pache/xpath/NodeSet.java
pache/xpath/NodeSetDTM.java
pache/xpath/SourceTree.java
pache/xpath/SourceTreeManager.java
pache/xpath/VariableStack.java
pache/xpath/WhitespaceStrippingElementMatcher.java
pache/xpath/XPath.java
pache/xpath/XPathAPI.java
pache/xpath/XPathContext.java
pache/xpath/XPathException.java
pache/xpath/XPathFactory.java
pache/xpath/XPathProcessorException.java
pache/xpath/XPathVisitable.java
pache/xpath/XPathVisitor.java
pache/xpath/axes/AttributeIterator.java
pache/xpath/axes/AxesWalker.java
pache/xpath/axes/BasicTestIterator.java
pache/xpath/axes/ChildIterator.java
pache/xpath/axes/ChildTestIterator.java
pache/xpath/axes/ContextNodeList.java
pache/xpath/axes/DescendantIterator.java
pache/xpath/axes/FilterExprIterator.java
pache/xpath/axes/FilterExprIteratorSimple.java
pache/xpath/axes/FilterExprWalker.java
pache/xpath/axes/HasPositionalPredChecker.java
pache/xpath/axes/IteratorPool.java
pache/xpath/axes/LocPathIterator.java
pache/xpath/axes/MatchPatternIterator.java
pache/xpath/axes/NodeSequence.java
pache/xpath/axes/OneStepIterator.java
pache/xpath/axes/OneStepIteratorForward.java
pache/xpath/axes/PathComponent.java
pache/xpath/axes/PredicatedNodeTest.java
pache/xpath/axes/RTFIterator.java
pache/xpath/axes/ReverseAxesWalker.java
pache/xpath/axes/SelfIteratorNoPredicate.java
pache/xpath/axes/SubContextList.java
pache/xpath/axes/UnionChildIterator.java
pache/xpath/axes/UnionPathIterator.java
pache/xpath/axes/WalkerFactory.java
pache/xpath/axes/WalkingIterator.java
pache/xpath/axes/WalkingIteratorSorted.java
pache/xpath/axes/package.html
pache/xpath/compiler/Compiler.java
pache/xpath/compiler/FunctionTable.java
pache/xpath/compiler/Keywords.java
pache/xpath/compiler/Lexer.java
pache/xpath/compiler/OpCodes.java
pache/xpath/compiler/OpMap.java
pache/xpath/compiler/OpMapVector.java
pache/xpath/compiler/PsuedoNames.java
pache/xpath/compiler/XPathDumper.java
pache/xpath/compiler/XPathParser.java
pache/xpath/compiler/package.html
pache/xpath/domapi/XPathStylesheetDOM3Exception.java
pache/xpath/functions/FuncBoolean.java
pache/xpath/functions/FuncCeiling.java
pache/xpath/functions/FuncConcat.java
pache/xpath/functions/FuncContains.java
pache/xpath/functions/FuncCount.java
pache/xpath/functions/FuncCurrent.java
pache/xpath/functions/FuncDoclocation.java
pache/xpath/functions/FuncExtElementAvailable.java
pache/xpath/functions/FuncExtFunction.java
pache/xpath/functions/FuncExtFunctionAvailable.java
pache/xpath/functions/FuncFalse.java
pache/xpath/functions/FuncFloor.java
pache/xpath/functions/FuncGenerateId.java
pache/xpath/functions/FuncId.java
pache/xpath/functions/FuncLang.java
pache/xpath/functions/FuncLast.java
pache/xpath/functions/FuncLocalPart.java
pache/xpath/functions/FuncNamespace.java
pache/xpath/functions/FuncNormalizeSpace.java
pache/xpath/functions/FuncNot.java
pache/xpath/functions/FuncNumber.java
pache/xpath/functions/FuncPosition.java
pache/xpath/functions/FuncQname.java
pache/xpath/functions/FuncRound.java
pache/xpath/functions/FuncStartsWith.java
pache/xpath/functions/FuncString.java
pache/xpath/functions/FuncStringLength.java
pache/xpath/functions/FuncSubstring.java
pache/xpath/functions/FuncSubstringAfter.java
pache/xpath/functions/FuncSubstringBefore.java
pache/xpath/functions/FuncSum.java
pache/xpath/functions/FuncSystemProperty.java
pache/xpath/functions/FuncTranslate.java
pache/xpath/functions/FuncTrue.java
pache/xpath/functions/FuncUnparsedEntityURI.java
pache/xpath/functions/Function.java
pache/xpath/functions/Function2Args.java
pache/xpath/functions/Function3Args.java
pache/xpath/functions/FunctionDef1Arg.java
pache/xpath/functions/FunctionMultiArgs.java
pache/xpath/functions/FunctionOneArg.java
pache/xpath/functions/ObjectFactory.java
pache/xpath/functions/SecuritySupport.java
pache/xpath/functions/SecuritySupport12.java
pache/xpath/functions/WrongNumberArgsException.java
pache/xpath/functions/package.html
pache/xpath/jaxp/JAXPExtensionsProvider.java
pache/xpath/jaxp/JAXPPrefixResolver.java
pache/xpath/jaxp/JAXPVariableStack.java
pache/xpath/jaxp/XPathExpressionImpl.java
pache/xpath/jaxp/XPathFactoryImpl.java
pache/xpath/jaxp/XPathImpl.java
pache/xpath/objects/DTMXRTreeFrag.java
pache/xpath/objects/XBoolean.java
pache/xpath/objects/XBooleanStatic.java
pache/xpath/objects/XMLStringFactoryImpl.java
pache/xpath/objects/XNodeSet.java
pache/xpath/objects/XNodeSetForDOM.java
pache/xpath/objects/XNull.java
pache/xpath/objects/XNumber.java
pache/xpath/objects/XObject.java
pache/xpath/objects/XObjectFactory.java
pache/xpath/objects/XRTreeFrag.java
pache/xpath/objects/XRTreeFragSelectWrapper.java
pache/xpath/objects/XString.java
pache/xpath/objects/XStringForChars.java
pache/xpath/objects/XStringForFSB.java
pache/xpath/objects/package.html
pache/xpath/operations/And.java
pache/xpath/operations/Bool.java
pache/xpath/operations/Div.java
pache/xpath/operations/Equals.java
pache/xpath/operations/Gt.java
pache/xpath/operations/Gte.java
pache/xpath/operations/Lt.java
pache/xpath/operations/Lte.java
pache/xpath/operations/Minus.java
pache/xpath/operations/Mod.java
pache/xpath/operations/Mult.java
pache/xpath/operations/Neg.java
pache/xpath/operations/NotEquals.java
pache/xpath/operations/Number.java
pache/xpath/operations/Operation.java
pache/xpath/operations/Or.java
pache/xpath/operations/Plus.java
pache/xpath/operations/Quo.java
pache/xpath/operations/String.java
pache/xpath/operations/UnaryOperation.java
pache/xpath/operations/Variable.java
pache/xpath/operations/VariableSafeAbsRef.java
pache/xpath/operations/package.html
pache/xpath/package.html
pache/xpath/patterns/ContextMatchStepPattern.java
pache/xpath/patterns/FunctionPattern.java
pache/xpath/patterns/NodeTest.java
pache/xpath/patterns/NodeTestFilter.java
pache/xpath/patterns/StepPattern.java
pache/xpath/patterns/UnionPattern.java
pache/xpath/patterns/package.html
pache/xpath/res/XPATHErrorResources.java
pache/xpath/res/XPATHMessages.java
pache/xpath/res/package.html
38e90abbe4ec0a889cb16dc673cf892274c18a01 09-Jan-2011 Jesse Wilson <jessewilson@google.com> Merge "Remove the ExpatPullParser." into dalvik-dev
1c45ea38a7df88c22df805d048654d77d49a333d 09-Jan-2011 Jesse Wilson <jessewilson@google.com> Remove the ExpatPullParser.

Change-Id: Ie10697ed917e3f4b162b668096ced90c90f79c67
http://b/3090550
pache/harmony/xml/ExpatParser.java
pache/harmony/xml/ExpatPullParser.java
1c4b8eb0aebfe7f99c10fb1d01716946e8e74ad7 07-Jan-2011 Elliott Hughes <enh@google.com> Remove @SuppressWarnings("nls") cruft.

Also rewrite a couple of toString methods for clarity.

Change-Id: Ic6e8c474ef87e0c0550eea2daed611ae41118229
pache/harmony/luni/internal/net/www/protocol/jar/JarURLConnectionImpl.java
87548e8585334658c3ee89050ec917a10ca35e5a 07-Jan-2011 Elliott Hughes <enh@google.com> More SecurityManager cleanup.

Bug: 2585285
Change-Id: Ib9c5fdadc1361d67227b6f82a774b76c53840ff0
pache/harmony/luni/internal/net/www/protocol/http/HttpConnectionPool.java
ad41624e761bcf1af9c8008eb45187fc13983717 07-Jan-2011 Elliott Hughes <enh@google.com> Retire SecurityManager.

This change removes all the code that was calling getSecurityManager, and
removes all use of AccessController.doPrivileged. It also changes the
implementation of AccessController so it doesn't actually do anything; it's
only there for source-level compatibility.

Bug: 2585285
Change-Id: I1f0295a4f12bce0316d8073011d8593fee116f71
pache/harmony/lang/annotation/AnnotationFactory.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnectionPool.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/jar/JarURLConnectionImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/util/PriviAction.java
pache/harmony/security/fortress/DefaultPolicy.java
pache/harmony/security/fortress/DefaultPolicyParser.java
pache/harmony/security/fortress/PolicyUtils.java
pache/harmony/security/fortress/SecurityUtils.java
pache/harmony/security/fortress/Services.java
pache/harmony/security/provider/cert/DRLCertFactory.java
pache/harmony/security/provider/crypto/CryptoProvider.java
pache/harmony/security/provider/crypto/RandomBitsSupplier.java
pache/harmony/security/provider/crypto/SHA1_Data.java
pache/harmony/xnet/provider/jsse/DelegatedTask.java
pache/harmony/xnet/provider/jsse/JSSEProvider.java
pache/harmony/xnet/provider/jsse/KeyManagerFactoryImpl.java
pache/harmony/xnet/provider/jsse/Logger.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/SSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLSessionImpl.java
pache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java
70f0b2ce80cf20f38ed47dbf7116b16ae55b29fd 07-Jan-2011 Jesse Wilson <jessewilson@google.com> am 1c1007df: Merge "Return HTTP headers even if there is no HTTP response body."

* commit '1c1007df57b41662e60d650db918f1581b20fc45':
Return HTTP headers even if there is no HTTP response body.
1c1007df57b41662e60d650db918f1581b20fc45 06-Jan-2011 Jesse Wilson <jessewilson@google.com> Merge "Return HTTP headers even if there is no HTTP response body."
f14bee4dbf9f724a177a85a7b73f7b0bc6df1ec0 06-Jan-2011 Jesse Wilson <jessewilson@google.com> Return HTTP headers even if there is no HTTP response body.

Also add a test to demonstrate that we've bug 7787.
http://code.google.com/p/android/issues/detail?id=7787

Change-Id: I4e320835516c05ec9e305661b5bbb1e59b278183
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
c1501e6dd3700540c8e4ecfa6afc3d66d804c057 06-Jan-2011 Elliott Hughes <enh@google.com> am 27c11c7c: Remove the last vestiges of the external allocation cruft.

* commit '27c11c7c7b1fc023cb6464bd551aceef300e39b6':
Remove the last vestiges of the external allocation cruft.
27c11c7c7b1fc023cb6464bd551aceef300e39b6 06-Jan-2011 Elliott Hughes <enh@google.com> Remove the last vestiges of the external allocation cruft.

"Missed a bit". The underlying code has gone (though the
interface is still there for now, backed by a do-nothing implementation).

Bug: 2604080
Change-Id: Iba64d1c193819560423285334dc08015fbc105b1
pache/harmony/luni/platform/OSMemory.java
a695e8fafadd2591cd148e78f19bc6d7c15121bb 05-Jan-2011 Jesse Wilson <jessewilson@google.com> Just use String for upper case/lower case operations.

Change-Id: If686975f659412c555684ed0032694e854e3aa8c
http://b/2183747
pache/harmony/luni/util/Util.java
pache/harmony/security/DefaultPolicyScanner.java
pache/harmony/security/Util.java
pache/harmony/security/fortress/Engine.java
pache/harmony/security/fortress/PolicyUtils.java
pache/harmony/security/fortress/Services.java
pache/harmony/security/utils/AlgNameMapper.java
pache/harmony/security/x501/AttributeTypeAndValue.java
54c8a07db3c2d1670c2867ba864d351cb30fecfa 17-Dec-2010 Brian Carlstrom <bdc@google.com> resolved conflicts for merge of 5fc737eb to master

Change-Id: Ifc2a4fd44cef525709a3b9dc0a502b1a0690c6fd
2915378e253f08e47fe5a9bfd026cd1ca7c6c351 16-Dec-2010 Brian Carlstrom <bdc@google.com> HttpsURLConnection retry should not invoke X509TrustManager and HostnameVerifier more than once

Summary:

In 2.3, HttpsURLConnection was change to retry TLS connections as SSL
connections w/o compression to deal with servers that are TLS
intolerant. However, if the handshake proceeded to the point of
invoking the X509TrustManager, we should not retry. Similarly, if we
should not invoke the HostnameVerifier repeatedly, and need to wait
until the SSL handshake has completed.

Tested with (includes two new tests for this issue):
libcore/luni/src/test/java/libcore/javax/net/ssl/
libcore/luni/src/test/java/libcore/java/net/URLConnectionTest.java
libcore/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/https/HttpsURLConnectionTest.java

Details:

HttpConnection.setupSecureSocket has been broken into two
pieces. setupSecureSocket now just does the SSL
handshaking. verifySecureSocketHostname now does the
verification. The old HttpConnection code was careful never to
assign its sslSocket field until verification was complete. A new
unverifiedSocket field is added to store the sslSocket before
verification is completed by verifySecureSocketHostname.

luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java

HttpsEngine.makeConnection now skips TLS intolerant retry if the
reason for the makeSslConnection failure was a
CertificateException, since that implies that we failed during
certification validation after initial handshaking. We also
prevent retrying hostname verification by moving it out of
makeSslConnection and only doing it on new SSL connections,
tracking the changes to HttpConnection.setupSecureSocket mentioned
above. We also now skip the redundant call to setUpTransportIO in
makeSslConnection on reused SSLSockets.

luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java

Instead of throwing away the underlying CertificateExceptions, set
them as the cause of the SSLExceptions. This is what the RI does
in the case of X509TrustManager failures and is now used by
HttpsEngine.makeConnection.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

Added new testConnectViaHttpsToUntrustedServer which makes sure
that connections are not retried on certificate verification
failure.

luni/src/test/java/libcore/java/net/URLConnectionTest.java

Added new test_SSLSocket_untrustedServer that verifies that an
SSLHandshakeException is thown containing a CertificateException
is thrown on certificate verification problems.

luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java

Added second test CA and a new TestKeyStore.getClientCA2 test key
store that does not trust the primary test key stores. This is
useful for negative testing and is used in the above two new
tests.

support/src/test/java/libcore/java/security/TestKeyStore.java

Issue: http://code.google.com/p/android/issues/detail?id=13178
Bug: 3292412

Change-Id: I37136bb65f04d2bceaf2f32f542d6432c8b76ad4
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
736e9fcc8bab781702e4a417b64981a8d1fa6ef3 15-Dec-2010 Jesse Wilson <jessewilson@google.com> am b84e9595: am c6dae581: Throw the expected exception after the response failed.

* commit 'b84e9595d2dff0d473be0699f3c8b06be2337712':
Throw the expected exception after the response failed.
c6dae581716b9362a5c7f166c80a7f2b46ed1124 06-Nov-2010 Jesse Wilson <jessewilson@google.com> Throw the expected exception after the response failed.

Change-Id: I4c2ed726d41d6b55e27a503467a412fa05242383
http://b/3172197
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
a1603838fe9e865575c87982e32c6343740e464c 11-Dec-2010 Elliott Hughes <enh@google.com> Lots more bounds-checking/exception-throwing consistency.

Overflow-safe checks all round, plus better detail messages. This isn't
quite everything, but it's a large chunk of the work. Most notably, this
is all of io and nio.

There are numerous changes of exception priority here, and the harmony
tests noticed a subset of them in the nio code. I've modified our checked-out
copy of the tests to accept any of the throwable exceptions.

Change-Id: Id185f1228fb9a1d5fc9494e78375b5623fb0fe14
pache/harmony/security/provider/crypto/SHA1_MessageDigestImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
9ae5315ae9d993fc099e98d25f42a42e6be80ee0 09-Dec-2010 Elliott Hughes <enh@google.com> am b46dab34: Rewrite all backwards comparisons.

* commit 'b46dab348e2007bc08abaf7ecae34d89a2474e50':
Rewrite all backwards comparisons.
b46dab348e2007bc08abaf7ecae34d89a2474e50 09-Dec-2010 Elliott Hughes <enh@google.com> Rewrite all backwards comparisons.

Strictly, all the ones I could find. This is everything with 0 or null on the
left-hand side.

Note that this touches several incorrect bounds checks, which I haven't fixed:
I'm going to come back and finish that independent cleanup separately.

Change-Id: Ibdb054b53df9aace47c7d2a00ff19122190053e8
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/util/TwoKeyHashMap.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
daae09bafc06badb3c2d7e088cc216e511bcb8e4 09-Dec-2010 Elliott Hughes <enh@google.com> am ccedfac1: Merge "Fix a bunch of javac -Xlint warnings in our code."

* commit 'ccedfac1d04b7f9c4df4a144f80283f7af69a9d6':
Fix a bunch of javac -Xlint warnings in our code.
866e7ae17a3da81a02b0b144e0c9c2b3196d293a 09-Dec-2010 Elliott Hughes <enh@google.com> Fix a bunch of javac -Xlint warnings in our code.

I think "fallthrough" uncovered a couple of real bugs in the kxml code, but
other than that there's nothing very exciting here. This addresses all but
one of the non-xml warnings. I'm assuming that we'll move the xml cruft out
into external at some point (since we're deliberately not maintaining it).

Change-Id: Ice81253b019df7b19d6557e719663b7bdc11fb22
pache/harmony/luni/internal/util/ZoneInfoDB.java
pache/harmony/luni/util/FloatingPointParser.java
pache/harmony/security/PolicyEntry.java
pache/harmony/security/fortress/DefaultPolicy.java
pache/harmony/security/provider/crypto/SHA1_MessageDigestImpl.java
pache/harmony/security/x501/AttributeValue.java
pache/harmony/security/x501/Name.java
pache/harmony/security/x509/DNParser.java
pache/harmony/security/x509/Extensions.java
pache/harmony/security/x509/ReasonCode.java
67d38e62ce505fb37b205d89485a91af7862b4ef 08-Dec-2010 Elliott Hughes <enh@google.com> Merge "Fix InflaterInputStream and ZipInputStream's skip methods' behavior with negative counts." into dalvik-dev
f9480f317cddcec859025833b748f096247a40aa 08-Dec-2010 Elliott Hughes <enh@google.com> Fix InflaterInputStream and ZipInputStream's skip methods' behavior with negative counts.

This fixes a couple of harmony tests. I've also cleaned up all the names to be
of the form <x>Count. I haven't made much of an effort to improve the
documentation because these methods aren't all identical and I don't have a
good tool for doing large-scale javadoc consolidation.

Change-Id: Ia11f78cbe7c17959d50709af03042aa7541733a0
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLInputStream.java
8272b935bd238a37846ea76b8fcfe297abe1c7ee 08-Dec-2010 Brian Carlstrom <bdc@google.com> KeyManager.choose* methods should tolerate null key types

This regression was found by X509KeyManagerTest and now
KeyManagerFactoryTest covers it as well. The underlying problem was
introduced recently when KeyManagerImpl was updated to support key
types with specific signature algorithms like EC_RSA and EC_EC.

Change-Id: Ic99ab10e5ba07e990dc0e8a2d257c2167f2d33bb
pache/harmony/xnet/provider/jsse/KeyManagerImpl.java
b9cc455ed89df1a0cf4186c92b352c9649995d96 04-Dec-2010 Elliott Hughes <enh@google.com> Use our canonical Arrays range-checking methods.

There are a handful of manual range-checkers left, thanks to specified
API that throws IllegalArgumentException instead, and a few other weird
cases.

Change-Id: I80914c2257288fc184100545aff4fd6f57bf32c9
pache/harmony/luni/internal/net/www/protocol/http/AbstractHttpInputStream.java
pache/harmony/luni/internal/net/www/protocol/http/AbstractHttpOutputStream.java
pache/harmony/luni/internal/net/www/protocol/http/ChunkedInputStream.java
pache/harmony/luni/internal/net/www/protocol/http/ChunkedOutputStream.java
pache/harmony/luni/internal/net/www/protocol/http/FixedLengthInputStream.java
pache/harmony/luni/internal/net/www/protocol/http/FixedLengthOutputStream.java
pache/harmony/luni/internal/net/www/protocol/http/RetryableOutputStream.java
pache/harmony/luni/internal/net/www/protocol/http/UnknownLengthHttpInputStream.java
pache/harmony/luni/net/SocketInputStream.java
pache/harmony/luni/net/SocketOutputStream.java
5501a3d4b3d7657c183ed5446fe67fa011fbf70b 03-Dec-2010 Elliott Hughes <enh@google.com> Comments/javadoc should be in en_US, not en_CA.

Change-Id: Ie9dde4971e0a6a8dadd14af43d631158fc488cd8
pache/harmony/luni/internal/net/www/protocol/file/Handler.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
pache/harmony/xml/dom/DOMConfigurationImpl.java
35eef71e8ce721c4199c525890ecc1a263054596 02-Dec-2010 Jesse Wilson <jessewilson@google.com> Fix two bugs with HTTPS + file uploads.

Firstly, we weren't echoing calls to setFixedLengthStreamingMode
and setChunkedStreamingMode from the HTTPS adapter down to the
real HTTP client.

Secondly, we were calling setTransportIO twice, and the second
call destroyed the buffer of our request body stream. That buffer
has only existed since change Id22a8449118a4b8dd13e71915700ac78803d2d9f,
(November 2, 2010) so the impact of that problem is limited.

Change-Id: Icb0eb2e0ca4e201a629bd74c3b98e852f6cc0fd3
http://code.google.com/p/android/issues/detail?id=12860
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
ffeba5dd766602f6e2be9caa9081744348a53c04 01-Dec-2010 Brian Carlstrom <bdc@google.com> Add support for TLS_EMPTY_RENEGOTIATION_INFO_SCSV cipher suite

"TLS_EMPTY_RENEGOTIATION_INFO_SCSV" is RFC 5746's renegotiation
indication signaling cipher suite value. It is not a real cipher
suite. It is just an indication in the default and supported cipher
suite lists indicates that the implementation supports secure
renegotiation.

In the RI, its presence means that the SCSV is sent in the cipher
suite list to indicate secure renegotiation support and its absence
means to send an empty TLS renegotiation info extension instead.

However, OpenSSL doesn't provide an API to give this level of control,
instead always sending the SCSV and always including the empty
renegotiation info if TLS is used (as opposed to SSL). So we simply
allow TLS_EMPTY_RENEGOTIATION_INFO_SCSV to be passed for compatibility
as to provide the hint that we support secure renegotiation.

Change-Id: I0850bea47568edcfb1f7df99d4e8a747f938406d
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
4ae3fd787741bfe1b808f447dcb0785250024119 19-Nov-2010 Brian Carlstrom <bdc@google.com> Elliptic Crypto support for OpenSSLSocketImpl

Summary:
- Enable Elliptic Crypto support for OpenSSL based SSLSocket instances
- More RI compliant usage of key types, client auth types, and server auth types
- Steps toward TLS_EMPTY_RENEGOTIATION_INFO_SCSV support, currently test updates

Details:

Elliptic Curve changes

CipherSuite updates for EC
- Adding KEY_EXCHANGE_EC* and corresponding CipherSuites Updated
isAnonymous, getKeyType (now renamed getServerKeyType) to handle
new EC cases. Added new getAuthType for use by
checkServerTrusted callers.
- Restructured code to handle two SUITES_BY_CODE_* arrays
- Remove KEY_EXCHANGE_DH_* definitions which unused because the
corresponding CipherSuites were previously disabled.
- Changed AES CipherSuites definitions to use "_CBC" to match other definitions.
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java

openssl EC
- NativeCrypto now registers TLS_EC_* cipher suites and has update default list
- Improved auth type arguments to checkClientTrusted/checkServerTrusted
- NativeCrypto support for emphemeral EC keys
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
luni/src/main/native/NativeCrypto.cpp

non-openssl SSL/TLS cleanups

- cleanup around code trying to cope with DiffieHellman vs DH since either should work.
- changed client to use new CipherSuite.getAuthType shared with NativeCrypto implementation
- changed server to use CipherSuite.getKeyType
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/HandshakeProtocol.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/KeyManagerImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java

Consolidate CertificateRequestType code into CipherSuite so that its
shared between java and openssl implementations. This includes the
KEY_TYPE_ string constants, TLS_CT_* byte constants and the 'String
keyType(byte)' (now renamed getClientKeyType) code that depends on them.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CertificateRequest.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java

Tests

Differentiate between supported list of cipher suites openssl-based
SSLSocket and SSLEngine based, since the SSLEngine code does not support EC.

luni/src/test/java/libcore/javax/net/ssl/SSLEngineTest.java
luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java

Added testing for expected default cipher suites. Before we just ensured the values were valid.
luni/src/test/java/libcore/javax/net/ssl/SSLSocketFactoryTest.java
support/src/test/java/libcore/java/security/StandardNames.java

Updated to handle new EC cipher suites codes. Added test for new getClientKeyType.
luni/src/test/java/org/apache/harmony/xnet/provider/jsse/CipherSuiteTest.java

Better use of "standard names" particularly to correctly deal with
the subtle differences between key types, client auth types, and
server auth types. TestKeyManager and TestTrustManager now verify
the values they are passed are acceptable.

support/src/test/java/libcore/java/security/StandardNames.java
support/src/test/java/libcore/javax/net/ssl/TestKeyManager.java
support/src/test/java/libcore/javax/net/ssl/TestTrustManager.java

Changed to timeout after 30 seconds and to log to reveal both client and server issues.
support/src/test/java/libcore/javax/net/ssl/TestSSLSocketPair.java

Bug: 3058375
Change-Id: I14d1d0285d591c99cc211324f3595a5be682cab1
pache/harmony/xnet/provider/jsse/CertificateRequest.java
pache/harmony/xnet/provider/jsse/CipherSuite.java
pache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
pache/harmony/xnet/provider/jsse/HandshakeProtocol.java
pache/harmony/xnet/provider/jsse/KeyManagerImpl.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
pache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
7d71a13aa0cb794f14152b36b3873bf8ca595cdc 01-Dec-2010 Brian Carlstrom <bdc@google.com> SecureRandom should be thread safe

Random is documented to be thread safe and our implementation appears
to be. However, the SecureRandom subclass implementation was not. This
was quite reproducible with the javax.net.ssl unit tests when run on a
multicore device, but not seen on a uniprocessor.

Details:

Actual bug fix by adding synchronized to engine* methods

luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java

New testSecureRandomThreadSafety based on generateSeed errors in javax.net.ssl tests.

luni/src/test/java/tests/security/SecureRandomTest.java

Removing dalvik.annotation.* from assorted SecureRandom tests.

luni/src/test/java/org/apache/harmony/security/tests/java/security/SecureRandom2Test.java
luni/src/test/java/org/apache/harmony/security/tests/java/security/SecureRandomSpiTest.java
luni/src/test/java/tests/java/security/SecureRandomTest.java
luni/src/test/java/tests/security/SecureRandomTest.java

Change-Id: I5e8ece4c0836b02277d7cac1b9b2f60b3c4a7755
pache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java
253851cdb2904082c205949da273c455d197c083 01-Dec-2010 Jesse Wilson <jessewilson@google.com> Do not merge: Fix a bug where we weren't pooling connections due to mismatched URLs.

Already committed to master as change 78504.

Change-Id: Ib883e92bb03b142f34449ef1314c57878dcc00f0

http://b/3169861
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
086fd0244a54fa5ecf13ea66d49b22b36d7d456e 30-Nov-2010 Jesse Wilson <jessewilson@google.com> Fix XML DOM test failures and close guard warnings.

Fix KxmlParser to capture the DTD's root element name, system ID and
public ID. This is more robust than capturing the same in the pull-to-DOM
adapter.

Fix close guard warnings in XML tests. Close input streams of resource
files. Don't catch exceptions only to call fail().

http://b/3090550
Change-Id: I7cfafde58cc28af79c48386a4d124803c8791328
pache/harmony/xml/parsers/DocumentBuilderImpl.java
1a3dfbe49a3dcd7c855972dadccb9226468359d5 29-Nov-2010 Brian Carlstrom <bdc@google.com> am 6c78b7b9: Toward EC TLS support

* commit '6c78b7b94c232063ec559436b48b33751373ecf1':
Toward EC TLS support
6c78b7b94c232063ec559436b48b33751373ecf1 19-Nov-2010 Brian Carlstrom <bdc@google.com> Toward EC TLS support

Summary:
- javax.net.ssl tests are now working on the RI
- KeyManager can now handle EC_EC and EC_RSA
- OpenSSLSocketImpl.startHandshake now works if KeyManager contains EC certificates

Details:

Add CipherSuite.getKeyType to provide X509KeyManager key type strings,
refactored from OpenSSLServerSocketImpl.checkEnabledCipherSuites.
getKeyType is now also used in OpenSSLSocketImpl.startHandshake to
avoid calling setCertificate for unnecessary key types.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

New CipherSuiteTest to cover new getKeyType as well as existing functionality

luni/src/test/java/org/apache/harmony/xnet/provider/jsse/CipherSuiteTest.java

Add support to KeyManager implementation for key types of the form
EC_EC and EC_RSA. The first part implies the KeyPair algorithm (EC in
these new key types) with a potentially different signature algorithm
(EC vs RSA in these)

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/KeyManagerImpl.java

Update NativeCrypto.keyType to support EC_EC and EC_RSA in addition to
EC which was added earlier. Change from array of KEY_TYPES to named
KEY_TYPE_* constants.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java

Overhauled KeyManagerFactoryTest to cover EC, EC_EC, EC_RSA cases

luni/src/test/java/libcore/javax/net/ssl/KeyManagerFactoryTest.java
support/src/test/java/libcore/java/security/StandardNames.java

Changed TestKeyStore.createKeyStore from always using BKS to now use
JKS on the RI between BC EC Keys and RI X509 certificates. Because JKS
requires a password, we now default "password" on the RI.

support/src/test/java/libcore/java/security/TestKeyStore.java
luni/src/test/java/libcore/javax/net/ssl/SSLContextTest.java
support/src/test/java/libcore/java/security/StandardNames.java

TestKeyStore.create now accepts key types like EC_RSA. Changed
TestKeyStore.createKeys to allow a PrivateKeyEntry to be specified for
signing to enable creation of EC_RSA test certificate. Added
getRootCertificate/rootCertificate to allow lookup of PrivateKeyEntry
for signing. Changed TestKeyStore.getPrivateKey to take explicit
signature algorithm to retrieve EC_EC vs EC_RSA entries.

support/src/test/java/libcore/java/security/TestKeyStore.java
luni/src/test/java/libcore/java/security/KeyStoreTest.java
luni/src/test/java/libcore/javax/net/ssl/KeyManagerFactoryTest.java
luni/src/test/java/libcore/java/security/cert/PKIXParametersTest.java
luni/src/test/java/libcore/javax/net/ssl/TrustManagerFactoryTest.java
luni/src/test/java/org/apache/harmony/xnet/provider/jsse/NativeCryptoTest.java
support/src/test/java/libcore/java/security/StandardNames.java

Added support for EC cipher suites on the RI. Also test with and
without new TLS_EMPTY_RENEGOTIATION_INFO_SCSV cipher suite which is
used to specify the new TLS secure renegotiation.

luni/src/test/java/libcore/javax/net/ssl/SSLEngineTest.java
luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java
support/src/test/java/libcore/java/security/StandardNames.java

New TestKeyManager and additional logging in TestTrustManager. Logging
in both is disabled by default using DevNullPrintStream.

support/src/test/java/libcore/javax/net/ssl/TestKeyManager.java
support/src/test/java/libcore/javax/net/ssl/TestTrustManager.java
support/src/test/java/libcore/java/io/DevNullPrintStream.java

Bug: 3058375
Change-Id: Ia5e2a00a025858e10d1076b900886994b481e05a
pache/harmony/xnet/provider/jsse/CipherSuite.java
pache/harmony/xnet/provider/jsse/KeyManagerImpl.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
102b3a86bde04a4cffcbecd5b6d175d7790b132a 19-Nov-2010 Elliott Hughes <enh@google.com> Include zdump(1)-like output in ZoneInfo.toString.

Bug: 3172097
Change-Id: Ifb6d6703421e30ce6b7e5dddd1ac583f590cd2b7
pache/harmony/luni/internal/util/ZoneInfo.java
pache/harmony/luni/internal/util/ZoneInfoDB.java
9d615f25f7576314ec6473b143b13d00ce52e805 18-Nov-2010 Brian Carlstrom <bdc@google.com> am 57f2cc03: Test updates for Elliptic Curve

* commit '57f2cc03ff2cf5d2f6413c5410680b4908d7301d':
Test updates for Elliptic Curve
57f2cc03ff2cf5d2f6413c5410680b4908d7301d 05-Nov-2010 Brian Carlstrom <bdc@google.com> Test updates for Elliptic Curve

Updated with Elliptic Curve (EC) (and SunPKCS11-NSS) names for use by ProviderTest

support/src/test/java/libcore/java/security/StandardNames.java

Enhance test_KeyStore_cacerts_bks to verify PublicKey can be
retreived. Before this the test would pass even though an
ECPublicKey could not be accessed. With EC support in
external/bouncycastle, this test now passes.

luni/src/test/java/libcore/java/security/KeyStoreTest.java

New SignatureTest to cover ECDSA, replaces the old one that
required a subclass per tested algorithm.

luni/src/test/java/libcore/java/security/SignatureTest.java
support/src/test/java/tests/security/SignatureTest.java
luni/src/test/java/tests/targets/security/SignatureTestMD5withRSA.java
luni/src/test/java/tests/targets/security/SignatureTestNONEwithDSA.java
luni/src/test/java/tests/targets/security/SignatureTestSHA1withDSA.java
luni/src/test/java/tests/targets/security/SignatureTestSHA1withRSA.java
luni/src/test/java/tests/targets/security/SignatureTestSHA256withRSA.java
luni/src/test/java/tests/targets/security/SignatureTestSHA384withRSA.java
luni/src/test/java/tests/targets/security/SignatureTestSHA512withRSA.java
luni/src/test/java/tests/targets/security/AllTests.java

Improve ProviderTest logging while debugging SunPKCS11-NSS
provider issues. Added some exceptions for RI missing classes.

luni/src/test/java/libcore/java/security/ProviderTest.java

Changed style slightly to match KeyPairGeneratorTest, where +N is
used to indicated when multiples of a increments of a certain
amount are required for valid key sizes.

luni/src/test/java/libcore/javax/crypto/KeyGeneratorTest.java

Fix test CloseGuard issues

luni/src/test/java/libcore/java/security/KeyStoreTest.java

Fix readability

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java

Bug: 3058375
Change-Id: I99cd93ad66372e8512d993168550cc1d471d3248
pache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
dbc42ad94ce37b3178e14b50496914c267d6cea6 16-Nov-2010 Brian Carlstrom <bdc@google.com> HttpsURLConnection fixes to pass URLConnectionTest and HttpsURLConnectionTest

Add public getSecureSocket so that HttpsURLConnection can reset its sslSocket field on reused connections.

luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java

discardIntermediateResponse now maintain old values for
intermediateReponse, which is necessary when retrying the CONNECT
method with proxy authorization.

luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java

Clear sslSocket before retrying makeSslConnection to ensure we reconnect.
makeSslConnection now resets sslSocket on resumed connection.
makeSslConnection now exits early on existing connection.

luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java

git cherry-pick -e 4df5be29bdffc09e7368c03423a0bef85fa26ac5
Bug: 3184701
Change-Id: Ida3c027f79e5e29968263ac761d4f4f79d063a27
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
3825a7f63f6bf49d55e742f19f9b76cc9adc5e6f 05-Nov-2010 Brian Carlstrom <bdc@google.com> Propagate pending exception from cert_client_cb

There can be a pending exception in the cert_client_cb if the server
certificate failed verification and the server requested a client
certificate. Since the handshake is going to be terminated, just
return from client_cert_cb immediately indicating no client cert will be
provided, allowing the existing exception to propagate.

Bug: 3149826
git cherry-pick 30a77f316c03906ca59d6ebe5b6c7f0ff734aadb

Bug: 3184701
Change-Id: I58b038267f66d6b5f80e9f3d81ff1c0f8052ef27
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
056611da6dba28eb1dbbaebe897187fc5834d155 16-Nov-2010 Brian Carlstrom <bdc@google.com> am 4df5be29: HttpsURLConnection fixes to pass URLConnectionTest and HttpsURLConnectionTest

* commit '4df5be29bdffc09e7368c03423a0bef85fa26ac5':
HttpsURLConnection fixes to pass URLConnectionTest and HttpsURLConnectionTest
4df5be29bdffc09e7368c03423a0bef85fa26ac5 16-Nov-2010 Brian Carlstrom <bdc@google.com> HttpsURLConnection fixes to pass URLConnectionTest and HttpsURLConnectionTest

Add public getSecureSocket so that HttpsURLConnection can reset its sslSocket field on reused connections.

luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java

discardIntermediateResponse now maintain old values for
intermediateReponse, which is necessary when retrying the CONNECT
method with proxy authorization.

luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java

Clear sslSocket before retrying makeSslConnection to ensure we reconnect.
makeSslConnection now resets sslSocket on resumed connection.
makeSslConnection now exits early on existing connection.

luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java

Change-Id: I6862a092e2584398f7aa1d2a8b66ad074775b6b3
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
de8ebcab83d48d4edc28fced9d0a8382f1ef1436 16-Nov-2010 Brian Carlstrom <bdc@google.com> am 8a720cce: TrustManager should include PrivateKeyEntry CAs, OpenSSLSocketImpl close fix, and debugging improvements

* commit '8a720cceee7ce319d647738dfeda3f302879f370':
TrustManager should include PrivateKeyEntry CAs, OpenSSLSocketImpl close fix, and debugging improvements
8a720cceee7ce319d647738dfeda3f302879f370 16-Nov-2010 Brian Carlstrom <bdc@google.com> TrustManager should include PrivateKeyEntry CAs, OpenSSLSocketImpl close fix, and debugging improvements

Revert to older behavior of creating TrustAnchors from both
PrivateKeyEntry and TrustedCertificateEntry values from the
KeyStore. Added tests to better ensure this slighlt different
behavior from PKIXParameters. Also create the acceptedIssuers
proactively since the real memory cost is the X509Certificates
which are already found in the params.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerImpl.java
luni/src/test/java/libcore/javax/net/ssl/TrustManagerFactoryTest.java
luni/src/test/java/libcore/java/security/cert/PKIXParametersTest.java

Don't just free native state on issue with startHandshake, close
the SSLSocket. While the former addressed a CloseGuard issue, the
latter make sure that checkOpen throws SocketExceptions and we don't
leak a NullPointerException from NativeCrypto.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

Debugging improvements including minor refinements to recently
added NativeCrypto logging, more verbose TestKeyStore.dump output,
and a new TestTrustManager proxy class for logging X509TrustManager
behavior.

luni/src/main/native/NativeCrypto.cpp
support/src/test/java/libcore/java/security/TestKeyStore.java
support/src/test/java/libcore/javax/net/ssl/TestTrustManager.java

Change-Id: I317e1ca34d8e20c77e5cb9c5a5a58cb4ae98d829
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
bbf2c7d0462bb2c612e5a1a28e6d0ce5413d746d 12-Nov-2010 Elliott Hughes <enh@google.com> Tidy up some jar-related code.

...and kill InputStreamHelper by inlining all that's left into the sole caller.

Change-Id: Iadddba9f067a1af2a2a66803aa9ef26ea6dc3396
pache/harmony/luni/util/InputStreamHelper.java
693eacca9fa67ad79d1b35dbaad61c5ac1ac457c 10-Nov-2010 Elliott Hughes <enh@google.com> Stop allocating empty arrays.

Bug: 3166662
Change-Id: I151de373b2bf53786d19824336fa434c02b0b0e8
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/util/Base64.java
pache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java
pache/harmony/xnet/provider/jsse/ClientHello.java
pache/harmony/xnet/provider/jsse/ClientKeyExchange.java
pache/harmony/xnet/provider/jsse/DigitalSignature.java
pache/harmony/xnet/provider/jsse/KeyManagerFactoryImpl.java
pache/harmony/xnet/provider/jsse/Logger.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/SSLServerSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/SSLSessionImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java
pache/xml/serializer/ToHTMLStream.java
ml/sax/ext/Attributes2Impl.java
610ea23f06ae8a11d64806ef85367f2b8ac4ac8e 09-Nov-2010 Jesse Wilson <jessewilson@google.com> am f5aabec4: am 8fbee008: am b365037f: Add @Deprecated to match @deprecated where it\'s missing in libcore.

* commit 'f5aabec4b1fe54f495a88aeff17f0c950675a056':
Add @Deprecated to match @deprecated where it's missing in libcore.
f5aabec4b1fe54f495a88aeff17f0c950675a056 09-Nov-2010 Jesse Wilson <jessewilson@google.com> am 8fbee008: am b365037f: Add @Deprecated to match @deprecated where it\'s missing in libcore.

* commit '8fbee008f35fa08642a11a728b6d3699ff933efc':
Add @Deprecated to match @deprecated where it's missing in libcore.
8d7078b3aec245ed151a31584b190fcfb6b2ede0 08-Nov-2010 Brian Carlstrom <bdc@google.com> am 43c8c9d4: Merge "Make OpenSSLSocketFactory and SSLSocketFactory fields final"

* commit '43c8c9d466293851bd7f4f4438628176e278ced7':
Make OpenSSLSocketFactory and SSLSocketFactory fields final
43c8c9d466293851bd7f4f4438628176e278ced7 08-Nov-2010 Brian Carlstrom <bdc@google.com> Merge "Make OpenSSLSocketFactory and SSLSocketFactory fields final"
5e4835e455f6a6510d63e664b44b040169e1b8d7 08-Nov-2010 Jesse Wilson <jessewilson@google.com> am 06e15e6c: Fix a bug where we weren\'t pooling connections due to mismatched URLs.

* commit '06e15e6c528fcb773bedb43e34b0577312570927':
Fix a bug where we weren't pooling connections due to mismatched URLs.
41ea5dcbab2b53238434831d2365fa65d6e911ff 08-Nov-2010 Brian Carlstrom <bdc@google.com> Make OpenSSLSocketFactory and SSLSocketFactory fields final

Bug: 2954292
Change-Id: I4cad068d4da39a9c55ca25fad698f3ea136f2e24
pache/harmony/xnet/provider/jsse/OpenSSLSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketFactoryImpl.java
06e15e6c528fcb773bedb43e34b0577312570927 05-Nov-2010 Jesse Wilson <jessewilson@google.com> Fix a bug where we weren't pooling connections due to mismatched URLs.

Change-Id: I13bebc94189192c3f8d959e521989591d2fca3e2
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
8c7421af3859862e60f95629176023226d89eb85 08-Nov-2010 Brian Carlstrom <bdc@google.com> am 9a356d01: TrustManagerImpl.cleanupCertChain should not modify original the original chain

* commit '9a356d010cadf3bb3d5cf4b5502010751f602fa1':
TrustManagerImpl.cleanupCertChain should not modify original the original chain
9a356d010cadf3bb3d5cf4b5502010751f602fa1 08-Nov-2010 Brian Carlstrom <bdc@google.com> TrustManagerImpl.cleanupCertChain should not modify original the original chain

The original frameworks/base code this was based on unconditionally
copied the chain before cleaning it which I missed on initial
refactoring. The code lazily makes the copy only it actually needs to
modify the chain.

Change-Id: I29bea6f8064d338bd625ab8ed7a89f5d96a75dfd
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
b365037fb5723ecd2810ac2dc4ec45fc570764b6 04-Nov-2010 Jesse Wilson <jessewilson@google.com> Add @Deprecated to match @deprecated where it's missing in libcore.

Change-Id: Icd07496c4d1371215a2153198d45d6aa719b26b7
ml/sax/AttributeList.java
ml/sax/DocumentHandler.java
ml/sax/HandlerBase.java
ml/sax/Parser.java
ml/sax/helpers/AttributeListImpl.java
ml/sax/helpers/ParserFactory.java
ccd79e2bb784cdbd89e90a0e4301a707091d446d 04-Nov-2010 Jesse Wilson <jessewilson@google.com> Style cleanup of some XML code.

Motivation: in preparation to refactor the Kxml code I'd like
to bring this code to a style consistent with the rest of
Android. This code style currently disagrees with my toolchain.

Change-Id: Ibd24570c131e792532e46f7f44c64abac3a6979a
http://b/3090550
pache/harmony/xml/ExpatPullParser.java
b4bb9aba620d8a363fb3617b25839093caf39cf4 03-Nov-2010 Brian Carlstrom <bdc@google.com> resolved conflicts for merge of a5c608e5 to dalvik-dev

Change-Id: I0319c132ec8f42782475906da267439938308e77
a5c608e59f9d574ea4bc65e9dff44aae2f34fd26 01-Nov-2010 Brian Carlstrom <bdc@google.com> TrustManager improvements

Overhaul of TrustManagerImpl
- PKIXParameters can now be final in TrustManagerImpl because we
always immediately create an IndexedPKIXParameters instead of only
doing it in SSLParametersImpl.createDefaultTrustManager.
- Use new KeyStore constructor for IndexedPKIXParameters to remove
duplicate logic for creating set of TrustAnchors from a KeyStore.
- Improved checkTrusted/cleanupCertChain to remove special cases for
directly trusting the end cert or pruning only self signed certs. To
support b/2530852, we need to stop prune the chain as soon as we
find any trust anchor (using newly improved
TrustManagerImpl.isTrustAnchor), which could be at the beginning,
middle, or end. That means cleanupCertChain can return an empty
chain if everything was trusted directly. (and we don't need to do
extra checks on exception cases to see if the problem was just that
the trust anchor was in the chain)
- isDirectlyTrusted -> isTrustAnchor here as well, using new
IndexedPKIXParameters.isTrustAnchor APIs
- Fix incorrect assumption in getAcceptedIssuers that all TrustAnchor
instances have non-null results for getTrustedCert.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerImpl.java

Removed indexing in createDefaultTrustManager since we always index now

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLParametersImpl.java

Overhaul of IndexedPKIXParameters
- Single map from subject X500Principal to TrustAnchors
instead of two different X500Principal keyed maps to check
- Removed map based on encoded cert. For b/2530852, we want to treat
certs as equal if they have the same name and public key, not
byte-for-byte equality, which can be done with the remaining map.
Revamped isDirectlyTrusted into isTrustAnchor(cert) to perform this
new name/key based comparison.
- Added helper isTrustAnchor(cert, anchors) to reuse code in
non-IndexedPKIXParameters case in TrustManagerImpl.
- Added constructor from KeyStore
- Moved anchor indexing code to index() from old constructor

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/IndexedPKIXParameters.java

TestKeyStore.getPrivateKey allowed some existing test simplification.

luni/src/test/java/libcore/java/security/KeyStoreTest.java
luni/src/test/java/org/apache/harmony/xnet/provider/jsse/NativeCryptoTest.java
support/src/test/java/libcore/java/security/TestKeyStore.java

Added missing "fail()" before catching expected exceptions.

luni/src/test/java/libcore/java/security/KeyStoreTest.java

Expanded KeyManagerFactoryTest to excercise ManagerFactoryParameters b/1628001

luni/src/test/java/libcore/javax/net/ssl/KeyManagerFactoryTest.java

Added KeyStoreBuilderParametersTest because I thought I saw a bug in
KeyStoreBuilderParameters, but this convinced me otherwise.

luni/src/test/java/libcore/javax/net/ssl/KeyStoreBuilderParametersTest.java

New TrustManagerFactory test modeled on expanded KeyManagerFactoryTest.
test_TrustManagerFactory_intermediate specifically is targeting the
new functionality of b/2530852 to handling trust anchors within the
chain.

luni/src/test/java/libcore/javax/net/ssl/TrustManagerFactoryTest.java
support/src/test/java/libcore/java/security/StandardNames.java

Some initial on tests for Elliptic Curve (b/3058375) after the RI
started reporting it was supported. Removed old @KnownFailure
tags. Skipped a test on the RI that it can't handle. Improved some
assert messages.

luni/src/test/java/libcore/javax/net/ssl/SSLEngineTest.java
luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java
support/src/test/java/libcore/java/security/StandardNames.java
support/src/test/java/libcore/java/security/TestKeyStore.java

Removed unneeded bytes->javax->bytes->java case of which can just go bytes->java directly.
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

Removed super()
luni/src/main/java/javax/net/ssl/KeyStoreBuilderParameters.java

Made Security.secprops final
luni/src/main/java/java/security/Security.java

Pulled SamplingProfiler fix from dalvik-dev branch
git cherry-pick --no-commit f9dc3450e8f23cab91efc9df99bb860221ac3d6c
dalvik/src/main/java/dalvik/system/SamplingProfiler.java

Bug: 2530852
Change-Id: I95e0c7ee6a2f66b6986b3a9da9583d1ae52f94dd
pache/harmony/xnet/provider/jsse/IndexedPKIXParameters.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLParametersImpl.java
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
a30033bf368e4f1adac3c597f9f0a1db8bcf87fb 03-Nov-2010 Jesse Wilson <jessewilson@google.com> Merge "Save packets by writing header+body as one packet where feasible." into dalvik-dev
0efebd8c734d30ed798b80166290b904fa357ee0 02-Nov-2010 Jesse Wilson <jessewilson@google.com> Save packets by writing header+body as one packet where feasible.

We were previously writing the HTTP header as one byte array and
then the HTTP body as a series of byte arrays, even if the body
was quite small. With this change we prefer to write header plus
body as a single write. The downside of this approach is that in
the worst case we need to allocate 32K more bytes.

In the best case we save a packet. On my test this saved 40ms for
the roundtrip.

Is this the right approach? Allocating a right-sized buffer saves
memory and minimizes the number of packets sent. But it does make
this complex code more complex.

benchmark postBodySize run ms linear runtime
HttpURLConnection none Before 10.8 ======
HttpURLConnection none After 11.0 ======
HttpURLConnection 0 Before 10.9 ======
HttpURLConnection 0 After 11.1 ======
HttpURLConnection 1 Before 51.3 =============================
HttpURLConnection 1 After 11.0 ======
HttpURLConnection 1024 Before 51.7 ==============================
HttpURLConnection 1024 After 11.3 ======
HttpURLConnection 8192 Before 51.2 =============================
HttpURLConnection 8192 After 12.8 =======

http://b/3143475

Change-Id: Id22a8449118a4b8dd13e71915700ac78803d2d9f
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
b5bde2fd72189192b52e726a2d606d70c3c8a34b 02-Nov-2010 Elliott Hughes <enh@google.com> More shift removal.

A few more customers for OSMemory's peek/poke abilities, and a bunch of shifts
that should have been multiplications.

Bug: 3032515
Change-Id: Ic518fd8f7565d67523ea10e3f5afca3a9c8501b8
pache/harmony/luni/net/Socks4Message.java
pache/harmony/luni/util/Base64.java
aa37a8aa3af5a638cdf4e67f9273fb8118a11dee 01-Nov-2010 Brian Carlstrom <bdc@google.com> Avoid races between OpenSSLSocketImpl I/O and close()

The previous change:

commit 5f2e6872311240319509aed64d9f58cd5b64719b
Author: Brian Carlstrom <bdc@google.com>
Date: Mon Aug 23 14:06:51 2010 -0700

SSLSocket.read should throw SocketException not NullPointerException

added checkOpen() to throw SocketException instead of
NullPointerException, but there was still a race between read/write on
one thread and close on another that could allow a
NullPointerException to escape. This change moves checkOpen() calls to
be protected by the existing writeLock/readLock/handshakeLock
synchronzied blocks to avoid this case.

byte buffer error checking for read/write is also moved into the to
lock region to preserve compatability as measured by the test:
libcore.javax.net.ssl.SSLSocketTest#test_SSLSocket_close

Bug: 3153162
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
bc40740e2e9e982908696ec666cc19c77663d0b2 01-Nov-2010 Brian Carlstrom <bdc@google.com> am 12e7cb01: Avoid races between OpenSSLSocketImpl I/O and close()

* commit '12e7cb011c48b228cdeb2b799fff54d7fbfc6d85':
Avoid races between OpenSSLSocketImpl I/O and close()
12e7cb011c48b228cdeb2b799fff54d7fbfc6d85 01-Nov-2010 Brian Carlstrom <bdc@google.com> Avoid races between OpenSSLSocketImpl I/O and close()

The previous change:

commit 5f2e6872311240319509aed64d9f58cd5b64719b
Author: Brian Carlstrom <bdc@google.com>
Date: Mon Aug 23 14:06:51 2010 -0700

SSLSocket.read should throw SocketException not NullPointerException

added checkOpen() to throw SocketException instead of
NullPointerException, but there was still a race between read/write on
one thread and close on another that could allow a
NullPointerException to escape. This change moves checkOpen() calls to
be protected by the existing writeLock/readLock/handshakeLock
synchronzied blocks to avoid this case.

byte buffer error checking for read/write is also moved into the to
lock region to preserve compatability as measured by the test:
libcore.javax.net.ssl.SSLSocketTest#test_SSLSocket_close

Bug: 3153162
Change-Id: I16299f09dc91871407e88eb718073d21a816f683
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
c1a675c80c69decadb736b245f0366f93a94a462 29-Oct-2010 Jesse Wilson <jessewilson@google.com> Remove the tree map in the HTTP headers.

This map is intended make looking up headers faster, but for real-world
sized datasets we spend more energy maintaining the map than we save from
using it.

I benchmarked the Android Market's HTTP connections' header use and it's
significantly faster to skip the map:

run us linear runtime
map+list 413.1 ==============================
list only 65.8 ====

Change-Id: I5b8fef6f999eb1bfe53eea2781f63cdd1002a273
pache/harmony/luni/internal/net/www/protocol/http/Header.java
pache/harmony/luni/internal/net/www/protocol/http/HttpHeaders.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
0eb70e31581a977afa5df3292d1c96e42e548821 28-Oct-2010 Elliott Hughes <enh@google.com> Optimize DataInputStream and a few friends.

Also ensure that we're doing a correct readFully when reading
shorts/ints/longs.

Bug: 3032515
Change-Id: I39e6f926537f5d55063db8fc1c5a1b4b794746d4
pache/harmony/luni/net/PlainSocketImpl.java
8ac847a52e72f0cefbb20a6850ae04468d433a9e 28-Oct-2010 Jesse Wilson <jessewilson@google.com> Fix broken interactions between HTTP response caches and redirects.

This fixes several specific problems:
- HTTP header map didn't contain the status line (under the null key)
- response code, message and version weren't set by caches
- caches didn't work with redirects

This change also makes some significant cleanup to the Headers class.
We might be able to simplify this further by dropping the map, should
that prove efficient enough.

Change-Id: Ib79ec17bef5978b3234f68102114eee7d4b7cda2
http://b/3139211
http://b/3139211
pache/harmony/luni/internal/net/www/protocol/http/Header.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
2dcd7e784e98faf21190a6431aa1dbff7212eb80 27-Oct-2010 Jesse Wilson <jessewilson@google.com> Merge "Fix ResponseCache to support caching of HTTPS responses." into dalvik-dev
37dcf5581f177229ca6c8e7d0d640361640bfb00 27-Oct-2010 Jesse Wilson <jessewilson@google.com> Fix ResponseCache to support caching of HTTPS responses.

Previously it would fail with an internal error because of
inconsistencies because HttpURLConnectionImpl claimed to be
'connected' when it had a cache hit, and HttpsURLConnection
acted upon this by talking to its sockets.

Change-Id: I51f4215ceb9c5fd851223a501488306fa6d382b1
http://b/3043966
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
d29fddcf333997fc2d7429d531e4d934dc705c88 27-Oct-2010 Jesse Wilson <jessewilson@google.com> Flip 'abstract public' to 'public abstract'.

Change-Id: Ice9b81c63cea4a3c08f697a28180c161a13e640e
pache/harmony/xnet/provider/jsse/AbstractSessionContext.java
cb161112da7d3d332b6ea80ae4751c62d06e7ce5 26-Oct-2010 Nick Kralevich <nnk@google.com> am 76fe13de: am 06f64732: am 96f748a2: Merge "fix operator precedence bug when calculating bits." into gingerbread

Merge commit '76fe13dee6dad5589871cd66b1c9e0e734027be6' into dalvik-dev

* commit '76fe13dee6dad5589871cd66b1c9e0e734027be6':
fix operator precedence bug when calculating bits.
76fe13dee6dad5589871cd66b1c9e0e734027be6 26-Oct-2010 Nick Kralevich <nnk@google.com> am 06f64732: am 96f748a2: Merge "fix operator precedence bug when calculating bits." into gingerbread

Merge commit '06f64732e3035e0d2ba69dbd3c6c0257ff462601'

* commit '06f64732e3035e0d2ba69dbd3c6c0257ff462601':
fix operator precedence bug when calculating bits.
caea65e6c3a5b69bc485ca73808df659df251b2d 20-Oct-2010 Nick Kralevich <nnk@google.com> fix operator precedence bug when calculating bits.

Change-Id: I521cdb82f7ad9b2d5ec983716770dac218c49478
pache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java
5d1dfcb5e1e9a0a93a36d7d42a0270af408ef4b3 22-Oct-2010 Brian Carlstrom <bdc@google.com> am 57f2ec9d: Merge "Move improved cert chain handling from CertificateChainValidator to TrustManagerImpl"
9ff0e556917fd66ea30224ac89f6dea7958eda1f 20-Oct-2010 Brian Carlstrom <bdc@google.com> Move improved cert chain handling from CertificateChainValidator to TrustManagerImpl

Bug: 2658463

Change-Id: I014ebfee1f6e2f46b7a842b5bbf6549bf484f3c0
pache/harmony/security/provider/cert/X509CertPathImpl.java
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
e465a415ae1876cf5c46e4492e0253de96afaff5 20-Oct-2010 Brian Carlstrom <bdc@google.com> am ef6370c1: Fix initialization races in X509CertImpl

Merge commit 'ef6370c1b62edf75dc7c3e5411468b55627e037d' into dalvik-dev

* commit 'ef6370c1b62edf75dc7c3e5411468b55627e037d':
Fix initialization races in X509CertImpl
ef6370c1b62edf75dc7c3e5411468b55627e037d 20-Oct-2010 Brian Carlstrom <bdc@google.com> Fix initialization races in X509CertImpl

X509CertImpl instances can be shared between threads without a caller
knowing due to the CERT_CACHE in X509CertFactoryImpl. In some cases,
initialization of pairs of fields such as notBefore/notAfter and
sigAlgOID/sigAlgName were protected by checking if only was one of the
two values were initialized. This could lead to one thread half
initializing a pair and a second thread seeing the half initialized
pair, would assume both halves were initialized, returning an
uninitialized value. Even in the lazy initialization of single fields
there was no use of volatile or synchonized to be properly safe.

Change-Id: Ia7d6238927d0e77f4f2a512458eac66e97f2abbb
http://code.google.com/p/android/issues/detail?id=11870
Bug: 2295023
pache/harmony/security/provider/cert/X509CertImpl.java
1b3761e5761862ec05d7aa283605012e236f17d1 19-Oct-2010 Elliott Hughes <enh@google.com> Merge "Factor out the code that peeks/pokes ints/longs/shorts from a byte[]." into dalvik-dev
af301fb0e674665dae3e9cb94344558923ec8e0a 19-Oct-2010 Elliott Hughes <enh@google.com> Factor out the code that peeks/pokes ints/longs/shorts from a byte[].

My intention here is that I'll want to reuse this code in my BufferIterator
for byte[]s (http://b/3032515).

This actually makes a noticeable nio benchmark improvement, presumably because
of the switch to static methods, so this helps http://b/2985452 too.

I plan on experimenting with native implementations for the new OSMemory
methods, but that can wait.

Change-Id: Ie5b34910b1e99930ba1f13c0e7002245b901039b
pache/harmony/luni/platform/OSMemory.java
1c5aa9ad334fb7ddda5a5b2347ee4d3c67313235 19-Oct-2010 Brian Carlstrom <bdc@google.com> am 8ae047f5: Merge "Change Engine.getInstance interfaces to make usage less error prone"

Merge commit '8ae047f5329f8bc216e3fe377c068fd8457966f4' into dalvik-dev

* commit '8ae047f5329f8bc216e3fe377c068fd8457966f4':
Change Engine.getInstance interfaces to make usage less error prone
6cdb6b7e6939270ccd21790ec95e42197cefc0c3 19-Oct-2010 Brian Carlstrom <bdc@google.com> Change Engine.getInstance interfaces to make usage less error prone

Change-Id: I4c58c95ab4216b52aa8af4fbce7a8d7f4860c2b7
pache/harmony/security/fortress/Engine.java
ce23c2dff2f5ad5b3ada0a6a58aba65ac87ed08b 19-Oct-2010 Brian Carlstrom <bdc@google.com> am 0a480846: Remove Engine.spi memory leak by clearing after access

Merge commit '0a480846a9798c763b088a122ab0dcd3dc3a17b6' into dalvik-dev

* commit '0a480846a9798c763b088a122ab0dcd3dc3a17b6':
Remove Engine.spi memory leak by clearing after access
0a480846a9798c763b088a122ab0dcd3dc3a17b6 19-Oct-2010 Brian Carlstrom <bdc@google.com> Remove Engine.spi memory leak by clearing after access

Also other minor code cleanup such as:
- made assorted fields final
- fixed lazy initialization without volatile or sync

Bug: 1322442
Change-Id: I34e428dff5f07a7291d635c724111d44f2deff1c
pache/harmony/security/fortress/Engine.java
9efa300c26865520498c0ed132ff9ebe499e7d84 18-Oct-2010 Elliott Hughes <enh@google.com> Remove more tabs.

Missed these in the big cleanup because they didn't look like code we were maintaining. The
xalan/xpath/et cetera stuff is all still tab-filled, and there are a few package.html files
too (for which I've raised http://b/3107546).

Change-Id: I7ad956f3c410701fec13731c9affbcedd24a4a9a
pache/harmony/security/asn1/ASN1Choice.java
pache/harmony/security/provider/crypto/DSAPrivateKeyImpl.java
pache/harmony/security/provider/crypto/DSAPublicKeyImpl.java
pache/harmony/security/x501/AttributeTypeAndValueComparator.java
pache/harmony/security/x509/AlgorithmIdentifier.java
pache/harmony/security/x509/Extension.java
pache/harmony/security/x509/Extensions.java
pache/harmony/security/x509/GeneralName.java
pache/harmony/security/x509/TBSCertList.java
1f07ea29bc2d334c55c16227582a7795b8c117c1 18-Oct-2010 Elliott Hughes <enh@google.com> Give every NumberFormatException a useful detail message.

Bug: 3095335
Change-Id: If0409c6328c2fa2a35e5027e20b4786fe87e693b
pache/harmony/luni/util/FloatingPointParser.java
pache/harmony/luni/util/HexStringParser.java
de72f0f4d03ac884c98ff039d0c80f8f8a8fe7db 15-Oct-2010 Jesse Wilson <jessewilson@google.com> am 12dad512: am 2545edd2: am 5b539e57: Merge "Fix HTTPS hostname verification to use the URL host, not the proxy host." into gingerbread

Merge commit '12dad512f75d1b669b36f2dad7bc4d7a90a3b38e' into dalvik-dev

* commit '12dad512f75d1b669b36f2dad7bc4d7a90a3b38e':
Fix HTTPS hostname verification to use the URL host, not the proxy host.
12dad512f75d1b669b36f2dad7bc4d7a90a3b38e 15-Oct-2010 Jesse Wilson <jessewilson@google.com> am 2545edd2: am 5b539e57: Merge "Fix HTTPS hostname verification to use the URL host, not the proxy host." into gingerbread

Merge commit '2545edd22e32e1d2e1cd3c70543fcef112c9d66a'

* commit '2545edd22e32e1d2e1cd3c70543fcef112c9d66a':
Fix HTTPS hostname verification to use the URL host, not the proxy host.
1d95ed8cdeeb023281dc855aa26a444aeccd1c11 15-Oct-2010 Brian Carlstrom <bdc@google.com> am 49a52427: am 7e39eff6: am ed72e08a: Change SSLParametersImpl.getDefaultTrustManager to not throw checked exceptions

Merge commit '49a52427c960328491105cbb08d6c3167ed34d97' into dalvik-dev

* commit '49a52427c960328491105cbb08d6c3167ed34d97':
Change SSLParametersImpl.getDefaultTrustManager to not throw checked exceptions
7f43cc3f91d9322ef85137fb25986d67f838856f 15-Oct-2010 Brian Carlstrom <bdc@google.com> am f97a046b: am 0dc94964: am d6e53e42: SSLParameters.getDefaultTrustManager() should lazily initialize its value

Merge commit 'f97a046bfb36b5bfee49fd527d4de7cb21b211e2' into dalvik-dev

* commit 'f97a046bfb36b5bfee49fd527d4de7cb21b211e2':
SSLParameters.getDefaultTrustManager() should lazily initialize its value
49a52427c960328491105cbb08d6c3167ed34d97 15-Oct-2010 Brian Carlstrom <bdc@google.com> am 7e39eff6: am ed72e08a: Change SSLParametersImpl.getDefaultTrustManager to not throw checked exceptions

Merge commit '7e39eff6d4fea3af79d9fff32e620ee86ba700b4'

* commit '7e39eff6d4fea3af79d9fff32e620ee86ba700b4':
Change SSLParametersImpl.getDefaultTrustManager to not throw checked exceptions
f97a046bfb36b5bfee49fd527d4de7cb21b211e2 15-Oct-2010 Brian Carlstrom <bdc@google.com> am 0dc94964: am d6e53e42: SSLParameters.getDefaultTrustManager() should lazily initialize its value

Merge commit '0dc949645456739af3cbb8e3bc6221798abb00c5'

* commit '0dc949645456739af3cbb8e3bc6221798abb00c5':
SSLParameters.getDefaultTrustManager() should lazily initialize its value
5b539e574f03fd07a03d8b9acfdad1599f947918 14-Oct-2010 Jesse Wilson <jessewilson@google.com> Merge "Fix HTTPS hostname verification to use the URL host, not the proxy host." into gingerbread
ea8132734c35a1bb011dbd56c2eb5d94e0a14e04 14-Oct-2010 Jesse Wilson <jessewilson@google.com> Fix HTTPS hostname verification to use the URL host, not the proxy host.

Change-Id: I1a0de6f650b89ce0eed908567a04d2e86f76f889
http://b/3097277
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
ed72e08ad6ee16694681c8c2317f97de6d9f4323 13-Oct-2010 Brian Carlstrom <bdc@google.com> Change SSLParametersImpl.getDefaultTrustManager to not throw checked exceptions

Change-Id: Id5a042873acc0a8185567ca18ce009c06e54f38d
pache/harmony/xnet/provider/jsse/SSLParametersImpl.java
d6e53e42867824f97c9fb9c427cc188897ea9315 13-Oct-2010 Brian Carlstrom <bdc@google.com> SSLParameters.getDefaultTrustManager() should lazily initialize its value

Make SSLParametersImpl's defaultKeyManager, defaultTrustManager,
defaultSecureRandom, and defaultParameters all use the single check
idiom for initialization. Move such initialization for
defaultKeyManager and defaultTrustManager out of SSLParametersImpl
constructor into static functions, replacing original
getDefaultTrustManager simple accessor with code that performs lazy
initialization.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLParametersImpl.java

dirrect -> direct
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLParametersImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSocketImpl.java

hanshake -> handshake
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLRecordProtocol.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/HandshakeProtocol.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSocketImpl.java

Bug: 2954292
Change-Id: I19bae541613666903b57fccf3e8bfef65b74d6cf
pache/harmony/xnet/provider/jsse/HandshakeProtocol.java
pache/harmony/xnet/provider/jsse/SSLParametersImpl.java
pache/harmony/xnet/provider/jsse/SSLRecordProtocol.java
pache/harmony/xnet/provider/jsse/SSLSocketImpl.java
12f2d8e2760b78c673b7a187b9062b3938a03147 12-Oct-2010 Brian Carlstrom <bdc@google.com> Revised CloseGuard usage pattern

- CloseGuard.get() instants are now "unopened"
- In constructor cases, guard.open("...") is now at the end
- In metod cases, guard.open("...") is now after resource acquisition
- guard null pointer checks in finalizers in case constructor threw exception

Bug: 2645458
Change-Id: Ieb874a8c33b347768a9fa7437b3dd16f3d56d886
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
cdce865a463ec17f35c4cc1a6f71813c78e3a566 06-Oct-2010 Brian Carlstrom <bdc@google.com> resolved conflicts for merge of 33cb9824 to dalvik-dev

Change-Id: I36508876ffcda358379a0955f107c8706e6130e2
33cb9824c6950db2b6c76d7fddec9fb471316b42 06-Oct-2010 Brian Carlstrom <bdc@google.com> Remove OpenSSLSocketImpl.instanceCount

Its use in ActivityThread is being replaced with Debug.countInstancesOfClass(OpenSSLSocketImpl.class)

Bug: 3015791
Change-Id: I26ece579f8e0fce62f17f398055b16aceaaf1b08
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
f7aab022dcbfcd8f27b409ab92b4bca4a84d0b8a 30-Sep-2010 Brian Carlstrom <bdc@google.com> CloseGuard: finalizers for closeable objects should log complaints

Introducing CloseGuard which warns when resources are implictly
cleaned up by finalizers when an explicit termination method, to use
the Effective Java "Issue 7: Avoid finalizers" terminology, should
have been used by the caller.

libcore classes that can use CloseGuard now do so.

Bug: 3041575
Change-Id: I4a4e3554addaf3075c823feb0a0ff0ad1c1f6196
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
pache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java
fcc5c4e8e84b6d486de73fbd16bee04bd1869956 04-Oct-2010 Jesse Wilson <jessewilson@google.com> Merge "Save unnecessary close() and flush() calls in HTTP uploads." into dalvik-dev
d63678c46aa74720b2a9feb25aeba03b9697475b 04-Oct-2010 Jesse Wilson <jessewilson@google.com> Save unnecessary close() and flush() calls in HTTP uploads.

The calls weren't hurting anything, but the only caller of
this method already closes the output stream and flushes the
socket stream.

Change-Id: Ib57c997d7ed6cf21091211b2eb005bbabac8363c
pache/harmony/luni/internal/net/www/protocol/http/RetryableOutputStream.java
a7a70410e26802f3ab480b08a1ab499338cb6f7e 03-Oct-2010 Jesse Wilson <jessewilson@google.com> Use IoUtils.closeQuietly where possible.

Change-Id: I354c1e00b7068108032d09c0a1c38e29f6283fb0
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLInputStream.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
pache/harmony/xml/ExpatParser.java
pache/harmony/xml/ExpatReader.java
pache/harmony/xnet/provider/jsse/FileClientSessionCache.java
82281cde1eaec8f299cc7d4f383f716cf9e6fe71 02-Oct-2010 Brian Carlstrom <bdc@google.com> am dc825fef: am 9583c700: am cd68630d: Merge "SSL* AppData should not hold onto JNI global references" into gingerbread

Merge commit 'dc825fef1519d4a65abf374e31d985cb2faf9d4a' into dalvik-dev

* commit 'dc825fef1519d4a65abf374e31d985cb2faf9d4a':
SSL* AppData should not hold onto JNI global references
dc825fef1519d4a65abf374e31d985cb2faf9d4a 02-Oct-2010 Brian Carlstrom <bdc@google.com> am 9583c700: am cd68630d: Merge "SSL* AppData should not hold onto JNI global references" into gingerbread

Merge commit '9583c70042da95219941b430d51a9994334e49f0'

* commit '9583c70042da95219941b430d51a9994334e49f0':
SSL* AppData should not hold onto JNI global references
80b486724ca19b3c1c3c36334d06856330362f83 01-Oct-2010 Jesse Wilson <jessewilson@google.com> Simplify skip() to use skipByReading or the superclass where possible.

Several classes were overriding InputStream.skip() but not doing
anything better than the base class. These were deleted.

Others were allocating skip buffers which was correct, but duplicated
code with our Streams utility class.

The CipherInputStream class had a skip method that always skipped
0 bytes. This has been fixed and tested.

Change-Id: Ic96c600e111c11cf7364b4e0a721791d7e3c2ae1
pache/harmony/luni/internal/net/www/protocol/http/AbstractHttpInputStream.java
pache/harmony/luni/internal/net/www/protocol/jar/JarURLConnectionImpl.java
pache/harmony/luni/net/SocketInputStream.java
pache/harmony/security/provider/cert/X509CertFactoryImpl.java
pache/harmony/xnet/provider/jsse/SSLInputStream.java
pache/harmony/xnet/provider/jsse/SSLSocketInputStream.java
df9c090e85c4d052cdd17b5f981819be86a56737 01-Oct-2010 Brian Carlstrom <bdc@google.com> SSL* AppData should not hold onto JNI global references

Summary:

NativeCrypto.SSL_do_handshake stored JNI global references in its
AppData instance for use in upcalls from OpenSSL that invoke Java
callbacks. However, one of the references was to the
SSLHandshakeCallbacks which in the common case of OpenSSLSocketImpl is
the OpenSSLSocketImpl instance itself. This meant that if code dropped
the OpenSSLSocketImpl without closing (such as Apache HTTP Client),
the instances would never be collected, and perhaps more importantly,
file descriptors would not be closed.

The fix is to pass in the objects required during a callback in all
downcalls to SSL_* methods that could result in a callback and clear
them on return. The existing code already did this for the JNIEnv*, so
that code was expanded to handle setting the jobjects as well.

Details:

In the native code used to extract the FileDescriptor object from a
Socket on the call to NativeCrypto.SSL_do_handshake. However, since we
need this for every read and write operations, we now do this in Java
to avoid the repeated overhead. NativeCrypto.SSL_do_handshake now
takes a FileDescriptor, which it extracted from the Socket the
convenience function using NativeCrypto.getFileDescriptor(Socket)

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java

In addition to tracking changes to pass FileDescriptor and
SSLHandshakeCallbacks, removed final uses of getFieldId since the
code no longer needs to extract FileDescriptors itself

luni/src/main/native/NativeCrypto.cpp

The Socket field used to be non-null in the wrapper case and null in
the non-wrapper case. To simplify things a bit, "socket == this" in
the non-wrapper case. The socket field is now also final and joined by
a final FileDescriptor field.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

Updated NativeCryptoTest to track FileDescriptor and
SSLHandshakeCallbacks by expanding the Hooks.afterHandshake to provide
them. Also changed to add a 5 second timeout to many test cases.

luni/src/test/java/org/apache/harmony/xnet/provider/jsse/NativeCryptoTest.java

Bug: 2989218

Change-Id: Iccef92b59475f3c1929e990893579493ece9d442
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
8f3d7240bafb2753514b7bc84c95ef9657452c83 01-Oct-2010 Jesse Wilson <jessewilson@google.com> am 082d39a2: am e8c1e814: Merge "Don\'t explode if flush() is called when an HTTP upload stream is closed." into gingerbread

Merge commit '082d39a20d3844e02822d8c96a26230f6f4a0590'

* commit '082d39a20d3844e02822d8c96a26230f6f4a0590':
Don't explode if flush() is called when an HTTP upload stream is closed.
f29ad8a60254345d1943d1b3836482395a7c916f 30-Sep-2010 Jesse Wilson <jessewilson@google.com> Don't explode if flush() is called when an HTTP upload stream is closed.

Streams like BufferedOutputStream always call flush() even if it is
a no-op. These flushes must be permitted for compatibility with apps
that don't call close() until after the response has been retrieved.

Change-Id: Ic5c86ab6050c6c4d166c44ae5b4fc7a1688e7e45
http://b/3038470
pache/harmony/luni/internal/net/www/protocol/http/ChunkedOutputStream.java
pache/harmony/luni/internal/net/www/protocol/http/FixedLengthOutputStream.java
pache/harmony/luni/internal/net/www/protocol/http/RetryableOutputStream.java
63fcdd7e833df417cfbd60961a5167ce637f3071 29-Sep-2010 Brian Carlstrom <bdc@google.com> resolved conflicts for merge of 53e83038 to master

Conflicts:
luni/src/main/java/java/io/FileInputStream.java
luni/src/main/java/java/io/FileOutputStream.java
luni/src/main/java/javax/crypto/ExemptionMechanism.java
luni/src/main/java/org/apache/harmony/luni/net/PlainDatagramSocketImpl.java
luni/src/main/java/org/apache/harmony/luni/net/PlainSocketImpl.java

Change-Id: I0dd5da8e8cb1819cb90440c462ba307dffde8ed7
e2f58c9501eac730d048199906dc41fe8e4cd6e9 29-Sep-2010 Brian Carlstrom <bdc@google.com> Scrub missing calls to super.finalize()

Bug: 3024226
Change-Id: I6642cb9d4929ba72244529efe4ebdfa595ae4fa7
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/xml/ExpatParser.java
pache/harmony/xnet/provider/jsse/AbstractSessionContext.java
pache/harmony/xnet/provider/jsse/OpenSSLMessageDigestJDK.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
d4b134ec6762fa9e85f97d2174497df5e6af8566 26-Sep-2010 Brian Carlstrom <bdc@google.com> am 873c0bfb: am a1b18854: Merge "Fix OpenSSLSessionImpl.getValueNames regression" into gingerbread

Merge commit '873c0bfbf627fa15dd44463f9a664b6f83c74594'

* commit '873c0bfbf627fa15dd44463f9a664b6f83c74594':
Fix OpenSSLSessionImpl.getValueNames regression
4071cf16af7a9a7234856d3ff1837df0da168c6c 25-Sep-2010 Brian Carlstrom <bdc@google.com> Fix OpenSSLSessionImpl.getValueNames regression

In e32b21f14d52bac429a9c54fe031f9e92c911d64, the code was converted to
use Objects.equals. However, because of a typo, an autoboxed Boolean
was passed instead of an AccessControlContext. I reviewed the rest of
the original change to make sure there were no other instances of this
regression.

Also cleaned up the SSLSessionTest (fixing two broken tests
test_getLocalPrincipal and test_getPeerPrincipal) and fixed a
whitespace issue in AccessControlContext.

Change-Id: Icaee8a0c2f5f527bea7a80037fe3f99c509d9f42
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
b55a9297dd1645c4924ac1afa77cbb3010191b1c 25-Sep-2010 Brian Carlstrom <bdc@google.com> am 51e0ec67: am e9baa585: Merge "OpenSSLSocketImpl should not call NativeCrypto.SSL_set_client_CA_list with an empty array" into gingerbread

Merge commit '51e0ec67ca5e78ffd907506c780f5dfd340e9f59'

* commit '51e0ec67ca5e78ffd907506c780f5dfd340e9f59':
OpenSSLSocketImpl should not call NativeCrypto.SSL_set_client_CA_list with an empty array
0150f73ac180714cae49782e674ecb68fde12326 25-Sep-2010 Brian Carlstrom <bdc@google.com> OpenSSLSocketImpl should not call NativeCrypto.SSL_set_client_CA_list with an empty array

Bug: 3034616
Change-Id: Ib39ebfa737910f0ebce5ac2ad87715579bd7aa3d
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
1f2210d6521a7dff68a31297e7dc53a5e912d306 24-Sep-2010 Brian Carlstrom <bdc@google.com> am 4256e142: am 7f911911: am cdeb8093: Fix ArrayIndexOutOfBoundsExceptions in cert Cache on zero filled array input

Merge commit '4256e14221ea668f030fafe0fa9eccd1ca6e6cf6' into dalvik-dev

* commit '4256e14221ea668f030fafe0fa9eccd1ca6e6cf6':
Fix ArrayIndexOutOfBoundsExceptions in cert Cache on zero filled array input
cdeb809350d8c1a14a96924bf01febfa82a8b5b6 23-Sep-2010 Brian Carlstrom <bdc@google.com> Fix ArrayIndexOutOfBoundsExceptions in cert Cache on zero filled array input

The Harmony cert Cache has a long[] where each long is a combination
of a hash and an one-based index into another table containing the
cached values. The cache is searched with Arrays.binarySearch, which
should never find an actual hit, since even a hash hit will look like
a miss since the input hash doesn't contain the one-based index and
entries in the table do. However, this approach has the property that
both hits and misses give the same location in the array, which is
subsequently checked for a real hit/miss with a mask.

However, the hash of a byte array filled with zeroes was zero, which
is found by Arrays.binarySearch in unused slots. Unfortunately, the
code never expects a direct hit, so when it does uses -index-1 to find
the slot to check for hit/miss, it ends up with a negative number,
causing the ArrayIndexOutOfBoundsExceptions.

The solution is ensure that when the hash function returns zero to
simply treat it as a miss. It should not be true for any non-trival
legal input.

Bug: 2753594
Change-Id: I2ee282cc28f22a0ca26da311ae683edf548c67a6
pache/harmony/security/provider/cert/Cache.java
2550478eb3ff8283ebac6ba2a683fd7bbb23e3ee 22-Sep-2010 Brian Carlstrom <bdc@google.com> am 7452795a: am f8f14c30: am 1be19cf6: Tracking external/bouncycastle OpenSSLDigest

Merge commit '7452795a3d40cac126b21f85316b36b035950371' into dalvik-dev

* commit '7452795a3d40cac126b21f85316b36b035950371':
Tracking external/bouncycastle OpenSSLDigest
1be19cf6a06834e97608dffd87c30d604b02196a 22-Sep-2010 Brian Carlstrom <bdc@google.com> Tracking external/bouncycastle OpenSSLDigest

Making OpenSSLMessageDigestJDK final to match OpenSSLDigest version
Fixing WITH_JNI_TRACE used for debugging OpenSSLDigest

Bug: 3024499
Change-Id: I919749348e531d074a25e16ab13315cede4f88e5
pache/harmony/xnet/provider/jsse/OpenSSLMessageDigestJDK.java
48d526fa7c933a74e7c87984fd39effcc5401412 22-Sep-2010 Jesse Wilson <jessewilson@google.com> am 0fe127c1: am 3388fbc2: am 301db343: Merge "Fix problem where single-byte reads were unsigned." into gingerbread

Merge commit '0fe127c1981e7ad8c02eb9f2a46601dfcacde39f' into dalvik-dev

* commit '0fe127c1981e7ad8c02eb9f2a46601dfcacde39f':
Fix problem where single-byte reads were unsigned.
301db343e965a7943704887bf29e7f2d94fd3ac6 22-Sep-2010 Jesse Wilson <jessewilson@google.com> Merge "Fix problem where single-byte reads were unsigned." into gingerbread
ef66494dce45a0b7ec22ec3fb20c60096517a4e3 22-Sep-2010 Jesse Wilson <jessewilson@google.com> Fix problem where single-byte reads were unsigned.

Change-Id: Ib0bc273698b71d13a90a03a8c60498ad7de5ad9d
http://b/3023872
pache/harmony/luni/internal/net/www/protocol/http/AbstractHttpInputStream.java
ae704b984c10a63883cc366e823d53902d6ac7a9 21-Sep-2010 Elliott Hughes <enh@google.com> Minor tidy-up.

The nio implementation is still a bit of a mess because Java doesn't have any
kind of "module" concept, nor "friend". But this makes it a little less untidy,
and makes the deliberate access control subversions a little more explicit, and
makes various things less accessible than they were.

Change-Id: I514b1e24000b91f86b768ed408fedae115dc3080
pache/harmony/nio/FileChannelFactory.java
pache/harmony/nio/internal/DatagramChannelImpl.java
pache/harmony/nio/internal/FileChannelImpl.java
pache/harmony/nio/internal/FileLockImpl.java
pache/harmony/nio/internal/LockManager.java
pache/harmony/nio/internal/PipeImpl.java
pache/harmony/nio/internal/ReadOnlyFileChannel.java
pache/harmony/nio/internal/ReadWriteFileChannel.java
pache/harmony/nio/internal/SelectionKeyImpl.java
pache/harmony/nio/internal/SelectorImpl.java
pache/harmony/nio/internal/SelectorProviderImpl.java
pache/harmony/nio/internal/ServerSocketChannelImpl.java
pache/harmony/nio/internal/SocketChannelImpl.java
pache/harmony/nio/internal/WriteOnlyFileChannel.java
bffb058e565a97f838247f1e092b0d17b26cb68e 21-Sep-2010 Elliott Hughes <enh@google.com> Stop doing unbuffered file I/O in ZoneInfoDB.

Use the new memory-mapped code for the index as well as for individual time
zones. This takes the (once-only, during boot) index-reading time down
from ~90ms to ~20ms. DataInputStream(BufferedInputStream(FileInputStream))
would have got us down to ~40ms.

Also remove duplication amongst code snippets that want to read a whole file
into a byte[].

Bug: 3014973
Change-Id: I9d8a326438663314b7f5ee0145cda32ea335f41d
pache/harmony/luni/internal/util/ZoneInfoDB.java
c18fe70cc844546c7e1e34b501c185d784d7f863 20-Sep-2010 Brian Carlstrom <bdc@google.com> am 7806efe8: am 862e1168: am 03fef47f: Merge "SSLSocket should respect timeout of a wrapped Socket" into gingerbread

Merge commit '7806efe820ff848e99eecef68a6df4049b9eb3c5' into dalvik-dev

* commit '7806efe820ff848e99eecef68a6df4049b9eb3c5':
SSLSocket should respect timeout of a wrapped Socket
8b5d96adf89ade9a35b94032e5762e5f602c24a0 20-Sep-2010 Brian Carlstrom <bdc@google.com> am fcc7302e: am 748ccde6: am dad46534: Merge "Use BufferedInputStream when reading cacerts.bks" into gingerbread

Merge commit 'fcc7302ea9bbfd553188d369459428b2e8f39fb2' into dalvik-dev

* commit 'fcc7302ea9bbfd553188d369459428b2e8f39fb2':
Use BufferedInputStream when reading cacerts.bks
03fef47fc07bfc4cb2a7a154c9961cd96d910e0e 20-Sep-2010 Brian Carlstrom <bdc@google.com> Merge "SSLSocket should respect timeout of a wrapped Socket" into gingerbread
ae74f07204bd23b45b8dd8c3329dc454fa44500b 20-Sep-2010 Elliott Hughes <enh@google.com> Merge "Optimize non-direct (heap) buffer bulk put." into dalvik-dev
8fbc397fc09158bee0bc0cb231c609c4c6e9fc15 18-Sep-2010 Elliott Hughes <enh@google.com> Optimize non-direct (heap) buffer bulk put.

I've also factored out the bounds checking, even though the JIT can't yet
inline it back. I'm unwilling to duplicate all that code again.

This patch also fixes bugs in the previous checkin relating to offsets
and positions. In real life (and, seemingly, in all our tests) these tend
to be 0, making it rare that anyone trips over these bugs. (The first nio
change I made was fixing just such a bug.) I've improved the test I added
last time so that it covers more of these cases.

Here are the "after" performance figures for heap buffer bulk copies:

CharBuffer_getCharArray 5797
CharBuffer_putCharArray 5818
DoubleBuffer_getDoubleArray 13053
DoubleBuffer_putDoubleArray 13026
FloatBuffer_getFloatArray 8216
FloatBuffer_putFloatArray 8283
IntBuffer_getIntArray 8253
IntBuffer_putIntArray 8371
LongBuffer_getLongArray 13053
LongBuffer_putLongArray 13020
ShortBuffer_getShortArray 5796
ShortBuffer_putShortArray 5864

This compares well with with direct buffer performance (just gets shown here):

CharBuffer_getCharArray 4412
DoubleBuffer_getDoubleArray 11594
FloatBuffer_getFloatArray 6787
IntBuffer_getIntArray 6791
LongBuffer_getLongArray 11672
ShortBuffer_getShortArray 4430

Bug: 2985452
Change-Id: I37307f9b304c87a87af5313790444dcdf6174ff1
pache/harmony/luni/platform/OSMemory.java
a4a95792af235d4bf3256eab3208f74fae8ec262 19-Sep-2010 Brian Carlstrom <bdc@google.com> SSLSocket should respect timeout of a wrapped Socket

Change to using getSoTimeout in OpenSSLSocketImpl instead of directly
using the timeout field. This means the proper timeout will be used
for instances of the OpenSSLSocketImplWrapper subclass, which is used
when an SSLSocket is wrapped around an existing connected non-SSL
Socket. The code still maintains the local timeout field, now renamed
timeoutMilliseconds, which is now accesed via
OpenSSLSocketImpl.getSoTimeout. Doing so prevents a getsockopt syscall
that otherwise would be necessary if the super.getSoTimeout() was used.

Added two unit tests for testing timeouts with SSLSockets wrapped
around Socket. One is simply for getters/setters. The second makes
sure the timeout is functioning when set on the underlying socket.

Bug: 2973305
Change-Id: Idac52853f5d777fae5060a840eefbfe85d448e4c
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
d75cf432ba5c084e39ff7a24c388ca5c1c151db7 19-Sep-2010 Brian Carlstrom <bdc@google.com> Use BufferedInputStream when reading cacerts.bks

Change-Id: Ibc20bdcadb5c3bc4bcebfeb96b10c42d9c05e7c8
pache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java
793e1cdbba5545b507196bf461f691e32357a0ad 18-Sep-2010 Jesse Wilson <jessewilson@google.com> am 99b2d653: am f697be0f: am ac277be6: Handle the different definitions of \'connected\' in HttpURLConnection.

Merge commit '99b2d6535ceaeae74887b4fc4eac674d3564dddc' into dalvik-dev

* commit '99b2d6535ceaeae74887b4fc4eac674d3564dddc':
Handle the different definitions of 'connected' in HttpURLConnection.
5bc63447ee73a49de8a572a6b955af4cdc18be98 18-Sep-2010 Jesse Wilson <jessewilson@google.com> am 96c076dd: am e74b3ecc: am d4bddd7d: Fix two HTTP issues that came up when writing HttpURLConnection docs.

Merge commit '96c076ddd30d862dae69a35e1700d2befb2ee055' into dalvik-dev

* commit '96c076ddd30d862dae69a35e1700d2befb2ee055':
Fix two HTTP issues that came up when writing HttpURLConnection docs.
ac277be6a146ade8f150236edf730431a7e12482 18-Sep-2010 Jesse Wilson <jessewilson@google.com> Handle the different definitions of 'connected' in HttpURLConnection.

Previously we were failing with a NullPointerException when
HTTP redirects required connecting to a different server.

The connected field means 'we can't change request parameters'.
The connection being non-null means 'we're currently connected'.

Internally, multiple connections are permitted in order to support
HTTP redirects. But in the public API only one connect() call is
permitted.

I've added a new method, makeConnection() to make the magic work.

Change-Id: Ic644d5d192ec2b1de781dc271ae149bcd1655de4
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
d4bddd7d1fb7b1b7f0836648228235c6e4b56a18 16-Sep-2010 Jesse Wilson <jessewilson@google.com> Fix two HTTP issues that came up when writing HttpURLConnection docs.

We're now more careful about which headers are sent to HTTP proxies.
And getContentEncoding() is better documented.

Change-Id: I04241f99c2f32c25ba005fbd6ff9ef7236c3c9d3
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
de9cc690b991ba97f1cce542b184e8ffd45f710f 18-Sep-2010 Jesse Wilson <jessewilson@google.com> am c6a54a4c: am 7b1454a7: am 88776877: Merge "Don\'t leave the Content-Encoding header around after transparent gzip." into gingerbread

Merge commit 'c6a54a4c0cb58a8d05058f9ecbcf5988ccdd6211' into dalvik-dev

* commit 'c6a54a4c0cb58a8d05058f9ecbcf5988ccdd6211':
Don't leave the Content-Encoding header around after transparent gzip.
6944bea4a129dc2d4be687c72f2a9f228ec532bc 17-Sep-2010 Elliott Hughes <enh@google.com> Make nio heap (non-direct) buffer bulk get orders of magnitude faster.

Bug: 2985452
Change-Id: I8bd210d1a623e434121f30eca6e2555e1aea11cd
pache/harmony/luni/platform/OSMemory.java
8877687711ba5a04aadc2ef34ae5f417c65c51b7 17-Sep-2010 Jesse Wilson <jessewilson@google.com> Merge "Don't leave the Content-Encoding header around after transparent gzip." into gingerbread
8116f7e97e00d223e7fbe5c950c9a5e3277de124 17-Sep-2010 Jesse Wilson <jessewilson@google.com> Don't leave the Content-Encoding header around after transparent gzip.

Otherwise clients may be tempted to double-decompress.
http://b/issue?id=3009828

Change-Id: I4832da1c2aff9bad8d452ffc4a0f98ee27d44f49
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
fe20355288377b2d80ce5eb3aaaa548b0af04c8e 17-Sep-2010 Brian Carlstrom <bdc@google.com> am e3babe52: am 69a153da: am 760b683e: Restore OpenSSLMessageDigestJDK.digest reset behavior

Merge commit 'e3babe523df804f88d2371645c2c7e1731411ac2' into dalvik-dev

* commit 'e3babe523df804f88d2371645c2c7e1731411ac2':
Restore OpenSSLMessageDigestJDK.digest reset behavior
760b683ed34f2e62fc4ab1d483988bee515af03e 17-Sep-2010 Brian Carlstrom <bdc@google.com> Restore OpenSSLMessageDigestJDK.digest reset behavior

SSLEngine tests started failing due to the recent incorrect change to
OpenSSLMessageDigestJDK.digest() that removed the reset of
MessageDigest state on call to digest(). The problem was not that the
digest was resetting, but that it was resetting to use a SHA-0
algorithm. See recent change c38b8476e7e4bd4b091d9f0e8fe8b2b972e7bc81.

Change-Id: I40ef4e18a1b546eac5a487cb8a808d4897b301b0
pache/harmony/xnet/provider/jsse/OpenSSLMessageDigestJDK.java
65f89458ba2929e1e806b7463c1e36e94f75e506 17-Sep-2010 Brian Carlstrom <bdc@google.com> am dc1c4756: am 156f071f: am a3a93d45: Merge "OpenSSLMessageDigestJDK.reset should not change from SHA-1 to SHA-0" into gingerbread

Merge commit 'dc1c475681e06d3f9bdd9cd4aab31145ba20c542' into dalvik-dev

* commit 'dc1c475681e06d3f9bdd9cd4aab31145ba20c542':
OpenSSLMessageDigestJDK.reset should not change from SHA-1 to SHA-0
f8fd3aced841e19bf3552fe81289297302a4f3a5 17-Sep-2010 Brian Carlstrom <bdc@google.com> am e6b59c28: am 9e8d51c7: am a3de55dd: Implement OpenSSLMessageDigestJDK.clone and fix OpenSSLMessageDigestJDK.digest

Merge commit 'e6b59c287ed3007d76167dd9741dc683f440ed2d' into dalvik-dev

* commit 'e6b59c287ed3007d76167dd9741dc683f440ed2d':
Implement OpenSSLMessageDigestJDK.clone and fix OpenSSLMessageDigestJDK.digest
c38b8476e7e4bd4b091d9f0e8fe8b2b972e7bc81 17-Sep-2010 Brian Carlstrom <bdc@google.com> OpenSSLMessageDigestJDK.reset should not change from SHA-1 to SHA-0

For SHA-1, the OpenSSLMessageDigestJDK constructor was called with the
algorithm name "SHA-1", which it passed to the superclass constructor
for use as the algorithm field. However, MessageDigest.getInstance
would then override this value with the its own algorithm argument. In the
case of getInstance("SHA"), this mean the constructor would set the
value to "SHA-1" (from the OpenSSLMessageDigestJDK.SHA1 subclass
constructor) which would then be overridden by getInstance to
"SHA". Because the OpenSSLMessageDigestJDK would then initialize using
"SHA-1", the MessageDigest worked in the common case. However, when it
was MessageDigest.reset(), it called getAlgorithm() which returned
"SHA", which was then passed to OpenSSL as "sha" which interpretted
this as "SHA-0".

The fix is to change to pass both a standard name (e.g "SHA-1") as
well as openssl name expliclty (e.g. "sha1"), removing the somewhat
hacky code that tried to algorithmically transform from the standard
names to the openssl ones.

The same fix needs to be made to OpenSSLDigest. We also are removing
SHA-0 from openssl since it is unneeded and would have cause an clear
error if it had been absent.

Change-Id: Iaa8f5b93a572fb043fa4f2618070ebb5054f82b1
pache/harmony/xnet/provider/jsse/OpenSSLMessageDigestJDK.java
a3de55ddf81f95c7c0fc1b8767ccb1ecfa251c83 16-Sep-2010 Brian Carlstrom <bdc@google.com> Implement OpenSSLMessageDigestJDK.clone and fix OpenSSLMessageDigestJDK.digest

DigestInputStream2Test.test_onZ was failing because OpenSSLMessageDigestJDK did not implement Clonable
- Implementing Clonable required a new NativeCrypto.EVP_MD_CTX_copy method
- While adding NativeCrypto.EVP_MD_CTX_copy, noticed other methods
were not properly named in NativeCrypto.EVP_MD_CTX_* convention.
- Converted rest of NativeCrypto.cpp to JNI_TRACE logging while debugging

DigestOutputStreamTest.test_onZ was failing because OpenSSLMessageDigestJDK.digest did an engineReset
- Removing the engineReset revealed that digest() could not be called
repeatedly on an OpenSSLMessageDigestJDK. Problem was that
EVP_DigestFinal can only be called once per digest.
- Changed engineDigest implementation to use new EVP_MD_CTX_copy to
create a temp EVP_MD_CTX which can be used to retreive the digest
and then discarded.

Bug: 2997405
Change-Id: Ie97c22be245911300d2e729e451a9c4afdb27937
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLMessageDigestJDK.java
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
08a723cb3291b96a323478bd7d799192818cb0b1 15-Sep-2010 Jesse Wilson <jessewilson@google.com> Fix problems discovered by Channels/Basic test.

In particular:
- available() wasn't trying very hard for FileChannels
where a reasonable value can be had.
- short writes weren't handled, so bytes were being lost
- the alternative InputStreamReader and OutputStreamReader
classes were incorrect and redundant
- the duplicated ChannelInputStream classes were redundant
and one was missing a required IllegalBlockingModeException
- bounds checks were redundant and handled by Bytebuffer.wrap
- null checks were missing.

The new code doesn't honor the user's supplied minBufferCapacity
and instead always uses 8K. 8K is larger than the 'min' so it
should be fine for undersized buffers. And it's sufficient for
high performance, so it should be fine for oversized buffers.
It'll only be a problem for clients that create a very large
number of these Readers, which shouldn't happen in practice.

http://b/issue?id=2233508

Change-Id: I3688397baae4f69f9146aed6a3a60d8333e5df1d
pache/harmony/nio/internal/IOUtil.java
6cab4071580a4b216d943b337af118533c65e495 15-Sep-2010 Brian Carlstrom <bdc@google.com> resolved conflicts for merge of 4b60175b to dalvik-dev

Change-Id: I63d0c5949be0984dcd7939205463eefabde8af05
bb986f53228cc355f60ea933fda216842bb1df73 15-Sep-2010 Brian Carlstrom <bdc@google.com> am 1ca26549: am 912db46c: am 6812a2e8: Rename internal SSLParameters to SSLParametersImpl to avoid collision with new javax.net.ssl.SSLParameters

Merge commit '1ca26549fbe0f4bc171ba7bf8ab0a86ae591c618' into dalvik-dev

* commit '1ca26549fbe0f4bc171ba7bf8ab0a86ae591c618':
Rename internal SSLParameters to SSLParametersImpl to avoid collision with new javax.net.ssl.SSLParameters
ca88b4c628937cd6afc9476773cc334d6d32de8c 15-Sep-2010 Brian Carlstrom <bdc@google.com> am 99eec0d3: am 9b6ed9bf: am 2b6188df: Merge "Remove SSLContextImpl.engineInit(..) that takes persistent cache arguments" into gingerbread

Merge commit '99eec0d31a89366c9c765db845a022fa6cf7cf42' into dalvik-dev

* commit '99eec0d31a89366c9c765db845a022fa6cf7cf42':
Remove SSLContextImpl.engineInit(..) that takes persistent cache arguments
d6b9f2e0e9640ff9c896b394716cf5e7eee6e257 14-Sep-2010 Elliott Hughes <enh@google.com> Much faster TimeZone.getTimeZone using a new private mmap(2) interface.

froyo:

benchmark us logarithmic runtime
TimeZone_getDefault 8.43 =
TimeZone_getTimeZoneUTC 1140.19 ===========================
TimeZone_getTimeZone_America_Caracas 1537.78 ============================
TimeZone_getTimeZone_America_Santiago 1920.50 =============================
TimeZone_getTimeZone_GMT_plus_10 1089.90 ==========================
TimeZone_getTimeZone_default 1105.54 ===========================

dalvik-dev:

benchmark us logarithmic runtime
TimeZone_getDefault 7.37 =
TimeZone_getTimeZoneUTC 30.35 ================
TimeZone_getTimeZone_America_Caracas 35.98 ==================
TimeZone_getTimeZone_America_Santiago 100.21 ==============================
TimeZone_getTimeZone_GMT_plus_10 43.83 ====================
TimeZone_getTimeZone_default 31.32 =================

There are two main changes. The biggest one is to use our own private mmap(2)
API. We might want to make this more generally available in the long term, but
for now it's pretty unsafe; we do nothing to detect invalidated iterators, and
we do no bounds checking. But that's fine for our internal use.

The other change is to recognize that we don't actually need the abbreviated
names. We were only using them for hashCode and equals, and the canonical Olson
id seems like a much better choice for those purposes! That then means that we
don't need to read in as much data in the first place. This makes more
difference for simpler time zones (such as Caracas in the example) because the
overhead is pretty much fixed.

The profile now has us spending most of our time in String.compareTo (for the
binary search) and in OSMemory (paying for our slow native method calling).

Change-Id: I848a318572008e0be8a4a330bb14d2f791353200
pache/harmony/luni/internal/util/ZoneInfo.java
pache/harmony/luni/internal/util/ZoneInfoDB.java
df349b3eaf4d1fa0643ab722173bc3bf20a266f5 14-Sep-2010 Brian Carlstrom <bdc@google.com> Fix HttpsURLConnectionTest failures

Focusing on HttpsURLConnectionTest.test_doOutput found a number of
unrelated issues, all of which are addressed by this change:
- {HttpURLConnection,HttpsURLConnection}.connect not ignored on subsequent calls
- OpenSSLSessionImpl.{getPeerCertificates,getPeerCertificateChain} did not include client certificate
- OpenSSLSocketImpl.getSession did not skip handshake when SSLSession was already available
- Fix 3 test issues in HttpsURLConnectionTest
- Fix 2 test issues in NativeCryptoTest

Details:

HttpsURLConnectionTest tests (such as test_doOutput) that
tried to call URLConnection.connect() at the end of the test
were raising exception. The RI URLConnection.connect
documentation says calls on connected URLConnections should be ignored.

Use "connected" instead of "connection != null" as reason to ignore "connect"

luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java

Converted one caller of getPeerCertificateChain to
getPeerCertificates which is the new fast path. Track
OpenSSLSessionImpl change to take "java" vs "javax" certificates.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/AbstractSessionContext.java

Move SSL_SESSION_get_peer_cert_chain to be SSL_get_peer_cert_chain
(similar to SSL_get_certificate). The problem was that
SSL_SESSION_get_peer_cert_chain used SSL_get_peer_cert_chain which
in the server case did not include the client cert itself, which
required a call to SSL_get_peer_certificate, which needed the
SSL instance pointer.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java
luni/src/main/native/NativeCrypto.cpp

Improved NativeCrypto_SSL_set_verify tracing

luni/src/main/native/NativeCrypto.cpp

As a side effect of the move to
NativeCrypto.SSL_get_peer_certificate, it no longer made sense to
lazily create the peer certificate chain since the SSLSession
should not depend on a particular SSL instance. The peer chain is
now passed in as part of the constructor and the peerCertifcates
in the OpenSSLSession can be final (also made localCertificates
final). Since peerCertifcates is the newew (java not javax) API
and more commonly used, it is what is created from the native
code, and peerCertificateChain is not derived from peerCertifcates
instead of vice versa.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java

Factored out code to used to create local certificate chain to
from array of DER byte arrays into createCertChain so it can be
reused to create peer certificate chain.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

Fix OpenSSLSocketImpl.getSession to check for existing sslSession
to and skip handshake, which was causing an exception if the
connection had already been closed.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

Fix test issues: Removed PrintStream wrapper of System.out which
was causing vogar to lose output. Added null check in closeSocket,
which can happen in timeout case. Removed use of
InputStream.available which in OpenSSLSocket case returned 0,
causing test to fail incorrectly.

luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/https/HttpsURLConnectionTest.java

Updating to track change to SSL_get_peer_cert_chain. Also fixed
some other unrelated test failures caused by IOException on
shutdown and false start (aka SSL_MODE_HANDSHAKE_CUTTHROUGH)
causing clientCallback.handshakeCompleted to be false.

luni/src/test/java/org/apache/harmony/xnet/provider/jsse/NativeCryptoTest.java

Bug: b/2981767
Change-Id: Id083beb6496558296c2f74f51ab0970e158b23a9
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
pache/harmony/xnet/provider/jsse/AbstractSessionContext.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
6812a2e8bb43d9a875633a9ba255d9882c63e327 14-Sep-2010 Brian Carlstrom <bdc@google.com> Rename internal SSLParameters to SSLParametersImpl to avoid collision with new javax.net.ssl.SSLParameters

Bug: 2672817
Change-Id: Iadf21b848eaf8850fce22721b9ba3739ab2e9fca
pache/harmony/xnet/provider/jsse/HandshakeProtocol.java
pache/harmony/xnet/provider/jsse/OpenSSLServerSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImplWrapper.java
pache/harmony/xnet/provider/jsse/SSLContextImpl.java
pache/harmony/xnet/provider/jsse/SSLEngineImpl.java
pache/harmony/xnet/provider/jsse/SSLParameters.java
pache/harmony/xnet/provider/jsse/SSLParametersImpl.java
pache/harmony/xnet/provider/jsse/SSLServerSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/SSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketWrapper.java
ca99759b4f2aac2f796b430b74a8d3caff9d484a 14-Sep-2010 Brian Carlstrom <bdc@google.com> Remove SSLContextImpl.engineInit(..) that takes persistent cache arguments

Bug: 2672817
Change-Id: I201815857e4452498c746139b8d64b7721bc22cc
pache/harmony/xnet/provider/jsse/SSLContextImpl.java
961da1e7487bdb8ad8ac226d4f2789d003aa87b9 11-Sep-2010 Elliott Hughes <enh@google.com> Optimize bulk get of char[], double[], float[], long[], and short[].

I optimized int[] the other day, and byte[] has always been optimized.
This now makes our get performance equivalent to our put performance,
rather than orders of magnitude worse.

Before:

ByteBuffer_getByteArray 2041 ==========
ByteBuffer_putByteArray 1983 =========
CharBuffer_getCharArray 705152 ============================
CharBuffer_putCharArray 4375 ============
DoubleBuffer_getDoubleArray 860884 =============================
DoubleBuffer_putDoubleArray 11591 ===============
FloatBuffer_getFloatArray 839085 =============================
FloatBuffer_putFloatArray 6690 =============
IntBuffer_getIntArray 6814 =============
IntBuffer_putIntArray 6775 =============
LongBuffer_getLongArray 668171 ============================
LongBuffer_putLongArray 11585 ===============
ShortBuffer_getShortArray 620122 ============================
ShortBuffer_putShortArray 4350 ============

After:

ByteBuffer_getByteArray 2028 ===========
ByteBuffer_putByteArray 1948 ===========
CharBuffer_getCharArray 4376 =================
CharBuffer_putCharArray 4342 =================
DoubleBuffer_getDoubleArray 11616 =======================
DoubleBuffer_putDoubleArray 11540 =======================
FloatBuffer_getFloatArray 6827 ====================
FloatBuffer_putFloatArray 6747 ====================
IntBuffer_getIntArray 6824 ====================
IntBuffer_putIntArray 6733 ====================
LongBuffer_getLongArray 11597 =======================
LongBuffer_putLongArray 11489 =======================
ShortBuffer_getShortArray 4392 =================
ShortBuffer_putShortArray 4329 =================

(All times in microseconds. The relatively large amount of noise visibile from
the code that didn't change is because I told caliper I wanted results quickly,
since it was order of magnitude I cared about, not tens of microseconds. That
is, the scales on the two graphs are completely different, and it's only the
shapes of the graphs that you can usefully compare: after is less spiky,
because I've filled in the performance potholes.)

Bug: 2935622
Change-Id: Ia5a36e641ef67648fcdbda092fab36111613b1c2
pache/harmony/luni/platform/OSMemory.java
e58d99453b152f80aa9c8c0951899553ea54483f 10-Sep-2010 Elliott Hughes <enh@google.com> Merge changes I1f5afb77,I4cfe206f into dalvik-dev

* changes:
Fast-path nio put for char[], double[], long[], nio get for int[].
Speed up MappedByteBuffer.
692222b08ff88eb92b523bf4780d7ea17a23aa80 10-Sep-2010 Elliott Hughes <enh@google.com> Fast-path nio put for char[], double[], long[], nio get for int[].

The other vector puts were already special-cased.

int[] is the first get to be accelerated; I'll come back and do the others.
I don't know how used vector gets are, but our nio unit tests go from ~4minutes
to ~15s after these changes, and all but the last five seconds of that is
from the get(int[]) part of this change.

Bug: 2935622
Change-Id: I1f5afb77e0fc7abcb661f861fa435cbec4b3f348
pache/harmony/luni/platform/OSMemory.java
d41c277b12ce7b63bf93cfad48d5280c8d036712 09-Sep-2010 Brad Fitzpatrick <bradfitz@android.com> am e00dd470: am f9efa849: am 5900e554: Use BlockGuard for OpenSSL sockets.

Merge commit 'e00dd4703c3b7e895059ba7cc7399dda0cba2580' into dalvik-dev

* commit 'e00dd4703c3b7e895059ba7cc7399dda0cba2580':
Use BlockGuard for OpenSSL sockets.
5900e5546059f05d5e58e5732e4d08d83b8b7574 09-Sep-2010 Brad Fitzpatrick <bradfitz@android.com> Use BlockGuard for OpenSSL sockets.

StrictMode wasn't catching network usage via SSL.

Bug: 2976407
Change-Id: I31fe09861e3aca7b26724b94af88687fb6b9442b
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
4b55e62ae85e33cbe25a657241ace191a9654cc1 08-Sep-2010 Jesse Wilson <jessewilson@google.com> am 81a8d57b: am ab7fd803: am 7e29fa5a: Merge "Cope with HTTP responses where the response code and headers disagree." into gingerbread

Merge commit '81a8d57b44d4e6f5e6d74af193ce23ec5366ca0c' into dalvik-dev

* commit '81a8d57b44d4e6f5e6d74af193ce23ec5366ca0c':
Cope with HTTP responses where the response code and headers disagree.
eb29579498a8860f81fd38275f8657c21bb67abb 08-Sep-2010 Elliott Hughes <enh@google.com> Rename PlatformAddress to MemoryBlock.

Bug: 2935622
Change-Id: I8a09cb9be0b0ea468278f7808f1a18c3ce820b49
pache/harmony/nio/internal/FileChannelImpl.java
65d890eb22aeba9b009ee642ffd4fff48a6f98ae 08-Sep-2010 Jesse Wilson <jessewilson@google.com> Cope with HTTP responses where the response code and headers disagree.

See http://b/issue?id=2981779

Change-Id: I0e4ed8f0cc606aa419704ba2eb5cd9938b5ff320
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
4ed432c88fb9729a424091a0d218facaa34bc378 04-Sep-2010 Jesse Wilson <jessewilson@google.com> Merge "Replace InputStream.availalble() with File.length() where that is intended." into dalvik-dev
c73a5be50cdd804ff3c12e7b43da08c33cdd6f21 04-Sep-2010 Elliott Hughes <enh@google.com> Move some of the nio implementation into java.nio.

Another stepping-stone to simplifying the PlatformAddress/OSMemory situation.

Bug: 2935622
Change-Id: Ic5b941ee7c17d6b5aeda53c3c2cdf2c43cebff55
pache/harmony/luni/platform/PlatformAddress.java
pache/harmony/nio/AddressUtil.java
pache/harmony/nio/internal/DatagramChannelImpl.java
pache/harmony/nio/internal/DirectBuffer.java
pache/harmony/nio/internal/FileChannelImpl.java
pache/harmony/nio/internal/SocketChannelImpl.java
767577433cca31ec4827be42bd013d538d508ebb 04-Sep-2010 Jesse Wilson <jessewilson@google.com> Replace InputStream.availalble() with File.length() where that is intended.

See http://b/issue?id=2768506

Change-Id: I5ba496f957ffd6307d17a2ce1b4cfe6e4eb9aada
pache/harmony/luni/internal/net/www/protocol/file/FileURLConnection.java
c3c38fbbccaf428200acdd819b1f7799edac54d2 04-Sep-2010 Elliott Hughes <enh@google.com> Remove nio cruft, move the implementation cost of 'free' where it belongs...

...and inline some getBaseAddress calls. The JIT doesn't manage to do that, it
seems, but being the JIT is not really my purpose: I'm trying to kill
getBaseAddress.

Bug: 2935622
Change-Id: I3cd99cd131a2c09796f5ff5bb31332287db2130f
pache/harmony/nio/internal/DirectBuffer.java
pache/harmony/nio/internal/FileChannelImpl.java
040bb9d72f4a406a40f40e198857a8a27e3de688 04-Sep-2010 Elliott Hughes <enh@google.com> Merge the various kinds of PlatformAddress.

This is just a stepping-stone, not particularly interesting by itself.

Bug: 2935622
Change-Id: I561337b9e7de8a6f058b7d52e5d756bb455075e9
pache/harmony/luni/platform/MallocedPlatformAddress.java
pache/harmony/luni/platform/MappedPlatformAddress.java
pache/harmony/luni/platform/PlatformAddress.java
pache/harmony/nio/internal/FileChannelImpl.java
29dbfe19b113a13b712be2bc762ef1c81cd06c47 03-Sep-2010 Elliott Hughes <enh@google.com> Use finalizers to free direct buffers.

Also switch to a cheaper scheme for avoiding double-frees (which could only
happen if library code is broken; at the moment the only caller is the
iovec-style stuff). This halves the cost of direct buffer access, at the
unimportant cost of not throwing an exception if we try to access a buffer
we freed while we still had a reference to it.

Also use named constants for the sizes of primitive types.

Also kill BufferFactory.

Bug: 2935622
Change-Id: I6021ce7531f49d8cff7635d6d2cc54851bacaf69
pache/harmony/luni/platform/MallocedPlatformAddress.java
pache/harmony/luni/platform/MappedPlatformAddress.java
pache/harmony/luni/platform/PlatformAddress.java
pache/harmony/luni/platform/RuntimeMemorySpy.java
pache/harmony/nio/internal/DirectBuffer.java
20a72661a2715fd4c62fe102ea8f7328ecea2fb0 03-Sep-2010 Elliott Hughes <enh@google.com> Merge "Kill PlatformAddressFactory, and remove/simplify some other code." into dalvik-dev
ff18eaedc0efa53953f8b5ee80c8172be428f5d3 03-Sep-2010 Jesse Wilson <jessewilson@google.com> am 5ebfecbf: am c7c6c034: am b7155fd5: Fixing a broken pipe with HttpsURLConnection connection reuse.

Merge commit '5ebfecbf35aa5bf08dc5e6fc031199f5bd814557' into dalvik-dev

* commit '5ebfecbf35aa5bf08dc5e6fc031199f5bd814557':
Fixing a broken pipe with HttpsURLConnection connection reuse.
b7155fd57239e986bbaba254a91aeb9600d60305 03-Sep-2010 Jesse Wilson <jessewilson@google.com> Fixing a broken pipe with HttpsURLConnection connection reuse.

We had a bug where we were peeking a byte from the raw socket
stream rather than the encrypted stream when we were attempting
to reuse an HTTPS connection. The raw stream field shouldn't
have been initialized, but setupTransportIO() did it while the
connection was being established.

This fixes setupTransportIO() to not initialize the fields
and isStale() to use the SSL fields if they exist.

See http://code.google.com/p/android/issues/detail?id=8625

Change-Id: Idd5b6f20e098adf436997829940707548896bedb
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
4d68282a79fb0417f43efdef41b9a920385bdded 03-Sep-2010 Elliott Hughes <enh@google.com> Kill PlatformAddressFactory, and remove/simplify some other code.

Now we create one PlatformAddress per direct byte buffer (or mapped byte
buffer), there's no need for object pooling.

Bug: 2935622
Change-Id: I84ef9d0b77774e1d2d80921b95b2f30383a0ab68
pache/harmony/luni/platform/MappedPlatformAddress.java
pache/harmony/luni/platform/OSMemory.java
pache/harmony/luni/platform/PlatformAddress.java
pache/harmony/luni/platform/PlatformAddressFactory.java
pache/harmony/luni/platform/RuntimeMemorySpy.java
pache/harmony/nio/internal/FileChannelImpl.java
ef122c9d4b1d3b4f15988682149e285098e8d4ab 02-Sep-2010 Elliott Hughes <enh@google.com> Merge "Make DirectBuffer.getEffectiveAddress cheaper." into dalvik-dev
f46d2ce4d4c92d16e2574f57f70fc5477dc12697 02-Sep-2010 Elliott Hughes <enh@google.com> Make DirectBuffer.getEffectiveAddress cheaper.

DirectBuffer.getEffectiveAddress is used to implement the JNI function
GetDirectBufferAddress. Currently it uses reference types unnecessarily,
and we have an object pool to reduce the cost of this. Switch to using
int instead.

I'll remove the pool in a later change.

Note that this change requires a corresponding change to the
GetDirectBufferAddress implementation in dalvik:
https://android-git.corp.google.com/g/64328

Bug: 2935622
Change-Id: Ia0c20bd58c5355550f6af840feb08acff14fd4e9
pache/harmony/luni/platform/OSMemory.java
pache/harmony/luni/platform/PlatformAddress.java
pache/harmony/nio/AddressUtil.java
pache/harmony/nio/internal/DirectBuffer.java
pache/harmony/nio/internal/FileChannelImpl.java
4d36cf73283e868b17aa12d2c5674eae29e2c626 02-Sep-2010 Jesse Wilson <jessewilson@google.com> Merge "Make fields final where possible." into dalvik-dev
56e742806ebb265e77de750cdb4575cff781fdf8 02-Sep-2010 Elliott Hughes <enh@google.com> Kill ThreadLocalCache.

This has been a long time coming. The two public fields were only used when
writing a jar file manifest, which isn't a performance case. The class was
used very strangely in ObjectStreamClass; it seems to make more sense to just
inline the relevant code there.

Change-Id: I5c6fe307558038394a598a846f59098c77143d3a
pache/harmony/luni/util/ThreadLocalCache.java
6670318007799f403594f0760382b8c23f7dda0f 02-Sep-2010 Jesse Wilson <jessewilson@google.com> Make fields final where possible.

See http://b/issue?id=2099637

Change-Id: I2a237d876c7acbe629e69d5c31d05737908f4606
pache/harmony/security/x501/AttributeTypeAndValue.java
pache/harmony/xnet/provider/jsse/ProtocolVersion.java
pache/harmony/xnet/provider/jsse/SSLRecordProtocol.java
9297c39c474c98b7aec19e22bf93416071080f3a 02-Sep-2010 Elliott Hughes <enh@google.com> am 1f6597dc: am ff59a5c5: am 171dc20a: Use idiomatic Java "type[] id" syntax instead of "type id[]".

Merge commit '1f6597dc2b3340c5eca6f16d8681058f913d8744' into dalvik-dev

* commit '1f6597dc2b3340c5eca6f16d8681058f913d8744':
Use idiomatic Java "type[] id" syntax instead of "type id[]".
171dc20afe5071d5cbfad7103903bfa2c1f8d00f 02-Sep-2010 Elliott Hughes <enh@google.com> Use idiomatic Java "type[] id" syntax instead of "type id[]".

I've left xalan and the other xml filth alone, as usual.

Change-Id: I6be274501fff73e67ca6b3c872704988e0e30486
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/util/InputStreamHelper.java
pache/harmony/security/provider/crypto/DSAPrivateKeyImpl.java
pache/harmony/security/provider/crypto/DSAPublicKeyImpl.java
pache/harmony/security/provider/crypto/SHA1Impl.java
pache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java
pache/harmony/security/provider/crypto/SHA1_MessageDigestImpl.java
pache/harmony/security/provider/crypto/SHA1withDSA_SignatureImpl.java
pache/harmony/xml/ExpatPullParser.java
c6e0981e5a2d23a0758ed71a8086c4278a7832ef 02-Sep-2010 Jesse Wilson <jessewilson@google.com> Fix racy socket.close() behaviour.

This is a follow up to enh's comments on https://android-git.corp.google.com/g/64034

Change-Id: I7ea3c15c164cf45380e1868dc4ef85b8a9417cbe
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/nio/internal/DatagramChannelImpl.java
pache/harmony/nio/internal/SocketChannelImpl.java
e6516fe33b524e6359c147b4aaa9a23716708ce2 02-Sep-2010 Jesse Wilson <jessewilson@google.com> Merge "Don't synchronize on non-final fields." into dalvik-dev
7f0c06f737b6f1f6b3a5bb30111f95dd0ca586a2 02-Sep-2010 Brian Carlstrom <bdc@google.com> Don't use StringBuffer where we don't need to.

I've left xalan alone, because that's just one big steaming heap.

Change-Id: Ibf7b2b5e347196d4de857217b022003ccc409ac5
pache/harmony/luni/lang/reflect/ImplForWildcard.java
706de1164836051ab31cc69eb77a6bba1a723896 27-Aug-2010 Elliott Hughes <enh@google.com> Minor tidy-up of Float.toString and Double.toString.

This patch looks larger than it is. I've moved duplicated constants out of
Math and StrictMath and into Float and Double where they belong. I've also
moved a table out of BigDecimal so I can reuse it in NumberConverter, which
I've renamed to RealToString.

The main active ingredient here is that there's no longer StringBuilder usage
to prepend '-'. This actually brings us down from 74ns to 62ns for an easy
case like 123.45f.

[cherry-pick of 910106e29fe98f14b2c36312a7498287273ba826 from dalvik-dev to gingerbread; plus build fix]

Bug: 2934304
Change-Id: Id79a6fb0d739e673b7428d240fc48bdae9b8bb43
pache/harmony/luni/util/NumberConverter.java
3e6f49bbb915b880afe104ec784c66bda55da450 25-Aug-2010 Elliott Hughes <enh@google.com> Double the speed of %.2f in Formatter.

Primarily this works by going straight to the NativeDecimalFormat. This
cuts down on a bunch of objects we don't actually need. Changing
NativeDecimalFormat to not have a finalizer means we can also relieve
the GC of all the finalization work.

This also fixes a few test failures I ran across. The , flag and digit
localization aren't mutually exclusive, and BigDecimal (a) can't represent
NaN or either infinity, but (b) returns infinities from doubleValue if the
BigDecimal is out of double's range; this made our check for special
numbers in transformFromFloat wrong.

[cherry-picked 5f509be2576f2817856413301ca8135f6ee20b30 from dalvik-dev to gingerbread]

Bug: 2934304
pache/harmony/luni/util/LocaleCache.java
ae43834bd7046b4758d086bd8264a556b99ac5ea 01-Sep-2010 Jesse Wilson <jessewilson@google.com> Merge "Fix classes that implement equals() but not hashCode()." into dalvik-dev
9fbb8a72583e1806c0d2793d8a459bc37072b674 01-Sep-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing a dead store in Finished." into dalvik-dev
01e1686574d5e2722a75175fbae696381bd150c0 01-Sep-2010 Jesse Wilson <jessewilson@google.com> Fixing a dead store in Finished.

See bug 2099918.

Change-Id: I12f0a53bc5aeacea3ba97820dcd6525e1bf23405
pache/harmony/xnet/provider/jsse/Finished.java
5d34c74a617a477b215d62646aae04fe321e9795 01-Sep-2010 Jesse Wilson <jessewilson@google.com> Fix classes that implement equals() but not hashCode().

See http://b/2099681

Change-Id: If358af98ccca44c544942b837c25e00e6553e916
pache/harmony/text/BidiRun.java
pache/harmony/xnet/provider/jsse/CipherSuite.java
pache/harmony/xnet/provider/jsse/ProtocolVersion.java
328f533a177f7579a9ea916f5569053ec9c149b8 01-Sep-2010 Elliott Hughes <enh@google.com> Don't use StringBuffer where we don't need to.

I've left xalan alone, because that's just one big steaming heap.

Change-Id: I47e80399ebced922656e46dacd8dcbfc698e94f8
pache/harmony/luni/lang/reflect/ImplForWildcard.java
58e5a8e6eeaf94d78522e0e9994c4565a3b33fdb 01-Sep-2010 Jesse Wilson <jessewilson@google.com> Don't synchronize on non-final fields.

This fixes some Findbugs and IntelliJ warnings. See http://b/2099930

Change-Id: Icb0a92890657e7a56f339bc9bdd2d1b5ddfc663c
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
6452ba4ad2120597724585be5d26de67d37b5af1 01-Sep-2010 Jesse Wilson <jessewilson@google.com> am 7308c233: am 1ab2d77f: am 50ae3221: Configure HttpURLConnection to prefer gzipped content by default.

Merge commit '7308c233d7755cf5b30f205981aa8588a6cbd245' into dalvik-dev

* commit '7308c233d7755cf5b30f205981aa8588a6cbd245':
Configure HttpURLConnection to prefer gzipped content by default.
50ae32218918eae80298bd1ab8e4f588bbbabdb2 01-Sep-2010 Jesse Wilson <jessewilson@google.com> Configure HttpURLConnection to prefer gzipped content by default.

This is not what the RI does. But the bandwidth savings is substantial,
and we can offer it almost for free.

See http://code.google.com/p/android/issues/detail?id=9390

Change-Id: I43c3fae8938f33809f2526d2d0e1cc5e08ae1202
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
4146964bb2432c9673e520b5e3349e92a550639e 30-Aug-2010 Jesse Wilson <jessewilson@google.com> am 35111115: am 7c3b0dca: am 44f93609: Merge "Support "Connection: close" from both request and response." into gingerbread

Merge commit '3511111541e0c0af6058cc8f6eec7a25df1ebec6' into dalvik-dev

* commit '3511111541e0c0af6058cc8f6eec7a25df1ebec6':
Support "Connection: close" from both request and response.
f418bf447fd007cd2ec2d45b4b0399a11904e9b4 30-Aug-2010 Jesse Wilson <jessewilson@google.com> Support "Connection: close" from both request and response.

This is a rewrite of fix for the same problem in AOSP master:
https://review.source.android.com/16757

This expands on that fix by supporting "Connection: close" on
redirects by adding test coverage.

Change-Id: Ia0daa9d83cf9f557b4e9a99b2c51345c98c6db14
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
3db0d1b07a79c3c871b0aa0929674adae3081b4f 28-Aug-2010 Elliott Hughes <enh@google.com> Remove the accessors hiding our IFileSystem and INetworkSystem.

These accessors aren't buying us anything, are costing us something, and have
encouraged caching of instances in fields all over the place. Lose all that
cruft.

I think we all agree that we want to merge IFileSystem and INetworkSystem at
some point, but I'll do that some other day.

Change-Id: I07696ec9650d0395ec31a71a74300e818a3fed91
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/Platform.java
pache/harmony/nio/internal/DatagramChannelImpl.java
pache/harmony/nio/internal/FileChannelImpl.java
pache/harmony/nio/internal/SelectorImpl.java
pache/harmony/nio/internal/ServerSocketChannelImpl.java
pache/harmony/nio/internal/SocketChannelImpl.java
910106e29fe98f14b2c36312a7498287273ba826 27-Aug-2010 Elliott Hughes <enh@google.com> Minor tidy-up of Float.toString and Double.toString.

This patch looks larger than it is. I've moved duplicated constants out of
Math and StrictMath and into Float and Double where they belong. I've also
moved a table out of BigDecimal so I can reuse it in NumberConverter, which
I've renamed to RealToString.

The main active ingredient here is that there's no longer StringBuilder usage
to prepend '-'. This actually brings us down from 74ns to 62ns for an easy
case like 123.45f.

Bug: 2934304
Change-Id: I65461753247eeb9ff890ffe66b0bc79d66d2ec9c
pache/harmony/luni/util/NumberConverter.java
6116e6265924a0983bb462e3441c8c4a0bb7e47e 26-Aug-2010 Elliott Hughes <enh@google.com> Specialize on size rather than type in OSMemory.

I'm working towards intrinsics for this stuff, so I want to minimize the number
I have to support. There are 7 types (byte, char, double, float, int, long,
and short) but only 4 sizes (1, 2, 4, and 8 bytes).

I've also finally benchmarked whether the "inlined memcpy"s really gain us
anything, and they do, so I've rewritten the sole remaining caller of the
templates (long) to have its own inlined memcpy too.

Plus a final tranche of naming consistency.

Bug: 2935622
Change-Id: Ieffd9723d0479aec6179b888d1c3b3496032e57a
pache/harmony/luni/platform/OSMemory.java
pache/harmony/luni/platform/PlatformAddress.java
71961a4957d24f62f7adc5f0549e236018589631 26-Aug-2010 Elliott Hughes <enh@google.com> More consistent naming of the nio vector primitives.

Just name changes here.

Change-Id: I050b33ce836270435310041dd179ceaa98d789fa
pache/harmony/luni/platform/OSMemory.java
pache/harmony/luni/platform/PlatformAddress.java
3f548bf49c2ee52ad0b18dbd88b03a8c76654cf4 25-Aug-2010 Elliott Hughes <enh@google.com> Remove some dead cruft.

Change-Id: I968fe2dda543430fb0c38f6c5bde7c55b9f4c314
pache/harmony/luni/util/ThreadLocalCache.java
5f509be2576f2817856413301ca8135f6ee20b30 25-Aug-2010 Elliott Hughes <enh@google.com> Double the speed of %.2f in Formatter.

Primarily this works by going straight to the NativeDecimalFormat. This
cuts down on a bunch of objects we don't actually need. Changing
NativeDecimalFormat to not have a finalizer means we can also relieve
the GC of all the finalization work.

This also fixes a few test failures I ran across. The , flag and digit
localization aren't mutually exclusive, and BigDecimal (a) can't represent
NaN or either infinity, but (b) returns infinities from doubleValue if the
BigDecimal is out of double's range; this made our check for special
numbers in transformFromFloat wrong.

Bug: 2934304
Change-Id: I5aa38fbb2f775c0ac6728f8a70c8874c134155c0
pache/harmony/luni/util/LocaleCache.java
43bd29190e063e3c80f3718b2f1c7bb00dc46a60 24-Aug-2010 Brian Carlstrom <bdc@google.com> am d9a1ad19: am 97e681c3: am 5f2e6872: SSLSocket.read should throw SocketException not NullPointerException

Merge commit 'd9a1ad19cc67f76ec1dadd1c740b76a0083d853f' into dalvik-dev

* commit 'd9a1ad19cc67f76ec1dadd1c740b76a0083d853f':
SSLSocket.read should throw SocketException not NullPointerException
157335d338a75cfd594be25f0d3d47a8191553c8 24-Aug-2010 Jesse Wilson <jessewilson@google.com> am 833ad294: am 5c33fc0d: am 125f068f: Fix a bug when user sets "Content-Encoding: chunked" manually.

Merge commit '833ad294e6138102f055856dbd09663c1f118cbf' into dalvik-dev

* commit '833ad294e6138102f055856dbd09663c1f118cbf':
Fix a bug when user sets "Content-Encoding: chunked" manually.
5f2e6872311240319509aed64d9f58cd5b64719b 23-Aug-2010 Brian Carlstrom <bdc@google.com> SSLSocket.read should throw SocketException not NullPointerException

OpenSSLSocketImpl now uses checkOpen similar to Socket's
checkOpenAndCreate to ensure that SocketExceptions are thrown if
certain operations are tried after the socket is closed.

Also added *_setUseClientMode_afterHandshake tests for SSLSocket and
SSLEngine. We properly through IllegalArgument exception in this case,
but it wasn't covered by the tests previously.

Bug: 2918499
Change-Id: I393ad39bed40a33725d2c0f3f08b9d0b0d3ff85f
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
125f068f0a6cd739beac97821c9421cf8317cc87 20-Aug-2010 Jesse Wilson <jessewilson@google.com> Fix a bug when user sets "Content-Encoding: chunked" manually.

We used to try to build a -1-sized ByteArrayOutputStream, which
failed miserably with an exception.

Change-Id: Ia6fa72c639a14c03f03b6f73083ce37ffab8b4e5
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
1b9018762e87e3dda69020248817011efd5a40dc 20-Aug-2010 Elliott Hughes <enh@google.com> Minor nio speedups (scalar operations only).

This patch speeds up nio scalar operations for all types larger than byte.
Basically just by trimming fat, pushing any byte-swapping down into Java,
and adding a boolean field to ByteOrder that basically caches the "do we
need byte swapping?" comparison.

For the worst case, byte-swapped doubles, this patch gives a 2x speedup.
At the other end of the spectrum, for native-order chars and shorts, this
patch gives a 20% speedup. Still, that's not bad for quite a reduction in
code.

Now I've tidied this up a bit, I have more of a plan. This is just the warmup.

Bug: 2935622

Change-Id: I3cfc4e61b12ea7a8f32fc497106ddc66474efe01
pache/harmony/luni/platform/MappedPlatformAddress.java
pache/harmony/luni/platform/OSMemory.java
pache/harmony/luni/platform/PlatformAddress.java
pache/harmony/luni/platform/RuntimeMemorySpy.java
0b29a1fecc601de2f642ded891726ac3e460d74b 18-Aug-2010 Elliott Hughes <enh@google.com> Multicast cleanup.

This doesn't fix any bugs, but it does get rid of a lot of code. This is how
Stevens' book tells us we should be doing things.

Bug: 1610553
Change-Id: I00a79a6c34084ba018fb69c7f1123300a2698ce9
pache/harmony/luni/net/GenericIPMreq.java
pache/harmony/luni/net/PlainDatagramSocketImpl.java
4940ff34c242c7907f548e6eb7b1680d7d53fbc7 17-Aug-2010 Elliott Hughes <enh@google.com> Remove a bit more nio cruft.

Collapse the unused MemorySpy hierarchy, and remove some dead code.
I've left all the dead rangeCheck stuff in in case we ever need it, but
maybe that should go too.

Change-Id: Ibff4e99f27e235453ae2983483e54878a679db34
pache/harmony/luni/platform/AbstractMemorySpy.java
pache/harmony/luni/platform/IMemorySpy.java
pache/harmony/luni/platform/MappedPlatformAddress.java
pache/harmony/luni/platform/OSMemory.java
pache/harmony/luni/platform/PlatformAddress.java
pache/harmony/luni/platform/PlatformAddressFactory.java
pache/harmony/luni/platform/RuntimeMemorySpy.java
d21ee434b8bfdd989d8837bba361ba8c8010f609 17-Aug-2010 Elliott Hughes <enh@google.com> Merge "Some nio tidying." into dalvik-dev
8510524dab13e0acc1babf22cbc55002fb122777 17-Aug-2010 Elliott Hughes <enh@google.com> Some nio tidying.

Remove indirection on OSMemory, and use public ByteOrder and MapMode types
throughout the implementation, rather than adding our own duplication. Also
remove some unnecessary Java methods that just forwarded to identical native
methods, and an unnecessary factory class for MappedByteBuffer instances.
Also get rid of ICommonDataTypes, most of which was unused cruft.

Change-Id: I3240b02bcc19941b1b1cbba351ae7f7c1cdfc5b4
pache/harmony/luni/platform/Endianness.java
pache/harmony/luni/platform/ICommonDataTypes.java
pache/harmony/luni/platform/IMemorySystem.java
pache/harmony/luni/platform/MappedPlatformAddress.java
pache/harmony/luni/platform/OSMemory.java
pache/harmony/luni/platform/Platform.java
pache/harmony/luni/platform/PlatformAddress.java
pache/harmony/luni/platform/PlatformAddressFactory.java
pache/harmony/nio/internal/FileChannelImpl.java
pache/harmony/nio/internal/MappedByteBufferFactory.java
pache/harmony/nio/internal/ReadOnlyFileChannel.java
pache/harmony/nio/internal/ReadWriteFileChannel.java
bc9563c38b92da7fc2a02fd02fafcc7f43a725ae 17-Aug-2010 Brian Carlstrom <bdc@google.com> am bfc0713b: am 12e10c1c: b/2914872: fix concurrent initialization problem with peer certificate chain fields

Merge commit 'bfc0713bb26ec11c2000ba64439b3abdcb72a0bf' into dalvik-dev

* commit 'bfc0713bb26ec11c2000ba64439b3abdcb72a0bf':
b/2914872: fix concurrent initialization problem with peer certificate chain fields
12e10c1c6f9324693b1dad96ab57fada2b771f11 17-Aug-2010 Brian Carlstrom <bdc@google.com> b/2914872: fix concurrent initialization problem with peer certificate chain fields

Change-Id: Ib76dd826c8f3616d4a3aed608aef432a1b99f3d6
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
60a0a96f334f159418763cab17c48a09c97cbd2f 13-Aug-2010 Elliott Hughes <enh@google.com> Fix reading from an empty non-blocking pipe.

The active ingredient here is getting rid of the lines that threw
InterruptedIOException in "OSFileSystem.cpp". I don't think that code was ever
right, but until I rewrote Pipe it wasn't possible to exercise that code.

The other changes are cosmetic, made while understanding this code well enough
to find the bug, plus a new test for this behavior.

Bug: 2901552
Change-Id: Id9cd3cdd6a97b225bbf7c352a6e0c535e9f9da1d
pache/harmony/nio/internal/SelectorImpl.java
e22935d3c7040c22b48d53bd18878844f381287c 13-Aug-2010 Elliott Hughes <enh@google.com> Remove most of our C-style casts.

After being burned by an incorrect C-style cast that cast away const, I've been
keen to remove them all and turn on -Wold-style-cast. This patch doesn't get us
that far, but it does kill the majority of our C-style casts. In turn, the
majority of the casts that it removes are the ones from our tables of native
methods to be registered.

The new NATIVE_METHOD macro also _enforces_ our convention of using the
"Class_nativeMethod" style of naming. Mostly this works out fine. In some
cases (most notably ExpatParser and ExpatAttributes) I've had to un-overload
a few functions, but I don't like overloading anyway, and in the particular
case of a native method, where the stack trace doesn't show a line number,
overloading makes it one step harder to work out which native method you're
actually in. So good riddance to that. The only unfortunate case is
Math.copySign, where there are two overloads corresponding to copysign(3)
and copysignf(3). I had to add an extra layer of indirection there. In my
defense, we've never shipped these functions before, they're unlikely to
become anyone's hotspot, and the right fix is to be doing such trivial work
on the Java side anyway, with intrinsics making the conversion between
float/double and int/long cheap.

This patch also replaces other C-style casts, primarily in
"OSNetworkSystem.cpp".

This patch also removes unnecessary uses of the "struct" keyword.

This patch also fixes a "may be used uninitialized" warning (now error) in
the sim build for "ICU.cpp".

The remaining C-style casts are in the hairy float-parsing code. That stuff --
and turning on -Wold-style-cast -- will have to wait for another day.

Change-Id: I9b3ee14aefd4676f980f6a7ca757595d78d80e6a
pache/harmony/xml/ExpatAttributes.java
pache/harmony/xml/ExpatParser.java
24144d482dcd5deac58a5dca7042379c05b56b5e 13-Aug-2010 Elliott Hughes <enh@google.com> Clean up our final native code warnings, and turn on -Werror.

Change-Id: I54bb29e357812b089e83f3a2a831c80f5114a27a
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/OSFileSystem.java
pache/harmony/luni/util/NumberConverter.java
pache/harmony/nio/internal/FileChannelImpl.java
a92f883cda9e483c64f78dbba0031e6e43cd00ab 12-Aug-2010 Elliott Hughes <enh@google.com> Replace createDatagramSocket and createStreamSocket with one call.

(Continuing our policy of having native methods' names correspond to the
underlying syscall, this one sadly gets the ugly name of "socket".)

Change-Id: Icf08e4e0637ee3ae9eab673d350860181f547250
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/nio/internal/DatagramChannelImpl.java
pache/harmony/nio/internal/SocketChannelImpl.java
7738141c52b931e103efe7ad62d32a12785bf6b1 12-Aug-2010 Elliott Hughes <enh@google.com> Remove createServerStreamSocket as a native special case.

We can do everything in Java.

Change-Id: I7451319335a647fc25bd2d2403fa98bfc6b5c038
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainServerSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
0917c4a9d5d0115950450cdd0bb46e43a48da5db 12-Aug-2010 Elliott Hughes <enh@google.com> Clean up some dead/useless code.

(The DatagramPacketTest.java change is unrelated, but it's been lurking in my
repository for weeks now.)

Change-Id: I65d3ad53dd30709b2daed3c5787cc38c6081ffea
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
pache/harmony/luni/internal/net/www/types.properties
pache/harmony/luni/net/GenericIPMreq.java
pache/harmony/luni/net/NetUtil.java
pache/harmony/luni/net/PlainServerSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/util/BinarySearch.java
pache/harmony/luni/util/Inet6Util.java
pache/harmony/luni/util/InvalidJarIndexException.java
pache/harmony/luni/util/OIDDatabase.java
pache/harmony/luni/util/PasswordProtectedInputStream.java
pache/harmony/luni/util/PositionedInputStream.java
pache/harmony/luni/util/SHAOutputStream.java
pache/harmony/misc/HashCode.java
pache/harmony/misc/SystemUtils.java
7365de1056414750d0a7d1fdd26025fd247f0d04 12-Aug-2010 Jesse Wilson <jessewilson@google.com> Sorting imports.

Change-Id: I8347bc625480a1c37a1ed9976193ddfedeb00bbc
pache/harmony/crypto/internal/NullCipherSpi.java
pache/harmony/lang/annotation/AnnotationFactory.java
pache/harmony/luni/internal/net/www/protocol/file/FileURLConnection.java
pache/harmony/luni/internal/net/www/protocol/http/Header.java
pache/harmony/luni/internal/util/ZoneInfo.java
pache/harmony/luni/internal/util/ZoneInfoDB.java
pache/harmony/luni/lang/reflect/ImplForWildcard.java
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainServerSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/platform/AbstractMemorySpy.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/luni/platform/Platform.java
pache/harmony/luni/util/Base64.java
pache/harmony/luni/util/Inet6Util.java
pache/harmony/luni/util/ThreadLocalCache.java
pache/harmony/nio/FileChannelFactory.java
pache/harmony/nio/internal/DatagramChannelImpl.java
pache/harmony/nio/internal/FileChannelImpl.java
pache/harmony/nio/internal/MappedByteBufferFactory.java
pache/harmony/nio/internal/PipeImpl.java
pache/harmony/nio/internal/ReadOnlyFileChannel.java
pache/harmony/nio/internal/ReadWriteFileChannel.java
pache/harmony/nio/internal/SelectorImpl.java
pache/harmony/nio/internal/SocketChannelImpl.java
pache/harmony/security/PolicyEntry.java
pache/harmony/security/asn1/ASN1OpenType.java
pache/harmony/security/asn1/InformationObjectSet.java
pache/harmony/security/fortress/DefaultPolicy.java
pache/harmony/security/fortress/DefaultPolicyParser.java
pache/harmony/security/fortress/Engine.java
pache/harmony/security/fortress/PolicyUtils.java
pache/harmony/security/fortress/Services.java
pache/harmony/security/pkcs10/CertificationRequestInfo.java
pache/harmony/security/pkcs7/AuthenticatedAttributes.java
pache/harmony/security/pkcs7/ContentInfo.java
pache/harmony/security/pkcs7/SignedData.java
pache/harmony/security/pkcs7/SignerInfo.java
pache/harmony/security/pkcs8/PrivateKeyInfo.java
pache/harmony/security/provider/cert/X509CRLEntryImpl.java
pache/harmony/security/provider/cert/X509CRLImpl.java
pache/harmony/security/provider/cert/X509CertFactoryImpl.java
pache/harmony/security/provider/cert/X509CertPathImpl.java
pache/harmony/security/provider/crypto/CryptoProvider.java
pache/harmony/security/provider/crypto/DSAPrivateKeyImpl.java
pache/harmony/security/provider/crypto/DSAPublicKeyImpl.java
pache/harmony/security/provider/crypto/RandomBitsSupplier.java
pache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java
pache/harmony/security/provider/crypto/SHA1_MessageDigestImpl.java
pache/harmony/security/provider/crypto/SHA1withDSA_SignatureImpl.java
pache/harmony/security/utils/AlgNameMapper.java
pache/harmony/security/x501/AttributeTypeAndValue.java
pache/harmony/security/x501/AttributeTypeAndValueComparator.java
pache/harmony/security/x501/AttributeValue.java
pache/harmony/security/x501/DirectoryString.java
pache/harmony/security/x501/Name.java
pache/harmony/security/x509/AlgorithmIdentifier.java
pache/harmony/security/x509/AuthorityKeyIdentifier.java
pache/harmony/security/x509/BasicConstraints.java
pache/harmony/security/x509/CRLDistributionPoints.java
pache/harmony/security/x509/CRLNumber.java
pache/harmony/security/x509/CertificateIssuer.java
pache/harmony/security/x509/CertificatePolicies.java
pache/harmony/security/x509/DNParser.java
pache/harmony/security/x509/DistributionPoint.java
pache/harmony/security/x509/DistributionPointName.java
pache/harmony/security/x509/ExtendedKeyUsage.java
pache/harmony/security/x509/Extension.java
pache/harmony/security/x509/Extensions.java
pache/harmony/security/x509/GeneralName.java
pache/harmony/security/x509/GeneralNames.java
pache/harmony/security/x509/GeneralSubtrees.java
pache/harmony/security/x509/InfoAccessSyntax.java
pache/harmony/security/x509/InvalidityDate.java
pache/harmony/security/x509/IssuingDistributionPoint.java
pache/harmony/security/x509/KeyUsage.java
pache/harmony/security/x509/NameConstraints.java
pache/harmony/security/x509/PolicyConstraints.java
pache/harmony/security/x509/PrivateKeyUsagePeriod.java
pache/harmony/security/x509/ReasonCode.java
pache/harmony/security/x509/ReasonFlags.java
pache/harmony/security/x509/SubjectKeyIdentifier.java
pache/harmony/security/x509/SubjectPublicKeyInfo.java
pache/harmony/security/x509/TBSCertList.java
pache/harmony/security/x509/TBSCertificate.java
pache/harmony/security/x509/Validity.java
pache/harmony/security/x509/tsp/PKIStatusInfo.java
pache/harmony/security/x509/tsp/TSTInfo.java
pache/harmony/security/x509/tsp/TimeStampReq.java
pache/harmony/xml/ExpatParser.java
pache/harmony/xml/ExpatPullParser.java
pache/harmony/xml/ExpatReader.java
pache/harmony/xml/dom/DOMConfigurationImpl.java
pache/harmony/xml/dom/DocumentImpl.java
pache/harmony/xml/dom/ElementImpl.java
pache/harmony/xml/dom/InnerNodeImpl.java
pache/harmony/xml/dom/NamedNodeMapImpl.java
pache/harmony/xml/dom/NodeImpl.java
pache/harmony/xml/dom/NodeListImpl.java
pache/harmony/xml/parsers/DocumentBuilderImpl.java
pache/harmony/xml/parsers/SAXParserFactoryImpl.java
pache/harmony/xml/parsers/SAXParserImpl.java
pache/harmony/xnet/provider/jsse/AlertProtocol.java
pache/harmony/xnet/provider/jsse/CertificateMessage.java
pache/harmony/xnet/provider/jsse/CertificateRequest.java
pache/harmony/xnet/provider/jsse/CertificateVerify.java
pache/harmony/xnet/provider/jsse/CipherSuite.java
pache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
pache/harmony/xnet/provider/jsse/ClientKeyExchange.java
pache/harmony/xnet/provider/jsse/ConnectionState.java
pache/harmony/xnet/provider/jsse/ConnectionStateTLS.java
pache/harmony/xnet/provider/jsse/DelegatedTask.java
pache/harmony/xnet/provider/jsse/DigitalSignature.java
pache/harmony/xnet/provider/jsse/FileClientSessionCache.java
pache/harmony/xnet/provider/jsse/Finished.java
pache/harmony/xnet/provider/jsse/HandshakeIODataStream.java
pache/harmony/xnet/provider/jsse/HelloRequest.java
pache/harmony/xnet/provider/jsse/IndexedPKIXParameters.java
pache/harmony/xnet/provider/jsse/KeyManagerFactoryImpl.java
pache/harmony/xnet/provider/jsse/KeyManagerImpl.java
pache/harmony/xnet/provider/jsse/Message.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/PRF.java
pache/harmony/xnet/provider/jsse/SSLBufferedInput.java
pache/harmony/xnet/provider/jsse/SSLEngineAppData.java
pache/harmony/xnet/provider/jsse/SSLEngineImpl.java
pache/harmony/xnet/provider/jsse/SSLRecordProtocol.java
pache/harmony/xnet/provider/jsse/SSLServerSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/SSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLSessionImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketInputStream.java
pache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
pache/harmony/xnet/provider/jsse/ServerHello.java
pache/harmony/xnet/provider/jsse/ServerHelloDone.java
pache/harmony/xnet/provider/jsse/ServerKeyExchange.java
pache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java
3c/dom/ls/LSParser.java
3c/dom/ls/LSParserFilter.java
3c/dom/ls/LSSerializer.java
3c/dom/traversal/NodeIterator.java
ml/sax/InputSource.java
ml/sax/ext/EntityResolver2.java
ml/sax/helpers/AttributeListImpl.java
ml/sax/helpers/DefaultHandler.java
ml/sax/helpers/NewInstance.java
ml/sax/helpers/ParserAdapter.java
ml/sax/helpers/ParserFactory.java
ml/sax/helpers/XMLFilterImpl.java
ml/sax/helpers/XMLReaderAdapter.java
ml/sax/helpers/XMLReaderFactory.java
dc3c71629a42d9c1b3d66da54c7d090d4fff2c65 11-Aug-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing ListOfTypes to not null-out its types." into dalvik-dev
297f4f85f303725a64c2038ff81c0d1be1f10560 11-Aug-2010 Jesse Wilson <jessewilson@google.com> Fixing ListOfTypes to not null-out its types.

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

Change-Id: I164046e868fb72a76b8b2ad2729e97229129ea39
pache/harmony/luni/lang/reflect/GenericSignatureParser.java
pache/harmony/luni/lang/reflect/ListOfTypes.java
3ab13ebe9d67b0b210865853902b854711ef45b0 11-Aug-2010 Elliott Hughes <enh@google.com> Improve the performance of TimeZone.getTimeZone.

Rewrite the code that reads time zone data so that rather than opening,
reading, and closing the file each time, we just keep the file mapped.

This patch actually removes functionality: we no longer support reading
individual Unix time zone data files.

Also stop cloning guaranteed-new instances returned by ZoneInfoDB.

Before:

benchmark us logarithmic runtime
TimeZone_getDefault 9.85 =
TimeZone_getTimeZoneUTC 211.40 =====================
TimeZone_getTimeZone_America_Caracas 437.87 ==========================
TimeZone_getTimeZone_America_Santiago 783.29 ==============================
TimeZone_getTimeZone_GMT_plus_10 181.80 ====================
TimeZone_getTimeZone_default 194.78 ====================

After:

benchmark us logarithmic runtime
TimeZone_getDefault 10.8 =
TimeZone_getTimeZoneUTC 70.9 =============
TimeZone_getTimeZone_America_Caracas 118.9 =================
TimeZone_getTimeZone_America_Santiago 797.5 ==============================
TimeZone_getTimeZone_GMT_plus_10 57.8 ============
TimeZone_getTimeZone_default 72.2 =============

(Note that these have very different scales.)

Bug: 2870945
Change-Id: Iae5aa86153006d4de8e7278d30bcaeef6a9ccab7
pache/harmony/luni/internal/util/ZoneInfo.java
pache/harmony/luni/internal/util/ZoneInfoDB.java
f14cadb15b06371fb9a6daf885dc1c4bccf975b9 10-Aug-2010 Elliott Hughes <enh@google.com> Minor TimeZone cleanup.

Getting ready to do some real work here, I thought I'd improve the
documentation and remove some cruft.

Bug: 2870945
Change-Id: I771badc8afa5c0a5f77880f64e1542d77672d984
pache/harmony/luni/internal/util/ZoneInfo.java
pache/harmony/luni/internal/util/ZoneInfoDB.java
29f8e5ccde645e05d244c6dd94eaa377251dab2c 10-Aug-2010 Elliott Hughes <enh@google.com> Merge "Make network I/O interruptible." into dalvik-dev
9f2b1b1c3bf9de560f29f257c855c7c85b405c0f 07-Aug-2010 Elliott Hughes <enh@google.com> Make network I/O interruptible.

Every thread about to block on network I/O registers its thread id and
the fd it's going to block on. In close, we scan the list and signal
every thread that's blocked on the fd we're closing. They wake up with
EINTR, see that their java.io.FileDescriptor has been invalidated (by
the close code), and infer that this EINTR is not to be retried: this
EINTR implies that they should throw.

This patch also fixes a couple of bugs in accept. We were trying (and,
obviously, failing) to reset SO_RCVTIMEO on fd -1 if the accept failed,
and then throwing an exception relating to that rather than the failed
accept(2). We were also not treating timeouts as a special case of
failure and throwing the appropriate SocketTimeoutException. (One has
to suspect that there's an errno-to-Exception function that we could
write that would work for all this native code.)

This patch also cleans up connect a little more. I've inlined doConnect
into its single caller, I've removed the bogus use of 100ms polling,
and I've rewritten the checking for success/failure to be based on the
advice in Stevens' "Unix Network Programming".

Bug: 2823977
Change-Id: I4f0cbd95be9ba25368be166008855a80c5d30845
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
a30197c7a5647be80512af11b5e994f5af2e177b 06-Aug-2010 Jesse Wilson <jessewilson@google.com> Support multihomed addresses in HttpURLConnection.

See http://b/2876927

Change-Id: I13138109d3648cf8a86d07136337b820c94b500a
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
036ffc75d2b7ece42bcd97f290c026e215868ba9 05-Aug-2010 Elliott Hughes <enh@google.com> Rationalize and simplify our "connect" implementations.

We don't need to copy a context structure back and forth between native code
and Java: it didn't contain anything but temporaries anyway. We don't need a
convenience method for a blocking connect with no timeout. We don't need a
separate codepath for datagram and stream sockets' connect calls.

There are further simplifications that could be made, I think. I think we
could implement "connect" in Java in terms of "connectNonBlocking" and
"isConnected" (since that's how our native implementation works anyway).
I also think we can fix the 100ms polling too, though I haven't investigated
and that may require that we fix the general "interrupt on close" problem.

Change-Id: Ib5989fa05f5dd7dd24b681fab70f856cd0bc5c56
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/nio/internal/DatagramChannelImpl.java
pache/harmony/nio/internal/SocketChannelImpl.java
f870c16ce9cb96e2c009f62bd9a7f1f157321148 04-Aug-2010 Elliott Hughes <enh@google.com> Add a comment I meant to include in PipeImpl.

Change-Id: I1e54c5b73fbc73fbc20f3782c207c04343849455
pache/harmony/nio/internal/PipeImpl.java
440ba565fa5384bc23255fbc412f7b97fcbdccd9 04-Aug-2010 Elliott Hughes <enh@google.com> Rename setNonBlocking to setBlocking.

This makes the boolean argument less confusing.

Change-Id: Ic226f6d3c5afe8e15a95e74917656424f8a448fe
pache/harmony/nio/internal/PipeImpl.java
pache/harmony/nio/internal/SocketChannelImpl.java
31496e770af085ce6ee439a1a58db39a1ade7e8e 04-Aug-2010 Elliott Hughes <enh@google.com> Merge "Rewrite the nio Pipe to use a Unix pipe behind the scenes." into dalvik-dev
99a89dd6f0a0e1396aa9b3feebf15ea31f703d3a 04-Aug-2010 Elliott Hughes <enh@google.com> Rewrite the nio Pipe to use a Unix pipe behind the scenes.

We were using an AF_INET or AF_INET6 socket to implement the nio Pipe, which
was causing trouble for people on systems where IPv6 wasn't working yet.

This patch switches over to pipe(2). My first implementation used socketpair(2)
and retained the SocketChannelImpls, but it still seemed a bit off to be asking
for a full-duplex pipe to implement a unidirectional channel, and it required
hacks in the networking code to cope with the AF_LOCAL family, and in the
BlockGuard for the isLingeringSocket test.

This implementation uses pipe(2) and FileChannelImpl. It breaks a few tests, but
the tests are wrong, and it actually brings us closer to the RI's behavior of
throwing IOException "broken pipe" when writing to a broken pipe.

Rather than keep throwing junk into the FileSystem/NetworkSystem classes, and
resolving the question of which of those setNonBlocking belonged in (answer:
neither; this is a false Windows-style dichotomy that isn't helpful here), I've
added a new IoUtils with a few generally useful methods. The remainder of this
patch switches over existing code. We could probably make
FileDescriptor.descriptor private now I've exposed accessors, but this change
is large enough already...

Bug: 2735373
Bug: http://code.google.com/p/android/issues/detail?id=9431
Change-Id: I6b6d1e50bdddd435e71c31105a73c9d4fd135d7e
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSFileSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/nio/AddressUtil.java
pache/harmony/nio/internal/PipeImpl.java
pache/harmony/nio/internal/SocketChannelImpl.java
2c040b9b2fae389983339ed2bcba4c7568825575 03-Aug-2010 Brian Carlstrom <bdc@google.com> Merge "Support for TLS Extensions enabled SSLSockets with fallback to vanila SSL" into dalvik-dev
f4f96a70ae784447d1657a7d56fa73eee1ccb3f2 03-Aug-2010 Elliott Hughes <enh@google.com> resolved conflicts for merge of 7b3ebefc to dalvik-dev

Change-Id: I7bb0341107f0b3f5b568d151f062e30f61e5ee14
4559b1d37edcb5d7f1da086cf2e3290388d74f46 23-Jul-2010 Brian Carlstrom <bdc@google.com> Support for TLS Extensions enabled SSLSockets with fallback to vanila SSL

See also b/1569612

Summary:
- OpenSSlSocket support for SNI, session tickets, compression
- URLConnection mimics Chrome behavior of trying connection with these enabled,
falling back to SSL w/o encryption on failure

Details:

libcore

URLConnection https retry

Change HttpConnection.getSecureSocket to enable non-standard features on first
connection attempt. On second attempt, we back off to SSLv3 from
TLSv1, mimicking Chrome's behavior.

luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java

Change HttpsEngine.connect to implement SSL reconnect

luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java

OpenSSL SSLSocket implementation

OpenSSLSocketImpl and OpenSSLServerSocketImpl now have an array of
enabled compression methods interface and implementation to
parallel that of procotols and ciphersuites.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java

OpenSSLSessionImpl now has a cache of the native
compressionMethod. Also replaced "gives" javadoc working with
"returns".

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java

OpenSSLSocketImpl session caching now needs to skip cached
sessions with mismatched compression requirements.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

OpenSSLSocketImpl.startHandshake now uses NativeCrypto to support
our non-standard extensions.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

NativeCrypto changes
- Added declaration of SSL options for tickets and compression.
- Added general "compression methods" interface
paralleling "cipher suites" and "protocols" interfaces.
- Added SSL_set_tlsext_host_name to set SNI (Server Name Indication) value
- Added SSL_get_servername to read SNI (Server Name Indication) value
- Added SSL_SESSION_compress_meth read negotiated compression method
- SSL_new makes sure to default compression to off for compatibility
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java
luni/src/main/native/NativeCrypto.cpp

Testing

Added URLConnectionTest.testConnectViaHttpsWithSSLFallback to make
sure we properly retry an https connection if the server
terminates unexpectedly. Fixed up
URLConnectionTest.testHttpsWithCustomTrustManager with new
expected certificate chain. Fixed a few mistaken
TestSSLContext.serverContext uses to clientContext

luni/src/test/java/java/net/URLConnectionTest.java

Added test_SSL_set_tlsext_host_name, test_SSL_get_servername,
test_SSL_SESSION_compress_meth. Added a number of missing fail()
calls in expected exception cases which caught one test with
mistaken expectations. Removed some unnecessary scopes. Fixed some
badly scoped catch blocks.

luni/src/test/java/org/apache/harmony/xnet/provider/jsse/NativeCryptoTest.java

Changed MockWebServer to support a new MockResponse propery of
disconnectAtStart, which immediately terminates the connection

support/src/test/java/tests/http/MockResponse.java
support/src/test/java/tests/http/MockWebServer.java

external/openssl

Restore -ZLIB to OpenSSL build. Note that NativeCrypto.SSL_new
disables compression by for default SSLSocket for compatibility.
android-config.mk
Force clean build with new CFLAGS
CleanSpec.mk

Change-Id: Iba6268f9096f2be43f0d30de151dd3fd0aea4a81
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
7b3ebefcdf79a251cf2a5619dd2354952fc67665 02-Aug-2010 Elliott Hughes <enh@google.com> Use the existing mime-type/extension mapping from frameworks/base.

(An accompanying change to frameworks/base switches that over so that both
android.webkit.MimeTypeMap and java.net.URLConnection use the same data.)

Bug: 2422917
Bug: http://code.google.com/p/android/issues/detail?id=10100
Change-Id: I37f008a00093efcf7b336ea0c206e8977544b0bf
pache/harmony/luni/internal/net/www/MimeTable.java
pache/harmony/luni/internal/net/www/protocol/file/FileURLConnection.java
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
4fe378672d700aaae3a50db956b693b3ed599c7d 31-Jul-2010 Elliott Hughes <enh@google.com> Remove "java.net.preferIPv4Stack" (which has been broken >= eclair).

Change-Id: I4733a0e266ff7c02c25033e79bcceff4d7357868
pache/harmony/luni/net/NetUtil.java
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainServerSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/nio/internal/DatagramChannelImpl.java
pache/harmony/nio/internal/SocketChannelImpl.java
977a9954414ec41256b218e6278a8544ea135d45 31-Jul-2010 Elliott Hughes <enh@google.com> Bring URLConnection.guessContentTypeFromName in line with Chrome.

Bug: http://code.google.com/p/android/issues/detail?id=10100
Change-Id: Ibd53f3450eda9c5dbad9e4b0b661cc98e8f578e4
pache/harmony/luni/internal/net/www/MimeTable.java
2cd82d7111f68ff63145ef7c393bf1479ff06223 29-Jul-2010 Elliott Hughes <enh@google.com> Fix setTrafficClass.

Pass the traffic class setting down to the kernel, rather than trying to
fake it in Java and then not actually using it at all in the native code.

There are two ways to set traffic class (aka type of service, or TOS):
per-packet or per-socket. The Java API is for the per-socket style, but
the old implementation had each SocketImpl intercept calls to
SocketOptions.setOption for SocketOptions.IP_TOS, stash the traffic class
in one of the SocketImpl's private fields, skip calling native code, and
then pass the traffic class to each native method that would need it to
implement the per-packet style. Unfortunately, each of those methods was
just ignoring the traffic class.

I've removed all this interception, so we now pass the traffic class straight
to the kernel via setsockopt(2), and we don't need to pass anything to the
individual per-packet calls.

The motivation for going the per-packet route appears to have been to work
around a lack of support for the per-socket route in old versions of Linux
and other OSes. It all works now, though, so there's no point making our
lives harder (and doing more work at runtime) to work around bugs and
infelicities that no longer exist.

I tested the new code manually with tcpdump, for both IPv4 (radio) and
IPv6 (wifi), and in both cases it looks like it's doing the right thing now.
We also still pass all of our tests, though none of them are capable of
recognizing whether we're actually doing anything useful anyway...

Change-Id: Ice241e088d25037123c73733a3f2bfade976fb31
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/nio/internal/DatagramChannelImpl.java
pache/harmony/nio/internal/SocketChannelImpl.java
0371d85fa3ecb5f162d107cdbff0a99cd987fdcc 27-Jul-2010 Elliott Hughes <enh@google.com> Fix setSoLinger.

The bizarre use of Boolean or Integer (rather than just using -1) comes
from the RI. Third-party SocketImpl implementations may expect the RI's
documented behavior, so we should probably do the same.

I've also changed SocketChannelImpl.SocketAdapter to reuse Socket's
implementation of all the socket option getting/setting code, mainly so
we don't have two copies of all the weirdness.

I've also fixed a bug in the native getSocketOption code which returned
a Boolean rather than an Integer for IP_TOS/IPV6_TCLASS, though that code
is actually never called at the moment.

I've removed support for passing Byte values to setSocketOption. The RI
only uses Boolean and Integer.

Change-Id: I80ba63745f4c4f3ac357dc3f0b7cbf254a291bce
pache/harmony/nio/internal/SocketChannelImpl.java
623978ac0a3f9e4e2d1111aee41b64195d9ac64c 28-Jul-2010 Elliott Hughes <enh@google.com> resolved conflicts for merge of 01a18c74 to dalvik-dev

Change-Id: Ib569414191a6e7b0e7aebb804fe1f4d57c5184a9
01a18c74534e68f19c90912e8f87e856f9901dfb 28-Jul-2010 Elliott Hughes <enh@google.com> resolved conflicts for merge of fb4045a3 to master

Change-Id: I2100c70f6078108e7b646c393ac2e4b42ca8d066
48b569bddf13e20ecdca657f598b7005b6f86b8e 27-Jul-2010 Brian Carlstrom <bdc@google.com> Fix SecureRandom default service

Further profiling revealed a bug in the early performance fix which
was always returning null because it the Services.getService interface
expected SecureRandom.<algorithm>, not just SecureRandom.

However, the basic idea of using the precomputed Services approach was
sound. Services.refresh now calculates the default SecureRandom
services as a special case.

Confirmed that the RI also has this apparently undocumented behavior
of defaulting the SecureRandom to the highest priority provider that
has an available implementation.a

Change-Id: Icf3be52e5d9113b0940cd38522857ba7e339a60f
pache/harmony/security/fortress/Services.java
4e4000ed98f9056639fba0713a3fd3caacf9746c 27-Jul-2010 Elliott Hughes <enh@google.com> Let the kernel handle network timeouts by setting SO_RCVTIMEO.

As far as I can tell, the reason other implementations use select(2)
instead of SO_RCVTIMEO is that traditionally the latter wasn't implemented.
Stevens is unusually unspecific about the portability of SO_RCVTIMEO, but
the web says that Linux didn't support it until 2.4, and Solaris was late
and buggy too. Modern versions of Linux, Mac OS, and Windows all support
SO_RCVTIMEO, though, so portability should not be a concern for us.

This patch causes a regression; several of the blocking network I/O methods
that used to be interruptible by virtue of their select(2)-based manual
implementation of timeouts are no longer interruptible. Making all network
I/O interruptible is work in progress, covered by http://b/2823977.

Bug: http://b/2512069
Change-Id: I0a2812ca1537bd171c4205343d6b3b526b72b2b2
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/net/SocketInputStream.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/nio/internal/DatagramChannelImpl.java
pache/harmony/nio/internal/PipeImpl.java
pache/harmony/nio/internal/SocketChannelImpl.java
bfb0099cc4c8eca744eeda0f20e5b3644f1a4cb9 11-Jun-2010 Owen Lin <owenlin@google.com> Improve putFloatArray performance

Change-Id: I04b43a2be6409329408d74af7ff0f0b2b60cc96d
pache/harmony/luni/platform/IMemorySystem.java
pache/harmony/luni/platform/OSMemory.java
pache/harmony/luni/platform/PlatformAddress.java
f9e1294b67778f9b290b9fb6eeda2d7cc7c1c3ee 24-Jul-2010 Elliott Hughes <enh@google.com> Fix available() to throw on a closed Socket's InputStream.

Change-Id: If9163301d18f7c0a11af08da6017840aa1bf4f38
pache/harmony/luni/net/PlainSocketImpl.java
f4e33cb34780903c44967b652c46d198d10c9ce0 24-Jul-2010 Elliott Hughes <enh@google.com> Merge "Fix multicast TTL (and loopback)." into dalvik-dev
9e0fcfffa3647483fd78571978954827c95efa68 24-Jul-2010 Jean-Baptiste Queru <jbq@google.com> am ee57aef0: resolved conflicts for merge of 67ca373a to master

Merge commit 'ee57aef0ce4d4460e1c4072f67014d68112528fe' into dalvik-dev

* commit 'ee57aef0ce4d4460e1c4072f67014d68112528fe':
Bugs when connecting a SocketChannel registered in a Selector
f3afb1b6a4ace33bd60e5801bdb2fcb2e935d486 24-Jul-2010 Elliott Hughes <enh@google.com> Fix multicast TTL (and loopback).

We generally create AF_INET6 sockets. These work for both IPv6 and IPv4
communication. Typically, we'll be using them for IPv4. Unfortunately,
if we've only set IPPROTO_IPV6 socket options, they won't be used for
IPv4 communication. We need to set the IPPROTO_IP equivalents too. This
patch fixes our behavior for IP_MULTICAST_TTL/IPV6_MULTICAST_HOPS and
IP_MULTICAST_LOOP/IPV6_MULTICAST_LOOP.

Also switch to consistently using AF_ constants with socket(2). Stevens
recommends we just pretend the PF_ constants don't exist.

Also remove the useless REUSEADDR_AND_REUSEPORT constant, and fix some
of the C++ constant names to match the Java constant names.

Bug: http://code.google.com/p/android/issues/detail?id=9813
Change-Id: I31664198824291f2a13a7d72a9d64f12621e3415
pache/harmony/luni/net/PlainDatagramSocketImpl.java
ee57aef0ce4d4460e1c4072f67014d68112528fe 23-Jul-2010 Jean-Baptiste Queru <jbq@google.com> resolved conflicts for merge of 67ca373a to master

Change-Id: I01a4b6b0a73066e9a8119a66d07c43839079b4c9
6882e31b7ce2d04ebbc91c7a55d7840e8fdce8a5 20-Jul-2010 Brian Carlstrom <bdc@google.com> Bring SSLSocketImpl and SSLEngine in line with OpenSSLSocketImpl's cipher suites

Wrote an interoperability test between our OpenSSL and SSLEngine
based SSLSocket implementations. Used it to flush out problems between
the implementations, which mostly were in the non-native implementation.

Filling out the SSLEngine (and therefore non-native SSLSocket) support
led to the list of supported and default cipher suites now being the
same as out OpenSSL SSLSocket. Most of the work was making the the
NULL, RC4, and AES ciphers work with SSLEngine as well as some minor
bug fixes in related code.

Summary:
- changing test_SSLSocket_getSupportedCipherSuites_connect to try all
combinations of our two SSLContext/SSLSocket implementations
- fixed SSLEngine with *_WITH_NULL_* CipherSuites to use javax.crypto.NullCipher
- added *_AES_* cipher suites to SSLEngine (and therefore Java SSLSocketImpl)
- remove *_DH_* cipher suites which are not supported by the RI or our OpenSSL implementation
- fixed Java SSLSocket to not handshake on accept so will pass the basic SSLSocketTest
- added new KeyManagerFactoryTest while testing "DH_" cipher suite key types

This change depends on restoring bouncycastle's RC4 implementation (separate CL in external/bouncycastle)

Details:

Fixed SSLEngine with *_WITH_NULL_* CipherSuites by use javax.crypto.NullCipher

expectations/knownfailures.txt
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateSSLv3.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateTLS.java

Previously I had changed the string name of CipherSuites from
"TLS_..." to "SSL_..." where appropriate to match the RI. Since I was
doing maintenance on overall list, I renamed the CODE_TLS_... and
TLS_... static fields as well to match.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSessionImpl.java

Removed IDEA and RC2 CipherSuites to make it clear they are not
supported. While technically this happened as a side effect of the
assignment "supported = false" if the CipherSuite failed to load, we
truly intend not to support these. Also removed SSH_DH_* suites which
don't work with DSA keys and aren't supported by the RI or our OpenSSL
implementation.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java

Old connection state code assumed that if a cipher was blocked, the
block size was 8 bytes. This is not true for the 16 byte AES ciphers.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionState.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateSSLv3.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateTLS.java

No wonder our OpenSSL implementation incorrect did a startHandshake
when accepting the socket... it got it from the Java implementation.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLServerSocketImpl.java

Test for KeyManagerFactory (and KeyManager). TestKeyStore now creates
KeyManagers and TrustManagers from the keystore as a convenience for
KeyManagerFactoryTest (instead of having the code in the
TestSSLContext where we didn't keep a pointer to the created values).

luni/src/test/java/javax/net/ssl/KeyManagerFactoryTest.java
support/src/test/java/java/security/StandardNames.java
support/src/test/java/java/security/TestKeyStore.java
support/src/test/java/javax/net/ssl/TestSSLContext.java

Remove CIPHER_SUITES_SSLENGINE now that its the same as CIPHER_SUITES

luni/src/test/java/javax/net/ssl/SSLEngineTest.java
support/src/test/java/java/security/StandardNames.java

test_SSLSocket_getSupportedCipherSuites_connect now does
interoperability testing not just between the default SSLContext's
SSLSockets but between the four combinations of our two SSLContext. It
also now sends some test data bi-directionally between the client and
server.

luni/src/test/java/javax/net/ssl/SSLSocketTest.java

Changed TestSSLContext.create to allow a different Provider for the
client and server SSLContexts.

luni/src/test/java/javax/net/ssl/SSLEngineTest.java
luni/src/test/java/javax/net/ssl/SSLSocketTest.java
support/src/test/java/javax/net/ssl/TestSSLContext.java

RC4 is now available in bouncycastle for the non-OpenSSL SSLContext to
use for parity with the OpenSSL implementation.

support/src/test/java/java/security/StandardNames.java

Changed TestSSLSocketPair to use Futures like NativeCryptoTest so its
easier to choose between client and server errors while debuging.

support/src/test/java/javax/net/ssl/TestSSLSocketPair.java

Removed bogus import

luni/src/test/java/org/apache/harmony/xnet/provider/jsse/NativeCryptoTest.java

Change-Id: I080c0343a3f86f27b7c191a7b80b585b9ca52d93
pache/harmony/xnet/provider/jsse/CipherSuite.java
pache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
pache/harmony/xnet/provider/jsse/ConnectionState.java
pache/harmony/xnet/provider/jsse/ConnectionStateSSLv3.java
pache/harmony/xnet/provider/jsse/ConnectionStateTLS.java
pache/harmony/xnet/provider/jsse/SSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLSessionImpl.java
pache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
1422ef3b968d6b7575d19d0e9261dd2429c1b263 22-Jul-2010 Elliott Hughes <enh@google.com> Merge "Remove File's cached UTF-8 byte[]." into dalvik-dev
aaacdb095b10293286adbfd94af2fd83b8dae3a8 22-Jul-2010 Elliott Hughes <enh@google.com> Remove File's cached UTF-8 byte[].

This doesn't really improve File.getCanonicalPath and its helpers much, but it
improves everything else, and feels like a step in the right direction.

Benchmarking shows only a tiny difference in the uncommon case of a reused
File, and a significant increase in performance in the more likely case of
a single-use File.

Before:

benchmark us
Exists 26.14
ExistsReuse 5.08

After:

benchmark us
Exists 13.90
ExistsReuse 5.23

Bug: 2281992
Change-Id: Ibc6fd2581983ae8a57bf4b7f49196c76ad41169e
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/OSFileSystem.java
eafede536f2059bb6c869e7a5f07fd7ad9758e28 21-Jul-2010 Jesse Wilson <jessewilson@google.com> Adding tests for HTTP connect and read timeouts.

Also a typo in an exception message in HttpURLConnectionImpl.

Change-Id: Ifa8b85e835eff6151a25c4a9ee83a7194de7656c
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
40fd826dafd7ef63fb99655ef635b94081e8cb11 21-Jul-2010 Jesse Wilson <jessewilson@google.com> Merge "Deduplicating HTTP tests with Harmony and get Harmony's tests passing." into dalvik-dev
83a47d4d0c536e06fc53eda9d5a1a5d93f9accc6 21-Jul-2010 Jesse Wilson <jessewilson@google.com> Deduplicating HTTP tests with Harmony and get Harmony's tests passing.

This fixes a behaviour problem where we were sending the response
headers to the response cache rather than the request headers. It
also fixes a bug in handling of null header names.

This also cleans up some of the worst names in HttpUrlConnectionImpl.
The similarity between reqHeader and resHeader may have been a reason
for the problem above.

See bug 2352649, which complains about how our duplicated-with-Harmony
test connects to news.yahoo.com, quite unreliably. The latest version
of their test uses a local jetty server, which is far more reliable.

Change-Id: I701b3a1c999c63ea8dd929d8bd020717403fb75c
pache/harmony/luni/internal/net/www/protocol/http/Header.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
ef628d1464e57552403ad43366e153c1ef50b926 19-Jul-2010 Brian Carlstrom <bdc@google.com> New NativeCryptoTest, NativeCrypto.{SSL_set_client_CA_list, SSL_renegotiate}, fixes for other minor bugs exposed by test

Summary:
- New NativeCryptoTest covering NativeCrypto SSL APIs
- Added SSL_set_client_CA_list for server to specify acceptable client cert issues
- Added SSL_renegotiate for renegoiation testing
- Removed unneeded d2i_SSL_SESSION argument
- Added OpenSSLSocketImpl read/write bounds checking
- Added NULL checks on AppData to avoid native crashes on use of SSL before handshake

Details:
Corrected NativeCrypto thrown exceptions based on
NativeCryptoTest. Of note, we now throw NullPointerException
instead of SSLException for simple null issues in NativeCrypto.cpp

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
luni/src/main/native/NativeCrypto.cpp

Created NativeCrypto.{encodeCertificates,encodeIssuerX509Principals} to
factor out some code out of OpenSSLSocketImpl that any user of
NativeCrypto.{SSL_use_certificate, SSL_set_client_CA_list} would
find useful.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

Added SSL_set_client_CA_list to allow server to provide list of
issuers acceptable for client certifcates.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
luni/src/main/native/NativeCrypto.cpp

Added SSL_renegotiate to allow unit testing of SSL renegoiation.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java
luni/src/main/native/NativeCrypto.cpp

Removed d2i_SSL_SESSION size argument since it should be same as length of other argument

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
luni/src/main/native/NativeCrypto.cpp

Added bounds checking to getInputStream.read(byte[], ...) and
getOutputStream().write(byte[], ...)

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

Added NULL checks on AppData to avoid native crashes.

luni/src/main/native/NativeCrypto.cpp

New test of NativeCrypto SSL APIs

luni/src/test/java/org/apache/harmony/xnet/provider/jsse/NativeCryptoTest.java

Change-Id: I2fb7a40761e66320f73b02880e6e43def9594497
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
e3a187163504f00c98bd75cbd8bcbdde123ae2cd 14-Jul-2010 Brian Carlstrom <bdc@google.com> Fix PKCS12 and BKS KeyStore as well as SSL renegotiation

Summary:
- Added KeyStoreTest and fixed PKCS and BKS keystores to be fully functional
- KeyStore and KeyStoreImpl improvements in libcore and bouncycastle for more RI-like behavior
- SSL Renegotiation fix for new implementation

Details:

external/bouncycastle

TwoFish added back for BKS KeyStore. Like RC2, it not supported as
a general cipher, but instead used internally for KeyStore
implementation.

src/main/java/org/bouncycastle/crypto/engines/TwofishEngine.java
bouncycastle.config

Added back PBEWITHSHAANDTWOFISH, PBEWITHSHAANDTWOFISH-CBC,
PBEWITHSHA1ANDRC2-CBC, PBEWITHHMACSHA, PBEWITHHMACSHA1 to support
PKCS12 and BKS KeyStore implementations (as determined by new
KeyStoreTest)

src/main/java/org/bouncycastle/jce/provider/BouncyCastleProvider.java
src/main/java/org/bouncycastle/jce/provider/JCEBlockCipher.java
src/main/java/org/bouncycastle/jce/provider/JCEMac.java
src/main/java/org/bouncycastle/jce/provider/JCESecretKeyFactory.java

Don't throw an error when deleting a non-existing KeyStore entry. The
RI documentation (and behavior) says it throws an error when it fails
to remove an entry, not when the entry does not exist.

src/main/java/org/bouncycastle/jce/provider/JDKKeyStore.java
src/main/java/org/bouncycastle/jce/provider/JDKPKCS12KeyStore.java

Try to make BC's PKCS KeyStore have a more RI-like getCreationDate behavior

src/main/java/org/bouncycastle/jce/provider/JDKPKCS12KeyStore.java

Make BC's PKCS KeyStore failfast on setting non-supported key,
instead of failing later on get.

src/main/java/org/bouncycastle/jce/provider/JDKPKCS12KeyStore.java

Make BC's PKCS KeyStore handle setting a PrivateKey with an emtpy chain.

src/main/java/org/bouncycastle/jce/provider/JDKPKCS12KeyStore.java

Add more general avoidance of NullPointerExceptions on null aliases

src/main/java/org/bouncycastle/jce/provider/JDKPKCS12KeyStore.java

Added notes about changes improvements

patches/README

Regenerated patch with above changes

patches/android.patch

libcore

KeyStore improvements based on KeyStoreTest

- Fix UnrecoverableKeyException to be a subclass of
UnrecoverableEntryException, which was keeping the new
KeyStoreTest from compiling.

luni/src/main/java/java/security/UnrecoverableKeyException.java

- Fix to not convert UnrecoverableKeyException to KeyStoreException,
which was only being done because of the UnrecoverableKeyException
superclass bug.

luni/src/main/java/java/security/KeyStoreSpi.java

- Harmony KeyStore was being overly aggresive about throwing on null
alias arguments in cases where the RI was happy to pass them to the
KeyStoreSpi.

luni/src/main/java/java/security/KeyStore.java

- New test after PKCS12 regresion. It enumerates and excercises
all methods on all available KeyStore
implementations. Unfortunately, the main varieties of KeyStores
made this a lot more complicated than I was originally
expecting. It does clarifiy the differences between the RI and
BC KeyStore implementations, especially for PKCS12, where in
some ways the RI is more feature complete (setting key via
byte[]), but in other ways BC goes beyond some RI limitations
(allowing storage of certificates).

luni/src/test/java/java/security/KeyStoreTest.java

TestKeyStore improvements while writing KeyStoreTest
- Renamed "keyStorePassword" working usages to clarify if it really
means the "storePassword" on the whole KeyStore, or if it is a
"keyPassword" on individual keys.
- Moved TestKeyStore from javax.net.ssl to java.security

luni/src/test/java/javax/net/ssl/SSLContextTest.java
luni/src/test/java/javax/net/ssl/SSLEngineTest.java
luni/src/test/java/javax/net/ssl/SSLSessionTest.java
luni/src/test/java/javax/net/ssl/SSLSocketTest.java
support/src/test/java/java/security/StandardNames.java
support/src/test/java/java/security/TestKeyStore.java
support/src/test/java/javax/net/ssl/TestKeyStore.java
support/src/test/java/javax/net/ssl/TestSSLContext.java

Fixing up SSL renegotiation support. Now that we are not trying to
prevent renegotiation, make sure it is working correctly.

- Remove SSL_VERIFY_CLIENT_ONCE to take the default behavior of
re-requesting client certificate on renegotiation.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

- Updated comments to reflect renegotiation. Bug fix to not clear
out callback reference on handshake complete, since we need it for
renegotiation.

luni/src/main/native/NativeCrypto.cpp

Updated for PKCS12 KeyStore support

support/src/test/java/java/security/StandardNames.java

Added javadoc when writint KeyStoreTest

luni/src/test/java/java/security/ProviderTest.java

frameworks/base

Tracking changes to UnrecoverableKeyException superclass

api/8.xml
api/current.xml

Change-Id: I6349dbfc02896417595b52e364ade8000b567615
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
221d0ccb4cc23ee0bf0646e9abe471fb48b3a1a8 15-Jul-2010 Elliott Hughes <enh@google.com> Simplify the network send(2) interfaces.

Similar to the change for the recv(2) code.

Unrelatedly, I've pulled out our exception-throwing helpers for reuse. This
was meant to be in a separate change, but I accidentally mixed it in.

Bug: 2823977
Change-Id: I314a4337189277b6eff65f7ccf9e897b5d0b73f2
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/nio/internal/DatagramChannelImpl.java
79ff4e73fd689dae6667a8137ee57137962ff13a 14-Jul-2010 Elliott Hughes <enh@google.com> Make it possible to interrupt network reads.

This patch simplifies the network I/O interface, in particular for read/recv.

The bounds checking from OSNetworkSystem.read goes, since the caller already
checks. (If we want that checking in native code, we should add it uniformly.)

We also remove supportsUrgentData (which was always returning true), and remove
the sole caller, so we just try the operation and report failures if they happen
rather than trying to predict the failure (as the original code seemed to want
to do, and which is never a good idea).

The native code gains logic to recognize when the FileDescriptor has been
closed from another thread, though this logic remains largely unused at this
point. (There's comment-out code in "close" that does a shutdown(2) to wake
us up so we can recognize this situation.) I've switched code over to using
the new NetFd class, but haven't ensured that we handle the wakeups correctly.
(The "read" implementation being the notable exception.) For now, with the
shutdown(2) commented out, this shouldn't have any visible behavioral changes.
(And our tests don't spot any.)

Code that was using malloc(3)/free(3) to allocate temporary buffers, and copying
to and from those buffers has been rewritten to use JNI-provided pointers onto
the heap, as part of the general "don't lie to the garbage collector" push.

The implementations for the various old forms of recv have been collapsed into
one.

Bug: 2823977
Change-Id: I05cf742c44827a24df3c1ff59727013ee4636233
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/nio/internal/DatagramChannelImpl.java
pache/harmony/nio/internal/SocketChannelImpl.java
3bf03b8be207d0c760bcad5eae5028e854498376 14-Jul-2010 Elliott Hughes <enh@google.com> Remove the last few "Answer"/"Answers" from javadoc.

Change-Id: I753bd9bbfc1462d948929197f00668fa1e1237f2
pache/harmony/luni/internal/net/www/MimeTable.java
pache/harmony/luni/net/NetUtil.java
pache/harmony/luni/net/Socks4Message.java
pache/harmony/nio/internal/DatagramChannelImpl.java
059dbc04218144f985b20a228bbe98139d400d0c 08-Jul-2010 Brian Carlstrom <bdc@google.com> Improved client certificate and certificate chain support

Summary:
- openssl: add openssl support for specifying per key certificate chains
- libcore: properly implement client certificate request call back
- libcore: properly implement sending certificate chain
- libcore: properly implement retreiving local certificate chain
- libcore: added an SSLContext for non-OpenSSL SSLSocket creation

Details:

external/openssl

Improve patch generate support by applying all other patches to
baseline to remove cross polluting other patch changes into target
patch. Move cleanup of ./Configure output to import script from
openssl.config.

import_openssl.sh
openssl.config

Adding SSL_use_certificate_chain and SSL_get_certificate_chain to
continue to finish most of remaining JSSE issues.

include/openssl/ssl.h
ssl/s3_both.c
ssl/ssl.h
ssl/ssl_locl.h
ssl/ssl_rsa.c

Updated patch (and list of input files to patch)

patches/jsse.patch
openssl.config

libcore

Restoring SSLContextImpl as provider of non-OpenSSL SSLSocketImpl
instances for interoperability testing. OpenSSLContextImpl is the
new subclass that provides OpenSSLSocketImpl. JSSEProvider
provides the old style SSLContexts, OpenSSLProvider provides the
OpenSSL SSLContext, which includes the "default" context. Changed
to register SSLContexts without aliases to match the RI.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/JSSEProvider.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLProvider.java

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/DefaultSSLContextImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLContextImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLContextImpl.java

Native interface updates to support OpenSSLSocketImpl improvements
- KEY_TYPES now expanded based on what we are being provided by OpenSSL.
keyType function now maps key type values received from
clientCertificateRequested callback.
- Removed remaining uses of string PEM encoding, now using ASN1 DER consistently
Includes SSL_SESSION_get_peer_cert_chain, verifyCertificateChain
- Fixed clientCertificateRequested to properly include all key
types supported by server, not just the one from the cipher
suite. We also now properly include the list of supported CAs to
help the client select a certificate to use.
- Fixed NativeCrypto.SSL_use_certificate implementation to use new
SSL_use_certificate_chain function from openssl to pass chain to
OpenSSL.
- Added error handling of all uses of sk_*_push which can fail due to out of memory
- Fixed compile warning due to missing JNI_TRACE argument
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java
luni/src/main/native/NativeCrypto.cpp
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

Pass this into chooseServerAlias call as well in significantly revamped choseClientAlias

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

Minor code cleanup while reviewing diff between checkClientTrusted and checkServerTrusted

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerImpl.java

Improvements to SSL test support to go along with client
certificate and certificate chain changes. TestSSLContext now has
separate contexts for the client and server (as well as seperate
key stores information). TestKeyStore now is more realistic by
default, creating a CA, intermediate CA, and separate client and
server certificates, as well as a client keystore that simply
contains the CA and no certificates.

support/src/test/java/javax/net/ssl/TestKeyStore.java
support/src/test/java/javax/net/ssl/TestSSLContext.java

Tests tracking API changes. Tests involving cert chains now now
updated to use TestKeyStore.assertChainLength to avoid hardwiring
expected chain length in tests. These tests also now use
TestSSLContext.assertClientCertificateChain to validate that the
chain is properly constructed and trusted by a trust manager.

luni/src/test/java/java/net/URLConnectionTest.java
luni/src/test/java/javax/net/ssl/SSLContextTest.java
luni/src/test/java/javax/net/ssl/SSLEngineTest.java
luni/src/test/java/javax/net/ssl/SSLSessionContextTest.java
luni/src/test/java/javax/net/ssl/SSLSessionTest.java
luni/src/test/java/javax/net/ssl/SSLSocketTest.java
support/src/test/java/java/security/StandardNames.java
support/src/test/java/javax/net/ssl/TestSSLEnginePair.java
support/src/test/java/javax/net/ssl/TestSSLSocketPair.java

frameworks/base

Tracking change of SSLContextImpl to OpenSSLContextImpl

core/java/android/net/SSLCertificateSocketFactory.java
core/java/android/net/http/HttpsConnection.java
tests/CoreTests/android/core/SSLPerformanceTest.java
tests/CoreTests/android/core/SSLSocketTest.java

Tracking changes to TestSSLContext

core/tests/coretests/src/android/net/http/HttpsThroughHttpProxyTest.java

Change-Id: Ie35ebce89966dfce62c316f7fe7252bf06935680
pache/harmony/xnet/provider/jsse/DefaultSSLContextImpl.java
pache/harmony/xnet/provider/jsse/JSSEProvider.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLContextImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLContextImpl.java
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
a5df574bf93265d41986b7e5474fb2fbb527c9f0 14-Jul-2010 Jesse Wilson <jessewilson@google.com> Merge "Cleanup HTTP retries." into dalvik-dev
c0372d90016d241ac979faa6fa1731f30b6f2a03 13-Jul-2010 Jesse Wilson <jessewilson@google.com> Cleanup HTTP retries.

We now do the right thing when redirects point us at a different
host or a different scheme.

Also...

Invert the parameter to AbstractHttpInputStream.endOfInput()
and HttpURLConnection.releaseSocket() to be positive 'reuse'
rather than negative 'close'. It makes the code in that method
read better.

Combine discardResponse() and endRequest(). The new method is
discardIntermediateResponse(). Cleanup how we handle intermediate
responses, and how those connections get recycled.

Remove HttpURLConnection's cached fields for proxy addresses.
Instead just update the proxy field when those fields change.
This attempts to make it clear that the names represent the
connected address and not the origin server's address. (This
is different when a proxy is in use.)

Document a consistent interpretation of the inherited protected
field 'connected'. Unfortunately it does not mean connected.

Change-Id: I8d4b65bffa5aeba353186b60cf951232f7762a18
pache/harmony/luni/internal/net/www/protocol/http/AbstractHttpInputStream.java
pache/harmony/luni/internal/net/www/protocol/http/ChunkedInputStream.java
pache/harmony/luni/internal/net/www/protocol/http/FixedLengthInputStream.java
pache/harmony/luni/internal/net/www/protocol/http/Header.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/http/UnknownLengthHttpInputStream.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
ccbe3404e0691dab506d017550658e8e5974c83e 10-Jul-2010 Elliott Hughes <enh@google.com> Use 'dst' (or an even more appropriate name where possible) rather than 'dest'.

(The ArrayIndexOutOfBoundsException for System.arraycopy already talks
about 'dst' and 'dstPos'.)

Change-Id: Iba9415dd4a9ec3b457938ea4469b4a0024bab6e4
pache/harmony/luni/platform/PlatformAddress.java
pache/harmony/luni/util/InputStreamHelper.java
pache/harmony/xnet/provider/jsse/HandshakeIODataStream.java
da289bcd0a9e207cc03c752f7c21c9004056e179 09-Jul-2010 Jesse Wilson <jessewilson@google.com> Address feedback from change 57066,
Rewrite the main request retry loop of HttpURLConnection.

Change-Id: I7e10e356614970971253f2e3f60d173a2e5433d4
pache/harmony/luni/internal/net/www/protocol/http/AbstractHttpInputStream.java
pache/harmony/luni/internal/net/www/protocol/http/AbstractHttpOutputStream.java
pache/harmony/luni/internal/net/www/protocol/http/ChunkedInputStream.java
pache/harmony/luni/internal/net/www/protocol/http/ChunkedOutputStream.java
pache/harmony/luni/internal/net/www/protocol/http/FixedLengthInputStream.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/http/RetryableOutputStream.java
pache/harmony/luni/internal/net/www/protocol/http/UnknownLengthHttpInputStream.java
e3836e959fe04ab6c0dcda61cc585e35c82317b8 09-Jul-2010 Jesse Wilson <jessewilson@google.com> Merge "Rewrite the main request retry loop of HttpURLConnection." into dalvik-dev
ffd579b668428272b78f5c6c64f9c89766f37c1a 09-Jul-2010 Jesse Wilson <jessewilson@google.com> Rewrite the main request retry loop of HttpURLConnection.

We had problems where HTTP auth failures weren't eligible
for automatic retries, particularly when HTTP post was
in use.

This fixes that problem and generally cleans up the HTTP
request loop. In particular:
- Be more careful about keeping state about whether
we've sent a request or a request header.
- Document the nuanced behavior around when headers are
transmitted.
- Simplify the daisy-chain of methods. Formerly we had
sendReqeust, writeRequest, doRequest, and doRequestInternal.
We now have more intention-revealing method names.
- Manage reentrant calls to doRequest(). Previously weird
things would happen, such as the following chain of calls:
doRequest()
doRequestInternal()
sendRequest()
readServerResponse()
maybeCache()
ResponseCache.put()
getHeaders()
doRequest()
Things are now more straight forward and retrieveResponse()
initializes everything.
- Throw HttpRetryException when we should.

Also moving inner HttpOutputStreams into their own classes and
splitting DefaultHttpOutputStream into ChunkedOutputStream and
RetryableOutputStream.

Change-Id: I5c1da717f0dee7ecc896e51701b702e535867417
pache/harmony/luni/internal/net/www/protocol/http/AbstractHttpInputStream.java
pache/harmony/luni/internal/net/www/protocol/http/AbstractHttpOutputStream.java
pache/harmony/luni/internal/net/www/protocol/http/ChunkedOutputStream.java
pache/harmony/luni/internal/net/www/protocol/http/FixedLengthOutputStream.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/http/RetryableOutputStream.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
b7eec62f6db198a76b67d7915b03e59189c6df4f 02-Jul-2010 Brian Carlstrom <bdc@google.com> TestKeyStore only use RSA by default & fixing SSLEngine client auth with DSA client and RSA server

Summary:

Goal here was to just make most tests faster by only having
TestKeyStore create RSA keys by default. However, when I did that
SSLEngineTest#test_SSLEngine_clientAuth started working, so I ended up
investigating a much deeper issue with DSA client authentication
against an RSA SSLEngine server.

Details:

Changed the TestKeyStore.get singleton to only contain RSA
keys. TestKeyStore.create now requires the caller enumerate what
keys they want if they need more than that or an alternative.

support/src/test/java/javax/net/ssl/TestKeyStore.java

Changed test_SSLSocket_getSupportedCipherSuites_connect to
explicitly request RSA and DSA keys since it needs both to try
connecting all possible cipher suites.

luni/src/test/java/javax/net/ssl/SSLSocketTest.java

Fixing SSLEngine client authentication when server uses RSA but client uses DSA

Fixed java.net.ssl.SSLEngineTest#test_SSLEngine_clientAuth

expectations/knownfailures.txt

Added CiperSuite.authType field which contains the algorithm name
such as RSA, DSA, DH, that the client will use to authenticate the
server. Like the cipherName, hmacName, and hashName, this is
logically derivable from the the CiperSuite.KEY_EXCHANGE_*, but we
remember it to avoid repeatedly doing large cascading "if" tests to
determine which key algorithm should be used for each
case.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java

Fixed a number of client certificate authentication bugs in SSLEngine
- Changed ClientHandshakeImpl's in the SSL/Tls Certificate message
code to mirror ServerHandshakeImpl's implementation to properly
use chooseEngineClientAlias in the SSLEngine case.
- Changed to use the client certifcates key algorithm for computing
the signature for the SSL/TLS CertificateVerify
message. Previously we used the cipher suites negoitated key
exchange method, but if the client may select a certificate with
a different algorithm if the server provides a CA for another
algorithm.
- Also changed to use CipherSuite.isAnonymous in two places rather
than the inlined equivalent.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java

Fixed client authentication to use the client's certificate (not
the server's) to do verify the CertificateVerify message signature.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java

Fixed bug in DigitalSignature which did not Signature.update in
verifySignature, so it could never have properly authenticated DSA
signatures.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/DigitalSignature.java

Added CertificateMessage getAuthType convenience

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CertificateMessage.java

Made CertificateRequest certificate_authorities final, found we were double allocating it

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CertificateRequest.java

Cleaning up imports of HandshakeProtocol while working on its subclasses.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/HandshakeProtocol.java

Cleaned up while looking at X509KeyManager implementations while debugging.

support/src/test/java/org/apache/harmony/xnet/tests/support/X509KeyManagerImpl.java

Change-Id: I74b98754c11000cbfea416f1571c380c9c67abf3
pache/harmony/xnet/provider/jsse/CertificateMessage.java
pache/harmony/xnet/provider/jsse/CertificateRequest.java
pache/harmony/xnet/provider/jsse/CipherSuite.java
pache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
pache/harmony/xnet/provider/jsse/DigitalSignature.java
pache/harmony/xnet/provider/jsse/HandshakeProtocol.java
pache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
0120b34f823a06763ef7b708249abf3c4bef40ed 08-Jul-2010 Elliott Hughes <enh@google.com> Remove dead code/unused variables from OSNetworkSystem.

This has never done anything, and we've no idea what -- if anything -- it was
meant to do, and it doesn't do anything upstream either, so out it goes...

Change-Id: I33a738700fd4811fe47089f0d0373ce9f0d525de
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/nio/internal/DatagramChannelImpl.java
a233bbfcc80149b472c978ded50f9420936226fb 08-Jul-2010 Elliott Hughes <enh@google.com> Clean up OSFileSystem.

I accidentally opened this file instead of OSNetworkSystem, but took the
opportunity to move null pointer checking down into the JNI, where it doubles
as OOM checking. I've also added missing null checks to the JNI.

(Strictly, ScopedPrimitiveArray doesn't yet do the right thing in all cases,
it's ScopedUtfChars that does. An improved ScopedPrimitiveArray will be along
shortly...)

Also some cosmetic tidying.

Change-Id: Ie4d3a217332dae67a12db370246c7d87fe7edae4
pache/harmony/luni/platform/OSFileSystem.java
096aac7b8a607d3da237900f52cab1c5066bf992 01-Jul-2010 Jesse Wilson <jessewilson@google.com> Buffering the decoding of chunked encoding and HTTP headers.

Also cleanup of HttpConfiguration (renamed HttpConnection.Address),
including removing some dead code.

Also adding performance-run support to MockWebServer to permit
benchmarking.

I benchmarked different buffer sizes, and a buffer as small as 16 bytes
halved the runtime on some HTTP requests. Ultimately I chose a 128 byte
buffer, since that's the point of diminishing returns.

The following report shows benchmark results for 5 different buffer
sizes. Notice how our previous unbuffered behaviour was particularly
inefficient.

bodySize transferEncoding responseHeaders bufferSize ms logarithmic runtime
0 FIXED_LENGTH MINIMAL 0 5.44 =
0 FIXED_LENGTH MINIMAL 16 5.17 =
0 FIXED_LENGTH MINIMAL 128 5.06 =
0 FIXED_LENGTH MINIMAL 512 5.19 =
0 FIXED_LENGTH MINIMAL 1024 5.27 =
0 FIXED_LENGTH TYPICAL 0 14.61 ===========
0 FIXED_LENGTH TYPICAL 16 7.35 ====
0 FIXED_LENGTH TYPICAL 128 6.48 ===
0 FIXED_LENGTH TYPICAL 512 6.97 ====
0 FIXED_LENGTH TYPICAL 1024 6.92 ====
0 CHUNKED MINIMAL 0 5.72 ==
0 CHUNKED MINIMAL 16 5.26 =
0 CHUNKED MINIMAL 128 5.27 =
0 CHUNKED MINIMAL 512 5.16 =
0 CHUNKED MINIMAL 1024 5.31 =
0 CHUNKED TYPICAL 0 14.81 ===========
0 CHUNKED TYPICAL 16 7.30 ====
0 CHUNKED TYPICAL 128 6.62 ===
0 CHUNKED TYPICAL 512 6.51 ===
0 CHUNKED TYPICAL 1024 6.50 ===
1024 FIXED_LENGTH MINIMAL 0 5.47 =
1024 FIXED_LENGTH MINIMAL 16 5.40 =
1024 FIXED_LENGTH MINIMAL 128 5.43 =
1024 FIXED_LENGTH MINIMAL 512 5.40 =
1024 FIXED_LENGTH MINIMAL 1024 5.37 =
1024 FIXED_LENGTH TYPICAL 0 14.83 ===========
1024 FIXED_LENGTH TYPICAL 16 7.42 ====
1024 FIXED_LENGTH TYPICAL 128 6.50 ===
1024 FIXED_LENGTH TYPICAL 512 6.50 ===
1024 FIXED_LENGTH TYPICAL 1024 6.51 ===
1024 CHUNKED MINIMAL 0 6.12 ==
1024 CHUNKED MINIMAL 16 5.51 =
1024 CHUNKED MINIMAL 128 5.55 =
1024 CHUNKED MINIMAL 512 5.60 ==
1024 CHUNKED MINIMAL 1024 5.50 =
1024 CHUNKED TYPICAL 0 15.00 ===========
1024 CHUNKED TYPICAL 16 7.56 =====
1024 CHUNKED TYPICAL 128 6.86 ====
1024 CHUNKED TYPICAL 512 6.73 ===
1024 CHUNKED TYPICAL 1024 6.60 ===
1048576 FIXED_LENGTH MINIMAL 0 25.27 =================
1048576 FIXED_LENGTH MINIMAL 16 25.36 =================
1048576 FIXED_LENGTH MINIMAL 128 25.86 =================
1048576 FIXED_LENGTH MINIMAL 512 25.25 =================
1048576 FIXED_LENGTH MINIMAL 1024 32.51 ===================
1048576 FIXED_LENGTH TYPICAL 0 36.65 =====================
1048576 FIXED_LENGTH TYPICAL 16 27.43 ==================
1048576 FIXED_LENGTH TYPICAL 128 26.88 =================
1048576 FIXED_LENGTH TYPICAL 512 26.94 =================
1048576 FIXED_LENGTH TYPICAL 1024 33.13 ====================
1048576 CHUNKED MINIMAL 0 77.02 ============================
1048576 CHUNKED MINIMAL 16 51.32 ========================
1048576 CHUNKED MINIMAL 128 50.98 ========================
1048576 CHUNKED MINIMAL 512 51.82 ========================
1048576 CHUNKED MINIMAL 1024 50.40 ========================
1048576 CHUNKED TYPICAL 0 88.99 ==============================
1048576 CHUNKED TYPICAL 16 53.94 ========================
1048576 CHUNKED TYPICAL 128 53.03 ========================
1048576 CHUNKED TYPICAL 512 52.14 ========================
1048576 CHUNKED TYPICAL 1024 50.90 ========================

Benchmark source code is here:
http://code.google.com/p/dalvik/source/browse/trunk/benchmarks/regression/URLConnectionBenchmark.java

Change-Id: Ie3e754ab8497e6200f8b6e7f9c63c40a7d4784e2
pache/harmony/luni/internal/net/www/protocol/http/HttpConfiguration.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnectionPool.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
7329fa972d9c20777444e5e1b13169d700de6567 29-Jun-2010 Brian Carlstrom <bdc@google.com> Fixes to support new dalvik.googlecode.com benchmarks

The following new benchmarks where tested with the below changes:
- DigestBenchmark
- MessageDigestBenchmark
- SSLSocketBenchmark
- SignatureBenchmark

Fix package name of OpenSSLProvider

luni/src/main/java/java/security/security.properties

Restore Java (vs OpenSSL) SSLSocket wrappers on SSLEngine for benchmarking

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLServerSocketFactoryImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLServerSocketImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSocketFactoryImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSocketImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSocketInputStream.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSocketOutputStream.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSocketWrapper.java

Restore HandshakeProtocol.socketOwner code for SSLSocket to function

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/HandshakeProtocol.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java

Remove unneeded OpenSSLMessageDigestJDK.getInstance since these are
registered via OpenSSLProvider and SHA224 which is not part of the RI.
We had already removed the BouncyCastle version of this.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLMessageDigestJDK.java
luni/src/test/java/tests/targets/security/AllTests.java
luni/src/test/java/tests/targets/security/MessageDigestTestSHA224.java
luni/src/test/java/tests/targets/security/SignatureTestSHA224withRSA.java

Change-Id: I7daae7f0d9f50acad6df9157eac1b0133af83062
pache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
pache/harmony/xnet/provider/jsse/HandshakeProtocol.java
pache/harmony/xnet/provider/jsse/OpenSSLMessageDigestJDK.java
pache/harmony/xnet/provider/jsse/SSLServerSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/SSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLSocketInputStream.java
pache/harmony/xnet/provider/jsse/SSLSocketOutputStream.java
pache/harmony/xnet/provider/jsse/SSLSocketWrapper.java
pache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
deb236fb06f2a14861e7d40dea959f181cd5cf28 29-Jun-2010 Jesse Wilson <jessewilson@google.com> Eagerly read the chunked header when doing so (probably) won't block.

Some streams stop reading early, which was causing data corruption
(already fix) and preventing stream reuse (fixed in this change).

Change-Id: I7456306a6242a3269648a4309c49735a7fee29c9
http://code.google.com/p/android/issues/detail?id=7059
pache/harmony/luni/internal/net/www/protocol/http/ChunkedInputStream.java
6906b0c12dcf3216883d0373973a252812a20d32 29-Jun-2010 Jesse Wilson <jessewilson@google.com> Fixing chunked encoding to throw proper exceptions on malformed input.

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

This moves ChunkedInputStream and three others to be top-level
classes. These classes stand-alone; and moving them removes
visibility of much inner state in AbstractHttpInputStream.

Change-Id: I7ffc5b0e020b4f5218aa64c5320be2bec8941f7e
pache/harmony/luni/internal/net/www/protocol/http/AbstractHttpInputStream.java
pache/harmony/luni/internal/net/www/protocol/http/ChunkedInputStream.java
pache/harmony/luni/internal/net/www/protocol/http/FixedLengthInputStream.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/http/UnknownLengthHttpInputStream.java
51e468abf2628ce964d3657042f3ac8f2c947504 26-Jun-2010 Jesse Wilson <jessewilson@google.com> Fixing response cache and connection reuse for HTTP client.

The code splits our HTTP input streams into four (!) inner
classes. The base class takes care of ensuring split() and
single byte reads get cached and call disconnect() as necessary.
Our code closes the cache when the stream is exhausted; this
is different from the RI which closes it when in.close() is
called.

When a fixed length input stream of length 0 is received,
we cache it immediately. This has behavior consequences for
CONNECT, which needs the otherwise-recyclable connection to
stick around.

This adds explicit shutdown capabilities to MockWebServer.
This is necessary now that we don't guarantee all enqueued
responses will be requested.

We still need test coverage for malformed chunk sizes.

Change-Id: Iaf866af4fc1d76faea559df267a4bde6fdfa1d83
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
12cd1f00c2fa1a7f37bf644cecdf7588bdc0b0a9 23-Jun-2010 Brian Carlstrom <bdc@google.com> Remove libcore's dependency on bouncycastle

external/bouncycastle
- Change to be the primary build for bouncycastle sources (as opposed to part of libcore)
- Moved OpenSSLMessageDigest from libcore to OpenSSLDigest
It uses NativeCrypto API from core, but implements a bouncycastle specific interface
- restored registration of bouncycastle MessageDigests for SHA-1, SHA-256, MD5
OpenSSLProvider versions take precedence, but explicit provider of "BC" allows choice
- enabled native versions of SHA-384 and SHA-512
- pruned MD4 implementation

frameworks/base
- frameworks and CoreTests modules now depend on bouncycastle
- update preloades classes for NativeBN package change
- moved CryptoTest to libcore

libcore
- core now builds without bouncycastle sources
- core-tests, core-tests-support, core-tests-supportlib now depend on bouncycastle
- removed libcore/openssl directory, moving NativeBN to java/math
- minor cleanup of Provider, Security, Services style while working on ProviderTest
- added new OpenSSLProvider registered as first provider to have
priority over the others to ensure our native implementations are used
- moved BouncyCastle to have priority as a provider over Harmony
- JarVerifier and JarUtils now implicitly use OpenSSLMessageDigest
- Cleanedup OpenSSLSignature, implementation needs to be finished to move to OpenSSLProvider
- To avoid using PEMWriter from BouncyCastle, NativeCrypto now takes binary encoded certs and keys
This is more efficient as well avoiding the base64 decode/encode of the binary data
- removed SHA-224 to match the RI

packages/apps/CertInstaller
- CertificateInstaller module now depends on bouncycastle
this is the only app to depend on bouncycastle

system/core
- updated BOOTCLASSPATH

Change-Id: I6205366b12baec4331b4a76e2c85d8324bf64b2c
pache/harmony/security/fortress/SecurityAccess.java
pache/harmony/security/fortress/Services.java
pache/harmony/security/provider/cert/X509CertImpl.java
pache/harmony/security/utils/JarUtils.java
pache/harmony/xnet/provider/jsse/AbstractSessionContext.java
pache/harmony/xnet/provider/jsse/JSSEProvider.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLMessageDigest.java
pache/harmony/xnet/provider/jsse/OpenSSLProvider.java
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
5dd6c39e4ce96fc0050988b7e487c237aacc765d 23-Jun-2010 Elliott Hughes <enh@google.com> Merge "Stop using GetStringChars/ReleaseStringChars." into dalvik-dev
4e3714f7fe8ac7f6b20896038e491d378f4e6464 22-Jun-2010 Elliott Hughes <enh@google.com> Stop using GetStringChars/ReleaseStringChars.

Also fix unused variable warnings in "ExpatParser.cpp".

This fixes one actual bug in the regular expression code where we weren't
returning after throwing an exception from JNI, in a case where executing
the remaining code in the native method would cause a crash.

Change-Id: Ib5ce7ea9a3b6476cf47bda2384d5ba43579c785a
pache/harmony/xml/ExpatParser.java
afa010c8a6456c1b8375cd3e0587deb43ff4a963 22-Jun-2010 Brian Carlstrom <bdc@google.com> Merge "Move IndexedPKIXParameters from external/bouncycastle to libcore to avoid cyclic build dependency" into dalvik-dev
b1b8fbeeae579e9f49c41166bb5d9b2e60b75438 22-Jun-2010 Elliott Hughes <enh@google.com> Switch Base64 over to Charset.

Using Charset is faster and removes the need to handle impossible run-time
errors.

Change-Id: I0d0531b5f2c296725aa97ce4258264c694f640a5
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/util/Base64.java
06fb2e026572e4f67ac80c927d30e9be787bbe6e 22-Jun-2010 Brian Carlstrom <bdc@google.com> Move IndexedPKIXParameters from external/bouncycastle to libcore to avoid cyclic build dependency

Change-Id: I65292321560c9f4551dc79fc7c6795f093638bbf
pache/harmony/xnet/provider/jsse/IndexedPKIXParameters.java
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
e32b21f14d52bac429a9c54fe031f9e92c911d64 18-Jun-2010 Jesse Wilson <jessewilson@google.com> Implementing ZoneInfo.hasSameRules().

Moving TimeZoneTest to OldTimeZoneTest and removing test methods
that are duplicated between libcore and Harmony.

Also adding Objects.equals() to make implementing this easy,
and removing redundant time zone tests. I did a few searches
to find candidate code that could take advantage of this new
utility method and adopted it there.

Change-Id: I133298f1b36d755bd35c1ad0dc0ab366fd164270
pache/harmony/luni/internal/util/ZoneInfo.java
pache/harmony/security/asn1/DerOutputStream.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/SSLSessionImpl.java
a2952462d8f654b2e0ccfac4a1f2d54aa0259516 18-Jun-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing various problems with HTTPS proxies thru HTTP." into dalvik-dev
bdfbd4b92a0d86934025dab31b2b2367782f83f3 18-Jun-2010 Elliott Hughes <enh@google.com> Merge "Minor bidi tidying." into dalvik-dev
f10b2437ae5ec073f8c4118f7235022ba83667c4 18-Jun-2010 Elliott Hughes <enh@google.com> Minor bidi tidying.

Fix the bidi code to consistently use finally blocks to ensure we can't
leak native UBidi objects. Rename BidiWrapper to NativeBidi since it isn't
a class with a finalizer that wraps a UBidi: it's just a namespace for static
native methods.

Also remove the useless public constructor from NativeCollation.

Bug: 2772065
Change-Id: I441ff4811bb66c37daf270d74d5403b9848cce90
pache/harmony/text/BidiWrapper.java
pache/harmony/text/NativeBidi.java
d3ae3dbba52b9eec408be9b2e74a9f93388d4202 17-Jun-2010 Brian Carlstrom <bdc@google.com> libcore/luni/src/main/java/org/bouncycastle moved to external/bouncycastle/src/main/java/org/bouncycastle

Change-Id: Ic8d81f1c057458e9fdf9b648c9d976a552b785b8
ouncycastle/asn1/ASN1Choice.java
ouncycastle/asn1/ASN1Collection.java
ouncycastle/asn1/ASN1Encodable.java
ouncycastle/asn1/ASN1EncodableVector.java
ouncycastle/asn1/ASN1InputStream.java
ouncycastle/asn1/ASN1Null.java
ouncycastle/asn1/ASN1OctetString.java
ouncycastle/asn1/ASN1OutputStream.java
ouncycastle/asn1/ASN1Sequence.java
ouncycastle/asn1/ASN1Set.java
ouncycastle/asn1/ASN1TaggedObject.java
ouncycastle/asn1/BERConstructedOctetString.java
ouncycastle/asn1/BERConstructedSequence.java
ouncycastle/asn1/BERInputStream.java
ouncycastle/asn1/BERNull.java
ouncycastle/asn1/BEROutputStream.java
ouncycastle/asn1/BERSequence.java
ouncycastle/asn1/BERSet.java
ouncycastle/asn1/BERTaggedObject.java
ouncycastle/asn1/DERApplicationSpecific.java
ouncycastle/asn1/DERBMPString.java
ouncycastle/asn1/DERBitString.java
ouncycastle/asn1/DERBoolean.java
ouncycastle/asn1/DERConstructedSequence.java
ouncycastle/asn1/DERConstructedSet.java
ouncycastle/asn1/DEREncodable.java
ouncycastle/asn1/DEREncodableVector.java
ouncycastle/asn1/DEREnumerated.java
ouncycastle/asn1/DERGeneralString.java
ouncycastle/asn1/DERGeneralizedTime.java
ouncycastle/asn1/DERIA5String.java
ouncycastle/asn1/DERInputStream.java
ouncycastle/asn1/DERInteger.java
ouncycastle/asn1/DERNull.java
ouncycastle/asn1/DERNumericString.java
ouncycastle/asn1/DERObject.java
ouncycastle/asn1/DERObjectIdentifier.java
ouncycastle/asn1/DEROctetString.java
ouncycastle/asn1/DEROutputStream.java
ouncycastle/asn1/DERPrintableString.java
ouncycastle/asn1/DERSequence.java
ouncycastle/asn1/DERSet.java
ouncycastle/asn1/DERString.java
ouncycastle/asn1/DERT61String.java
ouncycastle/asn1/DERTaggedObject.java
ouncycastle/asn1/DERTags.java
ouncycastle/asn1/DERUTCTime.java
ouncycastle/asn1/DERUTF8String.java
ouncycastle/asn1/DERUniversalString.java
ouncycastle/asn1/DERUnknownTag.java
ouncycastle/asn1/DERVisibleString.java
ouncycastle/asn1/OIDTokenizer.java
ouncycastle/asn1/OrderedTable.java
ouncycastle/asn1/cmp/PKIFailureInfo.java
ouncycastle/asn1/cmp/PKIFreeText.java
ouncycastle/asn1/cmp/PKIStatus.java
ouncycastle/asn1/cmp/PKIStatusInfo.java
ouncycastle/asn1/cms/Attribute.java
ouncycastle/asn1/cms/AttributeTable.java
ouncycastle/asn1/cms/CMSAttributes.java
ouncycastle/asn1/cms/CMSObjectIdentifiers.java
ouncycastle/asn1/cms/CompressedData.java
ouncycastle/asn1/cms/ContentInfo.java
ouncycastle/asn1/cms/EncryptedContentInfo.java
ouncycastle/asn1/cms/EnvelopedData.java
ouncycastle/asn1/cms/IssuerAndSerialNumber.java
ouncycastle/asn1/cms/KEKIdentifier.java
ouncycastle/asn1/cms/KEKRecipientInfo.java
ouncycastle/asn1/cms/KeyAgreeRecipientInfo.java
ouncycastle/asn1/cms/KeyTransRecipientInfo.java
ouncycastle/asn1/cms/OriginatorIdentifierOrKey.java
ouncycastle/asn1/cms/OriginatorInfo.java
ouncycastle/asn1/cms/OriginatorPublicKey.java
ouncycastle/asn1/cms/OtherKeyAttribute.java
ouncycastle/asn1/cms/OtherRecipientInfo.java
ouncycastle/asn1/cms/PasswordRecipientInfo.java
ouncycastle/asn1/cms/RecipientIdentifier.java
ouncycastle/asn1/cms/RecipientInfo.java
ouncycastle/asn1/cms/RecipientKeyIdentifier.java
ouncycastle/asn1/cms/SignedData.java
ouncycastle/asn1/cms/SignerIdentifier.java
ouncycastle/asn1/cms/SignerInfo.java
ouncycastle/asn1/cms/Time.java
ouncycastle/asn1/cryptopro/CryptoProObjectIdentifiers.java
ouncycastle/asn1/esf/CommitmentTypeIdentifier.java
ouncycastle/asn1/esf/CommitmentTypeIndication.java
ouncycastle/asn1/esf/CommitmentTypeQualifier.java
ouncycastle/asn1/esf/ESFAttributes.java
ouncycastle/asn1/esf/SignerLocation.java
ouncycastle/asn1/ess/ContentIdentifier.java
ouncycastle/asn1/ess/ESSCertID.java
ouncycastle/asn1/ess/OtherCertID.java
ouncycastle/asn1/ess/OtherSigningCertificate.java
ouncycastle/asn1/ess/SigningCertificate.java
ouncycastle/asn1/gnu/GNUObjectIdentifiers.java
ouncycastle/asn1/iana/IANAObjectIdentifiers.java
ouncycastle/asn1/icao/DataGroupHash.java
ouncycastle/asn1/icao/ICAOObjectIdentifiers.java
ouncycastle/asn1/icao/LDSSecurityObject.java
ouncycastle/asn1/misc/IDEACBCPar.java
ouncycastle/asn1/misc/MiscObjectIdentifiers.java
ouncycastle/asn1/misc/NetscapeCertType.java
ouncycastle/asn1/misc/NetscapeRevocationURL.java
ouncycastle/asn1/misc/VerisignCzagExtension.java
ouncycastle/asn1/mozilla/PublicKeyAndChallenge.java
ouncycastle/asn1/nist/NISTObjectIdentifiers.java
ouncycastle/asn1/ocsp/BasicOCSPResponse.java
ouncycastle/asn1/ocsp/CertID.java
ouncycastle/asn1/ocsp/CertStatus.java
ouncycastle/asn1/ocsp/CrlID.java
ouncycastle/asn1/ocsp/OCSPObjectIdentifiers.java
ouncycastle/asn1/ocsp/OCSPRequest.java
ouncycastle/asn1/ocsp/OCSPResponse.java
ouncycastle/asn1/ocsp/OCSPResponseStatus.java
ouncycastle/asn1/ocsp/Request.java
ouncycastle/asn1/ocsp/ResponderID.java
ouncycastle/asn1/ocsp/ResponseBytes.java
ouncycastle/asn1/ocsp/ResponseData.java
ouncycastle/asn1/ocsp/RevokedInfo.java
ouncycastle/asn1/ocsp/ServiceLocator.java
ouncycastle/asn1/ocsp/Signature.java
ouncycastle/asn1/ocsp/SingleResponse.java
ouncycastle/asn1/ocsp/TBSRequest.java
ouncycastle/asn1/oiw/OIWObjectIdentifiers.java
ouncycastle/asn1/pkcs/Attribute.java
ouncycastle/asn1/pkcs/AuthenticatedSafe.java
ouncycastle/asn1/pkcs/CertBag.java
ouncycastle/asn1/pkcs/CertificationRequest.java
ouncycastle/asn1/pkcs/CertificationRequestInfo.java
ouncycastle/asn1/pkcs/ContentInfo.java
ouncycastle/asn1/pkcs/DHParameter.java
ouncycastle/asn1/pkcs/EncryptedData.java
ouncycastle/asn1/pkcs/EncryptedPrivateKeyInfo.java
ouncycastle/asn1/pkcs/EncryptionScheme.java
ouncycastle/asn1/pkcs/IssuerAndSerialNumber.java
ouncycastle/asn1/pkcs/KeyDerivationFunc.java
ouncycastle/asn1/pkcs/MacData.java
ouncycastle/asn1/pkcs/PBES2Algorithms.java
ouncycastle/asn1/pkcs/PBES2Parameters.java
ouncycastle/asn1/pkcs/PBKDF2Params.java
ouncycastle/asn1/pkcs/PKCS12PBEParams.java
ouncycastle/asn1/pkcs/PKCSObjectIdentifiers.java
ouncycastle/asn1/pkcs/Pfx.java
ouncycastle/asn1/pkcs/PrivateKeyInfo.java
ouncycastle/asn1/pkcs/RC2CBCParameter.java
ouncycastle/asn1/pkcs/RSAESOAEPparams.java
ouncycastle/asn1/pkcs/RSAPrivateKeyStructure.java
ouncycastle/asn1/pkcs/RSASSAPSSparams.java
ouncycastle/asn1/pkcs/SafeBag.java
ouncycastle/asn1/pkcs/SignedData.java
ouncycastle/asn1/pkcs/SignerInfo.java
ouncycastle/asn1/teletrust/TeleTrusTObjectIdentifiers.java
ouncycastle/asn1/tsp/Accuracy.java
ouncycastle/asn1/tsp/MessageImprint.java
ouncycastle/asn1/tsp/TSTInfo.java
ouncycastle/asn1/tsp/TimeStampReq.java
ouncycastle/asn1/tsp/TimeStampResp.java
ouncycastle/asn1/util/ASN1Dump.java
ouncycastle/asn1/util/DERDump.java
ouncycastle/asn1/util/Dump.java
ouncycastle/asn1/x509/AccessDescription.java
ouncycastle/asn1/x509/AlgorithmIdentifier.java
ouncycastle/asn1/x509/AttCertIssuer.java
ouncycastle/asn1/x509/AttCertValidityPeriod.java
ouncycastle/asn1/x509/Attribute.java
ouncycastle/asn1/x509/AttributeCertificate.java
ouncycastle/asn1/x509/AttributeCertificateInfo.java
ouncycastle/asn1/x509/AuthorityInformationAccess.java
ouncycastle/asn1/x509/AuthorityKeyIdentifier.java
ouncycastle/asn1/x509/BasicConstraints.java
ouncycastle/asn1/x509/CRLDistPoint.java
ouncycastle/asn1/x509/CRLNumber.java
ouncycastle/asn1/x509/CRLReason.java
ouncycastle/asn1/x509/CertPolicyId.java
ouncycastle/asn1/x509/CertificateList.java
ouncycastle/asn1/x509/CertificatePolicies.java
ouncycastle/asn1/x509/DSAParameter.java
ouncycastle/asn1/x509/DigestInfo.java
ouncycastle/asn1/x509/DisplayText.java
ouncycastle/asn1/x509/DistributionPoint.java
ouncycastle/asn1/x509/DistributionPointName.java
ouncycastle/asn1/x509/ExtendedKeyUsage.java
ouncycastle/asn1/x509/GeneralName.java
ouncycastle/asn1/x509/GeneralNames.java
ouncycastle/asn1/x509/GeneralSubtree.java
ouncycastle/asn1/x509/Holder.java
ouncycastle/asn1/x509/IetfAttrSyntax.java
ouncycastle/asn1/x509/IssuerSerial.java
ouncycastle/asn1/x509/IssuingDistributionPoint.java
ouncycastle/asn1/x509/KeyPurposeId.java
ouncycastle/asn1/x509/KeyUsage.java
ouncycastle/asn1/x509/NameConstraints.java
ouncycastle/asn1/x509/NoticeReference.java
ouncycastle/asn1/x509/ObjectDigestInfo.java
ouncycastle/asn1/x509/PolicyInformation.java
ouncycastle/asn1/x509/PolicyMappings.java
ouncycastle/asn1/x509/PolicyQualifierId.java
ouncycastle/asn1/x509/PolicyQualifierInfo.java
ouncycastle/asn1/x509/RSAPublicKeyStructure.java
ouncycastle/asn1/x509/ReasonFlags.java
ouncycastle/asn1/x509/RoleSyntax.java
ouncycastle/asn1/x509/SubjectDirectoryAttributes.java
ouncycastle/asn1/x509/SubjectKeyIdentifier.java
ouncycastle/asn1/x509/SubjectPublicKeyInfo.java
ouncycastle/asn1/x509/TBSCertList.java
ouncycastle/asn1/x509/TBSCertificateStructure.java
ouncycastle/asn1/x509/Time.java
ouncycastle/asn1/x509/UserNotice.java
ouncycastle/asn1/x509/V1TBSCertificateGenerator.java
ouncycastle/asn1/x509/V2AttributeCertificateInfoGenerator.java
ouncycastle/asn1/x509/V2Form.java
ouncycastle/asn1/x509/V2TBSCertListGenerator.java
ouncycastle/asn1/x509/V3TBSCertificateGenerator.java
ouncycastle/asn1/x509/X509Attributes.java
ouncycastle/asn1/x509/X509CertificateStructure.java
ouncycastle/asn1/x509/X509DefaultEntryConverter.java
ouncycastle/asn1/x509/X509Extension.java
ouncycastle/asn1/x509/X509Extensions.java
ouncycastle/asn1/x509/X509Name.java
ouncycastle/asn1/x509/X509NameElementList.java
ouncycastle/asn1/x509/X509NameEntryConverter.java
ouncycastle/asn1/x509/X509NameTokenizer.java
ouncycastle/asn1/x509/X509ObjectIdentifiers.java
ouncycastle/asn1/x509/qualified/BiometricData.java
ouncycastle/asn1/x509/qualified/ETSIQCObjectIdentifiers.java
ouncycastle/asn1/x509/qualified/Iso4217CurrencyCode.java
ouncycastle/asn1/x509/qualified/MonetaryValue.java
ouncycastle/asn1/x509/qualified/QCStatement.java
ouncycastle/asn1/x509/qualified/RFC3739QCObjectIdentifiers.java
ouncycastle/asn1/x509/qualified/SemanticsInformation.java
ouncycastle/asn1/x509/qualified/TypeOfBiometricData.java
ouncycastle/asn1/x509/sigi/SigIObjectIdentifiers.java
ouncycastle/asn1/x9/X9ObjectIdentifiers.java
ouncycastle/crypto/AsymmetricBlockCipher.java
ouncycastle/crypto/AsymmetricCipherKeyPair.java
ouncycastle/crypto/AsymmetricCipherKeyPairGenerator.java
ouncycastle/crypto/BasicAgreement.java
ouncycastle/crypto/BlockCipher.java
ouncycastle/crypto/BufferedAsymmetricBlockCipher.java
ouncycastle/crypto/BufferedBlockCipher.java
ouncycastle/crypto/CipherKeyGenerator.java
ouncycastle/crypto/CipherParameters.java
ouncycastle/crypto/CryptoException.java
ouncycastle/crypto/DSA.java
ouncycastle/crypto/DataLengthException.java
ouncycastle/crypto/DerivationFunction.java
ouncycastle/crypto/DerivationParameters.java
ouncycastle/crypto/Digest.java
ouncycastle/crypto/ExtendedDigest.java
ouncycastle/crypto/InvalidCipherTextException.java
ouncycastle/crypto/KeyGenerationParameters.java
ouncycastle/crypto/Mac.java
ouncycastle/crypto/PBEParametersGenerator.java
ouncycastle/crypto/RuntimeCryptoException.java
ouncycastle/crypto/Signer.java
ouncycastle/crypto/SignerWithRecovery.java
ouncycastle/crypto/StreamBlockCipher.java
ouncycastle/crypto/StreamCipher.java
ouncycastle/crypto/Wrapper.java
ouncycastle/crypto/agreement/DHAgreement.java
ouncycastle/crypto/agreement/DHBasicAgreement.java
ouncycastle/crypto/digests/GeneralDigest.java
ouncycastle/crypto/digests/LongDigest.java
ouncycastle/crypto/digests/MD4Digest.java
ouncycastle/crypto/digests/MD5Digest.java
ouncycastle/crypto/digests/SHA1Digest.java
ouncycastle/crypto/digests/SHA224Digest.java
ouncycastle/crypto/digests/SHA256Digest.java
ouncycastle/crypto/digests/SHA384Digest.java
ouncycastle/crypto/digests/SHA512Digest.java
ouncycastle/crypto/digests/ShortenedDigest.java
ouncycastle/crypto/encodings/ISO9796d1Encoding.java
ouncycastle/crypto/encodings/OAEPEncoding.java
ouncycastle/crypto/encodings/PKCS1Encoding.java
ouncycastle/crypto/engines/AESEngine.java
ouncycastle/crypto/engines/AESFastEngine.java
ouncycastle/crypto/engines/AESLightEngine.java
ouncycastle/crypto/engines/AESWrapEngine.java
ouncycastle/crypto/engines/DESEngine.java
ouncycastle/crypto/engines/DESedeEngine.java
ouncycastle/crypto/engines/DESedeWrapEngine.java
ouncycastle/crypto/engines/IESEngine.java
ouncycastle/crypto/engines/NullEngine.java
ouncycastle/crypto/engines/RC2Engine.java
ouncycastle/crypto/engines/RSAEngine.java
ouncycastle/crypto/generators/BaseKDFBytesGenerator.java
ouncycastle/crypto/generators/DESKeyGenerator.java
ouncycastle/crypto/generators/DESedeKeyGenerator.java
ouncycastle/crypto/generators/DHBasicKeyPairGenerator.java
ouncycastle/crypto/generators/DHKeyGeneratorHelper.java
ouncycastle/crypto/generators/DHKeyPairGenerator.java
ouncycastle/crypto/generators/DHParametersGenerator.java
ouncycastle/crypto/generators/DSAKeyPairGenerator.java
ouncycastle/crypto/generators/DSAParametersGenerator.java
ouncycastle/crypto/generators/KDF1BytesGenerator.java
ouncycastle/crypto/generators/KDF2BytesGenerator.java
ouncycastle/crypto/generators/MGF1BytesGenerator.java
ouncycastle/crypto/generators/OpenSSLPBEParametersGenerator.java
ouncycastle/crypto/generators/PKCS12ParametersGenerator.java
ouncycastle/crypto/generators/PKCS5S1ParametersGenerator.java
ouncycastle/crypto/generators/PKCS5S2ParametersGenerator.java
ouncycastle/crypto/generators/RSAKeyPairGenerator.java
ouncycastle/crypto/io/DigestInputStream.java
ouncycastle/crypto/io/DigestOutputStream.java
ouncycastle/crypto/io/MacInputStream.java
ouncycastle/crypto/io/MacOutputStream.java
ouncycastle/crypto/macs/BlockCipherMac.java
ouncycastle/crypto/macs/CBCBlockCipherMac.java
ouncycastle/crypto/macs/CFBBlockCipherMac.java
ouncycastle/crypto/macs/HMac.java
ouncycastle/crypto/macs/ISO9797Alg3Mac.java
ouncycastle/crypto/macs/OldHMac.java
ouncycastle/crypto/modes/CBCBlockCipher.java
ouncycastle/crypto/modes/CCMBlockCipher.java
ouncycastle/crypto/modes/CFBBlockCipher.java
ouncycastle/crypto/modes/CTSBlockCipher.java
ouncycastle/crypto/modes/GOFBBlockCipher.java
ouncycastle/crypto/modes/OFBBlockCipher.java
ouncycastle/crypto/modes/PaddedBlockCipher.java
ouncycastle/crypto/modes/SICBlockCipher.java
ouncycastle/crypto/paddings/BlockCipherPadding.java
ouncycastle/crypto/paddings/ISO10126d2Padding.java
ouncycastle/crypto/paddings/ISO7816d4Padding.java
ouncycastle/crypto/paddings/PKCS7Padding.java
ouncycastle/crypto/paddings/PaddedBufferedBlockCipher.java
ouncycastle/crypto/paddings/TBCPadding.java
ouncycastle/crypto/paddings/X923Padding.java
ouncycastle/crypto/paddings/ZeroBytePadding.java
ouncycastle/crypto/params/AsymmetricKeyParameter.java
ouncycastle/crypto/params/CCMParameters.java
ouncycastle/crypto/params/DESParameters.java
ouncycastle/crypto/params/DESedeParameters.java
ouncycastle/crypto/params/DHKeyGenerationParameters.java
ouncycastle/crypto/params/DHKeyParameters.java
ouncycastle/crypto/params/DHParameters.java
ouncycastle/crypto/params/DHPrivateKeyParameters.java
ouncycastle/crypto/params/DHPublicKeyParameters.java
ouncycastle/crypto/params/DHValidationParameters.java
ouncycastle/crypto/params/DSAKeyGenerationParameters.java
ouncycastle/crypto/params/DSAKeyParameters.java
ouncycastle/crypto/params/DSAParameters.java
ouncycastle/crypto/params/DSAPrivateKeyParameters.java
ouncycastle/crypto/params/DSAPublicKeyParameters.java
ouncycastle/crypto/params/DSAValidationParameters.java
ouncycastle/crypto/params/IESParameters.java
ouncycastle/crypto/params/IESWithCipherParameters.java
ouncycastle/crypto/params/ISO18033KDFParameters.java
ouncycastle/crypto/params/KDFParameters.java
ouncycastle/crypto/params/KeyParameter.java
ouncycastle/crypto/params/MGFParameters.java
ouncycastle/crypto/params/ParametersWithIV.java
ouncycastle/crypto/params/ParametersWithRandom.java
ouncycastle/crypto/params/ParametersWithSBox.java
ouncycastle/crypto/params/ParametersWithSalt.java
ouncycastle/crypto/params/RC2Parameters.java
ouncycastle/crypto/params/RC5Parameters.java
ouncycastle/crypto/params/RSAKeyGenerationParameters.java
ouncycastle/crypto/params/RSAKeyParameters.java
ouncycastle/crypto/params/RSAPrivateCrtKeyParameters.java
ouncycastle/crypto/signers/DSASigner.java
ouncycastle/crypto/signers/ISO9796d2PSSSigner.java
ouncycastle/crypto/signers/ISO9796d2Signer.java
ouncycastle/crypto/signers/PSSSigner.java
ouncycastle/crypto/util/PrivateKeyFactory.java
ouncycastle/crypto/util/PublicKeyFactory.java
ouncycastle/i18n/ErrorBundle.java
ouncycastle/i18n/LocalizedException.java
ouncycastle/i18n/LocalizedMessage.java
ouncycastle/i18n/MessageBundle.java
ouncycastle/i18n/MissingEntryException.java
ouncycastle/i18n/TextBundle.java
ouncycastle/i18n/filter/Filter.java
ouncycastle/i18n/filter/HTMLFilter.java
ouncycastle/i18n/filter/SQLFilter.java
ouncycastle/i18n/filter/UntrustedInput.java
ouncycastle/jce/PKCS10CertificationRequest.java
ouncycastle/jce/PKCS7SignedData.java
ouncycastle/jce/PrincipalUtil.java
ouncycastle/jce/X509KeyUsage.java
ouncycastle/jce/X509Principal.java
ouncycastle/jce/X509V1CertificateGenerator.java
ouncycastle/jce/X509V2CRLGenerator.java
ouncycastle/jce/X509V3CertificateGenerator.java
ouncycastle/jce/interfaces/BCKeyStore.java
ouncycastle/jce/interfaces/IESKey.java
ouncycastle/jce/interfaces/PKCS12BagAttributeCarrier.java
ouncycastle/jce/netscape/NetscapeCertRequest.java
ouncycastle/jce/provider/AnnotatedException.java
ouncycastle/jce/provider/BouncyCastleProvider.java
ouncycastle/jce/provider/BrokenJCEBlockCipher.java
ouncycastle/jce/provider/BrokenKDF2BytesGenerator.java
ouncycastle/jce/provider/BrokenPBE.java
ouncycastle/jce/provider/CertPathValidatorUtilities.java
ouncycastle/jce/provider/CertStoreCollectionSpi.java
ouncycastle/jce/provider/DHUtil.java
ouncycastle/jce/provider/DSAUtil.java
ouncycastle/jce/provider/IndexedPKIXParameters.java
ouncycastle/jce/provider/JCEBlockCipher.java
ouncycastle/jce/provider/JCEDHKeyAgreement.java
ouncycastle/jce/provider/JCEDHPrivateKey.java
ouncycastle/jce/provider/JCEDHPublicKey.java
ouncycastle/jce/provider/JCEDigestUtil.java
ouncycastle/jce/provider/JCEIESCipher.java
ouncycastle/jce/provider/JCEKeyGenerator.java
ouncycastle/jce/provider/JCEMac.java
ouncycastle/jce/provider/JCEPBEKey.java
ouncycastle/jce/provider/JCERSACipher.java
ouncycastle/jce/provider/JCERSAPrivateCrtKey.java
ouncycastle/jce/provider/JCERSAPrivateKey.java
ouncycastle/jce/provider/JCERSAPublicKey.java
ouncycastle/jce/provider/JCESecretKeyFactory.java
ouncycastle/jce/provider/JCEStreamCipher.java
ouncycastle/jce/provider/JDKAlgorithmParameterGenerator.java
ouncycastle/jce/provider/JDKAlgorithmParameters.java
ouncycastle/jce/provider/JDKDSAPrivateKey.java
ouncycastle/jce/provider/JDKDSAPublicKey.java
ouncycastle/jce/provider/JDKDSASigner.java
ouncycastle/jce/provider/JDKDigestSignature.java
ouncycastle/jce/provider/JDKECDSAAlgParameters.java
ouncycastle/jce/provider/JDKISOSignature.java
ouncycastle/jce/provider/JDKKeyFactory.java
ouncycastle/jce/provider/JDKKeyPairGenerator.java
ouncycastle/jce/provider/JDKKeyStore.java
ouncycastle/jce/provider/JDKMessageDigest.java
ouncycastle/jce/provider/JDKPKCS12KeyStore.java
ouncycastle/jce/provider/JDKPSSSigner.java
ouncycastle/jce/provider/JDKX509CertificateFactory.java
ouncycastle/jce/provider/PBE.java
ouncycastle/jce/provider/PKIXCertPath.java
ouncycastle/jce/provider/PKIXCertPathBuilderSpi.java
ouncycastle/jce/provider/PKIXCertPathValidatorSpi.java
ouncycastle/jce/provider/PKIXPolicyNode.java
ouncycastle/jce/provider/RSAUtil.java
ouncycastle/jce/provider/WrapCipherSpi.java
ouncycastle/jce/provider/X509CRLEntryObject.java
ouncycastle/jce/provider/X509CRLObject.java
ouncycastle/jce/provider/X509CertificateObject.java
ouncycastle/jce/provider/X509SignatureUtil.java
ouncycastle/jce/spec/IEKeySpec.java
ouncycastle/jce/spec/IESParameterSpec.java
ouncycastle/openssl/PEMWriter.java
ouncycastle/util/Arrays.java
ouncycastle/util/BigIntegers.java
ouncycastle/util/Strings.java
ouncycastle/util/encoders/Base64.java
ouncycastle/util/encoders/Base64Encoder.java
ouncycastle/util/encoders/BufferedDecoder.java
ouncycastle/util/encoders/BufferedEncoder.java
ouncycastle/util/encoders/Encoder.java
ouncycastle/util/encoders/Hex.java
ouncycastle/util/encoders/HexEncoder.java
ouncycastle/util/encoders/HexTranslator.java
ouncycastle/util/encoders/Translator.java
ouncycastle/util/encoders/UrlBase64.java
ouncycastle/util/encoders/UrlBase64Encoder.java
ouncycastle/x509/AttributeCertificateHolder.java
ouncycastle/x509/AttributeCertificateIssuer.java
ouncycastle/x509/CertPathReviewerException.java
ouncycastle/x509/CertPathReviewerMessages.properties
ouncycastle/x509/PKIXCertPathReviewer.java
ouncycastle/x509/X509Attribute.java
ouncycastle/x509/X509AttributeCertificate.java
ouncycastle/x509/X509Util.java
ouncycastle/x509/X509V1CertificateGenerator.java
ouncycastle/x509/X509V2AttributeCertificate.java
ouncycastle/x509/X509V2AttributeCertificateGenerator.java
ouncycastle/x509/X509V2CRLGenerator.java
ouncycastle/x509/X509V3CertificateGenerator.java
ouncycastle/x509/extension/AuthorityKeyIdentifierStructure.java
ouncycastle/x509/extension/SubjectKeyIdentifierStructure.java
ouncycastle/x509/extension/X509ExtensionUtil.java
c8977f474b30c5f3807398859a6b16687af6fc7b 15-Jun-2010 Jesse Wilson <jessewilson@google.com> Fixing various problems with HTTPS proxies thru HTTP.

- reading extra bytes from the server depending on available()
- not sending the port with the proxy request
- returning a read-til-the-end stream instead of a read-0-bytes-stream
on CONNECT requests
- fixing MockWebServer to omit the unnecessary \r\n after
the response body
- tests no longer mask the issue by unambiguously reading characters.
Trailing newlines aren't discarded!
- New tests when content-length and content disagree. The RI fails
the test when the transfer-encoding is not chunked.

Change-Id: I888569844d323bc770cd5bb95ac71c740dd5e720
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
33df450a61620f4904bac7f787c444dc4fed981d 15-Jun-2010 Brad Fitzpatrick <bradfitz@android.com> am d3ff6bb5: am 2eed1da5: am b5e5b53f: Merge "Add WrappedNetworkSystem to Blockguard for StrictMode work." into gingerbread

Merge commit 'd3ff6bb57d2e86bfac9bb3c958d98bb0d371714c' into dalvik-dev

* commit 'd3ff6bb57d2e86bfac9bb3c958d98bb0d371714c':
Add WrappedNetworkSystem to Blockguard for StrictMode work.
d3ff6bb57d2e86bfac9bb3c958d98bb0d371714c 15-Jun-2010 Brad Fitzpatrick <bradfitz@android.com> am 2eed1da5: am b5e5b53f: Merge "Add WrappedNetworkSystem to Blockguard for StrictMode work." into gingerbread

Merge commit '2eed1da5004c1f014c39f191a863c638a931cb66'

* commit '2eed1da5004c1f014c39f191a863c638a931cb66':
Add WrappedNetworkSystem to Blockguard for StrictMode work.
8bc336a6f9c9f17246041ed337331596dbc974ae 15-Jun-2010 Brad Fitzpatrick <bradfitz@android.com> Add WrappedNetworkSystem to Blockguard for StrictMode work.

Change-Id: Idde4b6f878fad5e8bd90fa929cb434c9a130fbcb
pache/harmony/luni/platform/Platform.java
e810d3b49631329b11440aa5b7a54db181d42ed1 15-Jun-2010 Elliott Hughes <enh@google.com> More charset-related cleanup/optimization.

This patch adds a Charsets class that lets us avoid a hash lookup and an extra
level of method call indirection when calling String.getBytes or "new String"
for a well-known guaranteed charset. It also fixes callers to take advantage.

This also adds a special case to "new String" for the UTF-8 charset to avoid
needless duplication if we guessed the correct buffer size (which we will for
input that happens to be US-ASCII too).

The ModifiedUtf8 class gives a more meaningful name for Utils.convertUTF8WithBuf.

This also removes a dead link and un-tinyurl'ed another.

Change-Id: I02712f53dee16feb3b1db2c14536dc055126cd04
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/util/ZoneInfoDB.java
pache/harmony/luni/net/Socks4Message.java
pache/harmony/luni/util/ThreadLocalCache.java
pache/harmony/luni/util/Util.java
pache/harmony/security/asn1/ASN1GeneralizedTime.java
pache/harmony/security/asn1/ASN1StringType.java
pache/harmony/security/asn1/ASN1UTCTime.java
pache/harmony/security/provider/cert/X509CertFactoryImpl.java
pache/harmony/security/x501/AttributeTypeAndValue.java
pache/harmony/security/x509/GeneralName.java
pache/harmony/xml/ExpatParser.java
79f07cc86be9abc27d0da7df3245ba4bab809ae6 12-Jun-2010 Elliott Hughes <enh@google.com> Improve MessageDigest documentation.

As explained in the bug, I don't think we can/should fix this potential
native crash, but we can and should improve the documentation to explain
how you're _supposed_ to use MessageDigest.

Bug: http://code.google.com/p/android/issues/detail?id=8709
Change-Id: I1cbab5995e5673d5386e21270ac52b6f90b9f421
pache/harmony/security/fortress/Engine.java
pache/harmony/xnet/provider/jsse/OpenSSLMessageDigest.java
pache/harmony/xnet/provider/jsse/OpenSSLMessageDigestJDK.java
c903e6720bbbf6540c29f141bd2fa559813ea20a 08-Jun-2010 Elliott Hughes <enh@google.com> Improve Charset.forName/"new String" performance.

Lookup String's default charset once at class initialization. Stop
creating a new empty char[] every time we create an empty string. Fix
the documentation not to lie about using ISO-8859-1 in all kinds of
places we don't (and where the RI doesn't specify that we should).
Fix the performance of the String(byte[]...String) and String(byte[]...Charset)
constructors to be equivalent rather than wildly different (and not in the way
anyone would reasonably expect). Canonicalize the requested charset's name
so that we can uniformly optimize all aliases of those charsets we
special-case, rather than just those few aliases we used to hard-code.

Tidy up the String.getBytes methods in preparation for optimization (in a later
patch).

Fix the performance of Charset.forName to be amortized constant time regardless
of what name is used, in recognition of the fact that Unicode TR#22 section 1.4
means that there are a potentially infinite number of valid pseudo-aliases for
any charset (at least two of which are relatively common in libcore itself, so
I'd imagine plenty are used in the wild too). Some slight synchronized-related
tidying, and more reuse of public API (because one day I'd like to improve the
locking situation deeper down in this code).

In HistoricalNameUtil.java, remove ugliness.

In File.java, use "new String" rather than junk from Util.

In RandomAccessFile.java, reuse convertUTF8WithBuf instead of the otherwise
unused convertFromUTF8 convenience method.

In Util.java, remove now-dead code and comment some code that looks like it
should be killed but is actually unique and necessary. (I'll probably move
this into an intention-revealing class in my next patch. "Util", FFS! "UTF8",
FFS!)

Also add a couple of tests to StringTest.java to show that my improved String
documentation is true, and that some bogus code that I removed was indeed
bogus.

Change-Id: I746f990172c51c30aa5f5037346644552a224841
pache/harmony/luni/util/HistoricalNamesUtil.java
pache/harmony/luni/util/Util.java
98a7a76fe5c0dd5ff949b38da809368681169205 07-Jun-2010 Jesse Wilson <jessewilson@google.com> Fixing a bug wherin exceptions weren't being reported for generic methods.

Change-Id: Ic695ce127c8b4d59508f888028102fb8410e1600
http://b/issue?id=2742467
pache/harmony/luni/lang/reflect/GenericSignatureParser.java
9a0a73e14110bd84d0933c260c4ce1d773b83787 03-Jun-2010 Brad Fitzpatrick <bradfitz@android.com> resolved conflicts for merge of e916ffd2 from kraken to master

Change-Id: Ie072d918eb0607d8d713ea885cbf0d353f809332
8396b3fb62f50089cbd727250c40d3eecfcbdd71 02-Jun-2010 Brad Fitzpatrick <bradfitz@android.com> Introducing the beginning of "BlockGuard".

From the JavaDoc (even though this is a @hide class):

Mechanism to let threads set restrictions on what code is allowed
to do in their thread.

This is meant for applications to prevent certain blocking
operations from running on their main event loop (or "UI")
threads.

Note that this is all best-effort to catch most accidental
mistakes and isn't intended to be a perfect mechanism, nor provide
any sort of security.

This is just the start. Future CLs will wire this up in the framework
(giving developers some way to enable it, either via a tiny framework
API, or via their AndroidManifest.xml), add network and Binder
support, etc.

Change-Id: I212e1c8b9fa2bb9e495103e0c2fe6a998dc1f8d0
pache/harmony/luni/platform/Platform.java
42c2d693868179248e907ad864f2b8840945e95a 02-Jun-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing file leaks in SelectorImpl." into dalvik-dev
6b739231f8985f33f20672fe727fde0d0f023ead 02-Jun-2010 Jesse Wilson <jessewilson@google.com> Fixing file leaks in SelectorImpl.

There were two core problems:
source.close() and sink.close() weren't being called by SelectorImpl
ServerSocketChannelImpl was opening a stream socket into a file descriptor,
only to have its PlainServerSocketImpl clobber that file descriptor later
when create() was called.

Alongside fixing these problems I've done some style cleanup. None
of which should impact behavior.

Change-Id: I39eead3fbdc0290e83784e8b50861aeef7020513
pache/harmony/luni/net/PlainServerSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/nio/internal/SelectorImpl.java
pache/harmony/nio/internal/ServerSocketChannelImpl.java
753dcd862b31e85766225590d90ba0b9f481176f 02-Jun-2010 Elliott Hughes <enh@google.com> Refactor some of the OSNetworkSystem stuff to more appropriate homes.

Also rewrite PlainDatagramSocketImpl.peek in terms of existing primitives
rather than requiring its own. I still don't see how it can get called, but
at least now it doesn't require its own native code.

Bug: 2686833

Change-Id: I0453add66dab4c7095ee2a3f51a49efbd1205598
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
57cbd53b0c4fd880ce5c3a1e07a80754dba28085 01-Jun-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing HttpURLConnection to work without a CookieHandler." into dalvik-dev
8ee6350602b1cf57f82e07e2c200ef2feb19a239 29-May-2010 Elliott Hughes <enh@google.com> Merge "Remove the last exception message catalog." into dalvik-dev
897538a36c18f4db8f9f68ee566aec0bda842e9f 29-May-2010 Elliott Hughes <enh@google.com> Remove the last exception message catalog.

Bug: 1251121
Change-Id: I45931b9ff908531bda06d6569a4e9618986f821b
pache/harmony/luni/util/Msg.java
pache/harmony/luni/util/MsgHelp.java
pache/harmony/security/DefaultPolicyScanner.java
pache/harmony/security/SystemScope.java
pache/harmony/security/UnresolvedPrincipal.java
pache/harmony/security/asn1/ASN1BitString.java
pache/harmony/security/asn1/ASN1Choice.java
pache/harmony/security/asn1/ASN1Explicit.java
pache/harmony/security/asn1/ASN1Implicit.java
pache/harmony/security/asn1/ASN1Type.java
pache/harmony/security/asn1/ASN1TypeCollection.java
pache/harmony/security/asn1/BerInputStream.java
pache/harmony/security/asn1/BitString.java
pache/harmony/security/asn1/DerInputStream.java
pache/harmony/security/asn1/ObjectIdentifier.java
pache/harmony/security/fortress/DefaultPolicyParser.java
pache/harmony/security/fortress/Engine.java
pache/harmony/security/fortress/PolicyUtils.java
pache/harmony/security/fortress/SecurityUtils.java
pache/harmony/security/internal/nls/Messages.java
pache/harmony/security/internal/nls/messages.properties
pache/harmony/security/pkcs7/SignerInfo.java
pache/harmony/security/provider/cert/DRLCertFactory.java
pache/harmony/security/provider/cert/X509CRLImpl.java
pache/harmony/security/provider/cert/X509CertFactoryImpl.java
pache/harmony/security/provider/cert/X509CertImpl.java
pache/harmony/security/provider/cert/X509CertPathImpl.java
pache/harmony/security/provider/crypto/DSAKeyFactoryImpl.java
pache/harmony/security/provider/crypto/DSAPrivateKeyImpl.java
pache/harmony/security/provider/crypto/DSAPublicKeyImpl.java
pache/harmony/security/provider/crypto/RandomBitsSupplier.java
pache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java
pache/harmony/security/provider/crypto/SHA1_MessageDigestImpl.java
pache/harmony/security/provider/crypto/SHA1withDSA_SignatureImpl.java
pache/harmony/security/utils/JarUtils.java
pache/harmony/security/utils/ObjectIdentifier.java
pache/harmony/security/x501/AttributeTypeAndValue.java
pache/harmony/security/x501/Name.java
pache/harmony/security/x509/CRLDistributionPoints.java
pache/harmony/security/x509/DNParser.java
pache/harmony/security/x509/DistributionPoint.java
pache/harmony/security/x509/GeneralName.java
pache/harmony/security/x509/InfoAccessSyntax.java
pache/harmony/security/x509/NameConstraints.java
pache/harmony/security/x509/tsp/TSTInfo.java
2fbf6b1a7519d3424c356122435efbbfc81de5eb 29-May-2010 Jesse Wilson <jessewilson@google.com> Fixing HttpURLConnection to work without a CookieHandler.

This was a huge regression that thankfully many of our tests pointed out.

Change-Id: I12db314cfe732402889d9cf7f1864789f3711686
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
018b67accb28954d35f3cd697be3428e9b45b7d8 28-May-2010 Jesse Wilson <jessewilson@google.com> Further small fixes to increase API compatibility with RI v6.

Highlights:
code was moved from SSLContextImpl to its superclass.
took X500Principal code from Harmony

Tested with Harmony's tests.api.javax.security.auth.x500.X500PrincipalTest.

Change-Id: I89b46d4b47e692a5461916cca972e05de95f3280
pache/harmony/xnet/provider/jsse/SSLContextImpl.java
04a837d3657716ea4e618194f4e8771554caec46 27-May-2010 Jesse Wilson <jessewilson@google.com> Merge "Fixing many test failures with the new cookie implementation." into dalvik-dev
6e5d43fafa5d4fa75cefa8e552c6c1c60a5d3534 27-May-2010 Jesse Wilson <jessewilson@google.com> Fixing many test failures with the new cookie implementation.

Highlights:
- don't send cookies with nonmatching ports or secure attributes
- default the port when "port" with no value is received
- make CookieStore threadsafe
- make CookieStore retain only host in URIs
- fix concurrent mod bug when removing expired cookies
- support null URIs in the CookieStore (unfortuantely)
- parse more date formats; even ridiculous date formats
- match ".google.com" to "google".
- support single quotes in attribute values
- exploit @hide to add a new API, URI.getEffectivePort()

Alongside this change I've fixed several test problems in dalvik-prebuild's
copy of both the Harmony tests and the jtreg tests. Most of the fixes involve
commenting out bogus assertions.

Change-Id: I71f09110b48d8ca4f3538fd21c8dde7ffdd35a6a
pache/harmony/luni/internal/net/www/protocol/http/HttpConfiguration.java
2be0ae9c8abc05d1c94c8bb170503ee2feae1866 27-May-2010 Brian Carlstrom <bdc@google.com> Add missing package on ambiguous class name and cast on ambiguous type

Change-Id: I470c929f67ecaffa91d5a67c87f1ed5358cfd84c
pache/harmony/xnet/provider/jsse/SSLContextImpl.java
0c131a2ca38465b7d1df4eaee63ac73ce4d5986d 21-May-2010 Brian Carlstrom <bdc@google.com> RI 6 support for javax.net.ssl

Summary:
- RI 6 support for javax.net.ssl
- SSLEngine fixes based on new SSLEngineTest
- fix Cipher.checkMode bug recently introduced in dalvik-dev

Details:

Fix Cipher.checkMode that was preventing most javax.net.ssl tests from working

luni/src/main/java/javax/crypto/Cipher.java

RI 6 has introduced the concept of a "Default" SSLContext. This is
accessed via SSLContext.getDefault() and also
SSLContext.getInstance("Default"). Harmony had its own
DefaultSSLContext but it was not created via an SSLContextSpi. It also
was a single shared instance whereas the new RI6 Default SSLContext
shares internal SSLSessionContext instances between different Default
SSLContexts.

Refactored the old code into an SSLContextImpl subclass that
allows it to be created via SSLContext.getInstance. SSLContextImpl
ensures that we only ever create one set of SSLSessionContext
instances for the Default context.

luni/src/main/java/javax/net/ssl/DefaultSSLContext.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/DefaultSSLContextImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLContextImpl.java

Added SSLContext.getDefault and SSLContext.setDefault

luni/src/main/java/javax/net/ssl/SSLContext.java

Replace dependencies of old DefaultSSLContext with use of SSLContext.getDefault

luni/src/main/java/javax/net/ssl/SSLServerSocketFactory.java
luni/src/main/java/javax/net/ssl/SSLSocketFactory.java

Register "SSLContext.Default" as DefaultSSLContextImpl class for SSLContext.getInstance()

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/JSSEProvider.java

Added constant for new "Default" standard name and added it to
SSL_CONTEXT_PROTOCOLS. New tests based on SSL_CONTEXT_PROTOCOLS
made it clear that neither Android or RI support SSLv2 so removed
it from SSL_CONTEXT_PROTOCOLS and SSL_SOCKET_PROTOCOLS. Added
constant for TLS as well which was previously scattered all over
tests. Remove SSLv2Hello from SSL_SOCKET_PROTOCOLS for Android
since with OpenSSL disablign SSLv2 means you can not use
SSLv2Hello either.

support/src/test/java/javax/net/ssl/StandardNames.java

Added tests for SSLContext.getDefault and
SSLContext.setDefault. Changed existing tests to work on all
protocols including new "Default".

luni/src/test/java/javax/net/ssl/SSLContextTest.java

RI 6 has introduced the notion of SSLParameters which encapsulate SSL
the handshake parameters of desired cipher suites, protocols, and
client authentication requirements.

The main new class SSLParameters is basically just a bag of fields
with accessors and a couple simple constructors. The only things
of note are that it clones all String arrays on input and output
and the setters for the two boolean fields ensure that only one is
true at a time.

luni/src/main/java/javax/net/ssl/SSLParameters.java

Added SSLContext.getDefaultSSLParameters and
SSLContext.getSupportedSSLParameters which simply delegate to the
SSLContextSpi.

luni/src/main/java/javax/net/ssl/SSLContext.java

Added abstract SSLContextSpi.engineGetDefaultSSLParameters and
SSLContext.engineGetSupportedSSLParameters.

luni/src/main/java/javax/net/ssl/SSLContextSpi.java

Added engineGetDefaultSSLParameters and
engineGetSupportedSSLParameters implementation. The RI documents
in SSLContextSpi that these are implemented by default by creating
a socket via the SSLContext's SocketFactory and asking for the
enabled/supported cipher suites and protocols respectively, so
that is what is done. The doc mentions throwing
UnsupportedOperationException if there is a problem, so we do that
as well.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLContextImpl.java

Added {SSLEngine,SSLSocket}.{getSSLParameters,setSSLParameters}
which are analogous.

luni/src/main/java/javax/net/ssl/SSLEngine.java
luni/src/main/java/javax/net/ssl/SSLSocket.java

Added SSLParametersTest

luni/src/test/java/javax/net/ssl/SSLParametersTest.java
luni/src/test/java/javax/net/ssl/AllTests.java

Added SSLContext.get{Default,Supported}SSLParameters tests

luni/src/test/java/javax/net/ssl/SSLContextTest.java

Added SSLSocket.{getSSLParameters,setSSLParameters} tests and added
some extra asserts to test_SSLSocketPair_create based on experience
with test_SSLEnginePair_create.

luni/src/test/java/javax/net/ssl/SSLSocketTest.java

Dummy implementation of new SSLContextSpi for test classes.

support/src/test/java/org/apache/harmony/security/tests/support/MySSLContextSpi.java
support/src/test/java/org/apache/harmony/xnet/tests/support/MySSLContextSpi.java

Other minor RI 6 API changes:

RI 6 removed Serializable from HandshakeCompletedEvent and SSLSessionBindingEvent

luni/src/main/java/javax/net/ssl/HandshakeCompletedEvent.java
luni/src/main/java/javax/net/ssl/SSLSessionBindingEvent.java

RI 6 added generic types to the KeyStoreBuilderParameters List
constructor and accessor as well as to
SSLSessionContext.getIds. Fixed tests to compile with generic types.

luni/src/main/java/javax/net/ssl/KeyStoreBuilderParameters.java
luni/src/main/java/javax/net/ssl/SSLSessionContext.java
luni/src/test/java/tests/api/javax/net/ssl/KeyStoreBuilderParametersTest.java

SSLEngine improvements. Since I was changing SSLEngine, I wrote an
SSLEngineTest based on my SSLSocketTest to do some simply sanity
checking. It expose a number of issues. I've fixed the small ones,
marked the rest as known failures.

Renamed some TLS_ cipher suites to SSL_ to match JSSE standard
names. These were all old suites no longer supported by RI or
OpenSSL which is why they were missed in an earlier cleanup of this
type in this class. Also fixed SSLEngine supported cipher suites
list not to include SSL_NULL_WITH_NULL_NULL which is not a valid
suite to negotiate.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java

SSLEngine instances can have null host values, which caused a
NullPointerException in the ClientSessionContext implementation.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientSessionContext.java

SSLEngine tests were failing because SSLParameters was throwing
NullPointerException instead of IllegalArgument exception on null
element values. Fixed null pointer message style while I was here.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLParameters.java

Fixed SSLEngine instances to default to server mode like RI

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLContextImpl.java

Fixed KEY_TYPES based on SSLEngine implementation. Removed dead
code NativeCrypto.getEnabledProtocols which was recently made
obsolete. Cleaned up null exception messages to follow our convention.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java

Added SSLEngineTest which parallels SSLSocketTest in its
coverage. Similarly added TestSSLEnginePair which loosely parallels
TestSSLSocketPair.

luni/src/test/java/javax/net/ssl/SSLEngineTest.java
luni/src/test/java/javax/net/ssl/AllTests.java
support/src/test/java/javax/net/ssl/TestSSLEnginePair.java

SSLEngineTest betters exposed the differences between SSLSocket and
SSLEngine supported cipher suites. StandardNames now has an
CIPHER_SUITES_SSLENGINE definition which denotes what is missing
and what is extra and why in the SSLEngine implementation.

support/src/test/java/javax/net/ssl/StandardNames.java

Created StandardNames.assert{Valid,Supported}{CipherSuites,Protocols}
to factor out some code test code that is also used by new tests.

support/src/test/java/javax/net/ssl/StandardNames.java
luni/src/test/java/javax/net/ssl/SSLSocketFactoryTest.java
luni/src/test/java/javax/net/ssl/SSLSocketTest.java

Remove SSLSocketTest known failure and add new SSLEngineTest known failures

expectations/knownfailures.txt

SSL_OP_NO_TICKET change was recently merged from master which required some fixes.

For the moment, sslServerSocketSupportsSessionTickets always returns false.

support/src/test/java/javax/net/ssl/TestSSLContext.java

Fixed flakey test_SSLSocket_HandshakeCompletedListener which had a
race because the client thread look in the server session context
for an session by id potentially before the server thread had a
chance to store its session. Made noticable because of
SSL_OP_NO_TICKET recently merged from master (before this code
path was host only, not device)

luni/src/test/java/javax/net/ssl/SSLSocketTest.java

Fix checkjni issue where we need to check for pending exception in
OpenSSL callback. Possibly introduced by recent merge of
SSL_OP_NO_TICKET from master.

luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp

Expectation updates

Remove SSLSocketTest known failure and add new SSLEngineTest known failures

expectations/knownfailures.txt

Tag test_SSLSocket_getSupportedCipherSuites_connect as large

expectations/taggedtests.txt

Misc changes:

opening brace on wrong line

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerSessionContext.java

Long line cleanup while debugging

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/HandshakeProtocol.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLServerSocketFactoryImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketFactoryImpl.java
support/src/test/java/javax/net/ssl/TestKeyStore.java

Removed bogus import

luni/src/test/java/javax/net/ssl/SSLSessionContextTest.java

Comment clarify while debugging

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

Ctor -> Constructor in comment

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLEngineImpl.java

Fixed naming of SocketTest_Test_create to TestSocketPair_Create to match renamed classes

luni/src/test/java/javax/net/ssl/SSLSocketTest.java

Change-Id: I99505e97d6047eeabe4a0b93202075a0b2d486ec
pache/harmony/xnet/provider/jsse/CipherSuite.java
pache/harmony/xnet/provider/jsse/ClientSessionContext.java
pache/harmony/xnet/provider/jsse/DefaultSSLContextImpl.java
pache/harmony/xnet/provider/jsse/HandshakeProtocol.java
pache/harmony/xnet/provider/jsse/JSSEProvider.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLServerSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLContextImpl.java
pache/harmony/xnet/provider/jsse/SSLEngineImpl.java
pache/harmony/xnet/provider/jsse/SSLParameters.java
pache/harmony/xnet/provider/jsse/ServerSessionContext.java
b1396870f92135aa140bd2b86221768dea5bc11d 25-May-2010 Elliott Hughes <enh@google.com> Remove the luni localized exception messages.

Also fix a bug I introduced in KXmlSerializer: s.isEmpty() is not
equivalent to "".equals(s) if s is allowed to be null.

Bug: 1251121
Change-Id: I41a0a98ffb49f214041c9110f824d327af5c34e8
pache/harmony/luni/internal/net/www/protocol/file/Handler.java
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
pache/harmony/luni/internal/net/www/protocol/ftp/Handler.java
pache/harmony/luni/internal/net/www/protocol/http/Handler.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConfiguration.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/https/Handler.java
pache/harmony/luni/internal/net/www/protocol/jar/Handler.java
pache/harmony/luni/internal/net/www/protocol/jar/JarURLConnectionImpl.java
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/net/SocketInputStream.java
pache/harmony/luni/net/SocketOutputStream.java
pache/harmony/luni/net/Socks4Message.java
pache/harmony/luni/util/ExternalMessages.properties
pache/harmony/luni/util/NotImplementedException.java
pache/harmony/luni/util/Util.java
pache/harmony/nio/internal/SocketChannelImpl.java
3fab88eb2cd44ee5231b05f63e20917d3db12079 25-May-2010 Jesse Wilson <jessewilson@google.com> Merge "Redo HttpCookie.parse()." into dalvik-dev
77160e9cd7841fcf49d20b97a75d60e827c351ee 21-May-2010 Jesse Wilson <jessewilson@google.com> Redo HttpCookie.parse().

The previous code failed on quoted strings like ;Port="80,8080".
It also had weird behavior, like not supporting Expires headers
when the requesting locale wasn't English.

Tested with Harmony's tests and our CookieTest.

Change-Id: I271817b6febd30248f55f834cdcc2e3d5dfcd4c2
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
80a7fbab52b96c9fd47c72f8987d1babe2cd001d 22-May-2010 Elliott Hughes <enh@google.com> Remove more localized exception messages.

I also accidentally mixed two unrelated changes in here: replacing "".equals
and equals("") with String.isEmpty, and removing some dead code in
org.apache.harmony.luni.util.Util.

Change-Id: I0aaad43290b083085b3095b624caf096de487223
pache/harmony/crypto/internal/NullCipherSpi.java
pache/harmony/crypto/internal/nls/Messages.java
pache/harmony/crypto/internal/nls/messages.properties
pache/harmony/luni/internal/net/www/protocol/jar/Handler.java
pache/harmony/luni/util/Util.java
2313047d797e4daece04da8e8ed406d26b589f82 22-May-2010 Elliott Hughes <enh@google.com> Remove more localized exception messages.

Change-Id: I88eba4180e66d328c23a266f133b96d53cf62d40
pache/harmony/auth/internal/nls/Messages.java
pache/harmony/auth/internal/nls/messages.properties
b1433b3bd4dfc05426e5d9c3100b5fbaa198d8a0 21-May-2010 Elliott Hughes <enh@google.com> More messages.properties removal.

Change-Id: Ie90ca910b1d9f23565f8929c63186879932a4dc3
pache/harmony/archive/internal/nls/Messages.java
pache/harmony/archive/internal/nls/messages.properties
aacf6f9741dea0f12fbff5e7696e53f251177280 20-May-2010 Brian Carlstrom <bdc@google.com> Enable Diffie-Hellman cipher suites

Enable Diffie-Hellman cipher suites in NativeCrypto (and in
StandardNames to match for testing). This means we now have the same
default cipher suite list as RI 5.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java
support/src/test/java/javax/net/ssl/StandardNames.java

Enabling DH made it obvious that the RI check for enable cipher suites
on SSLServerSocket.accept was not as stringent as first
thought. Apparently they don't care if all enabled cipher suites have
certificates/keys, just that at least one of them will work, even if
its anonymous. Factored out the logic to check this into
checkEnabledCipherSuites for clarity along with the supporting
checkForPrivateKey. Also only check if the socket is in server mode,
since its fine to have nothing configured for server acting as a
client for handshake purposes.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java

The real work to enable Diffie-Hellman was to use
SSL_CTX_set_tmp_dh_callback to set a callback to get DH
parameters. There are two ways to create the parameters. The first is
to use DH_generate_parameters_ex which is very slow (minutes) as is
recommended as install time option. The second is to use
DSA_generate_parameters_ex followed by DSA_dup_DH, which is faster for
a single call, but must be done every time, so slower overall. We
currently take the second approach to just have DH working.

luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp

Changed ephemeral RSA keys to be stored per SSL in AppData, not in a static global.

luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp

Fix LS_ to TLS_ typo in commented out constant. Removed easy to miss wrapping in array definition.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java

Renamed CipherSuites defaultPretendant to defaultCipherSuites which
led to renaming the CipherSuites constants to follow the coding style.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/DigitalSignature.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLParameters.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerKeyExchange.java

Change-Id: Ia38de48cabb699b24fe6e341ba79f34e3da8b543
pache/harmony/xnet/provider/jsse/CipherSuite.java
pache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
pache/harmony/xnet/provider/jsse/DigitalSignature.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/SSLParameters.java
pache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
pache/harmony/xnet/provider/jsse/ServerKeyExchange.java
ce32a5646e9905a55d1c03b18757d401b4ab587e 19-May-2010 Jesse Wilson <jessewilson@google.com> Merge "Fix the HTTP client to read from the cookie store on HTTP requests." into dalvik-dev
071fec0c99935ebf4dd01a799ca7e7bee69b7c76 19-May-2010 Jesse Wilson <jessewilson@google.com> Fix the HTTP client to read from the cookie store on HTTP requests.

The forthcoming follow up is to write to the cookie store on HTTP responses.

Change-Id: I346136d4a4409a003c391c8dfbcf755af19b708d
pache/harmony/luni/internal/net/www/protocol/http/Header.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
8f78381c9c7a64f7c703913d702f2a8895207877 19-May-2010 Brian Carlstrom <bdc@google.com> SSLServerSocket accept should make sure enabled cipher suites have supporting private keys

Make CipherSuite static fields final (noticed because I tried to use some in a switch statement).
Also renamed "cuites*" to "suites*" and fixed UNKNOUN to UNKNOWN

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java

SSLServerSocket now matches the RI behavior of throwing an
SSLException for missing keys for non-anonymous cipher suites.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java

Fixed one KnownFailure

luni/src/test/java/javax/net/ssl/SSLSocketTest.java

Change-Id: I1ccbf93cfc5aa5951b1f33881446d93c380b6e68
pache/harmony/xnet/provider/jsse/CipherSuite.java
pache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java
a653cca054f36de92bbef8498be3f0f01d9d6119 18-May-2010 Brian Carlstrom <bdc@google.com> SSLSocketFactory.connect(Socket...) should allow port of -1

SSLSession.getPeerPort is supposed to return -1 when the port is
undefined so now we initialize it to that value.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java

Avoid creating InetAddress to store the OpenSSLSessionImplWrapper host
and port arguments since it was causing an exception on an port value
of -1 and was just used to go back to the original host and port when
creating the SSLSession, which is allowed to return a port value of -1.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

Remove last of KnownFailures for SSLSocketFactory

luni/src/test/java/javax/net/ssl/SSLSocketFactoryTest.java

Update classpath for newly seperated out junit jars

run-core-tests

Change-Id: I646a8f23c3d6ae01f1dd38e40bc9c32d436e6254
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
6df6339ecd4662d351c622a59533cbbe9f275ffd 18-May-2010 Brian Carlstrom <bdc@google.com> Client certificates should only be set on request from server

Client certificates should only be set into the SSL* when requested by
the server so that after the handshake is completed the client can
inspect its SSLSession to see what certificate if any was
requested. Previously the value was always non-null even if the server
didn't request the certificate.

- Created RAND_seed and RAND_load_file out of the NativeCrypto.SSL_new
- NativeCrypto.SSL_new now simply performs SSL_new and does not
deal with certificates, private keys, or random seeds.
- Removed helper version of NativeCrypto.SSL_new
Moved code to OpenSSLSocketImpl.setCertificate
- Created SSL_use_certificate, SSL_use_PrivateKey, SSL_check_private_key from SSL_new.
These are used not just on server handshake but also via clientCertificateRequested callback.
- Merged CertificateChainVerifier and HandshakeCompletedCallback into new SSLHandshakeCallbacks
while adding new clientCertificateRequested callback from OpenSSL C code to Java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp

In addition to supporting NativeCrypto.java changes, also changed
to_SSL_CTX and to_SSL_SESSION to allow null checking and throwing
NullPointerException. Changed these and to_SSL to log exception on
JNITrace, taking these logs out of individual functions. There
were a lot of null checks missing previously, mostly in
to_SSL_SESSION cases.

luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp

All KnownFailures now fixed.

luni/src/test/java/javax/net/ssl/SSLSessionTest.java

Three more KnownFailures now fixed.

luni/src/test/java/javax/net/ssl/SSLSocketTest.java

Change-Id: Iddcd5512e8395d947d3b894f03e3a059e63afe8a
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
fd487fbac3547360ea81d96edea9827fad080f86 18-May-2010 Brian Carlstrom <bdc@google.com> Change Harmony CipherSuite to use JSSE names

Change text names of Harmony CipherSuite's (used by SSLEngine and some
places with OpenSSL code) to match JSSE names.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java

Added StandardName constant for SSL_NULL_WITH_NULL_NULL

support/src/test/java/javax/net/ssl/StandardNames.java

Marked test as working with above fix, changed to use newly defined constant.

luni/src/test/java/javax/net/ssl/SSLSessionTest.java

Change-Id: Id48d2adcbbff71306296f1fdf8ff970c618fdcc6
pache/harmony/xnet/provider/jsse/CipherSuite.java
204cab3c22b4d75c866c95e2d2eec42e14cbd924 18-May-2010 Brian Carlstrom <bdc@google.com> Supported cipher suites improvements

Added new test_SSLSocket_getSupportedCipherSuites_connect to make sure
all cipher suites we claim work actually do. It clearly exposed that
although a large number of cipher suites are supported by libssl.so,
they are not properly wired up into the OpenSSL JSSE
implementation. In particular Elliptic Curve has been disabled in our
version Bouncy Castle does not work. In addition Diffie-Hellman does
not work because we need to further integration work with OpenSSL via
SSL_set_tmp_dh_callback or SSL_set_tmp_dh. Finally,
SSL_RSA_EXPORT_WITH_RC4_40_MD5 doesn't work but that is being left as
KnownFailure for more immediate cleanup based on ServerHandshakeImpl's
handling of KeyExchange_RSA_EXPORT as part of having OpenSSL call us
back for certificates dynamically.

luni/src/test/java/javax/net/ssl/SSLSocketTest.java

Refactored TestSSLContext.createKeyStore to create TestKeyStore which
now factors out TestSSLContext.createKeys from the old createKeyStore
method, which allows createKeys to be called multiple times for
different key algorithms (for example DSA in addition to RSA). Also
added a reusable singleton instance to cut down on test execution
time.

support/src/test/java/javax/net/ssl/TestKeyStore.java

Removed publicAlias/privateAlias from TestSSLContext since we now
include both RSA and DSA key pairs in they KeyStore by default. Added
TestSSLContext.assertCertificateInKeyStore methods to help tests the
previously used the alias fields fields. TestSSLContext.create API
changed as well since the alias names are no longer
required. TestSSLContext.createClient now needs to iterate over all
server certificates when setting up its TrustManager instead of just
grabbing one by alias name.

support/src/test/java/javax/net/ssl/TestSSLContext.java
luni/src/test/java/javax/net/ssl/SSLContextTest.java
luni/src/test/java/javax/net/ssl/SSLSessionTest.java
luni/src/test/java/javax/net/ssl/SSLSocketTest.java

TestSSLSocketPair.connect now allows optional inclusion of server
cipher suite list.

support/src/test/java/javax/net/ssl/TestSSLSocketPair.java
luni/src/test/java/javax/net/ssl/SSLSessionContextTest.java

Turning off Elliptic Curve and Diffie-Hellman which are not currently
working. Updating test expectations to match.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java
support/src/test/java/javax/net/ssl/StandardNames.java

Turn on registration of ECDSA and DSA since this part is currently
functional (and excercised by TestKeyStore.create())

luni/src/main/java/org/bouncycastle/x509/X509Util.java

Improve logging by including SSL pointer in error messages, which
makes it easier to relate these errors to JNI_TRACE messages.

luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp

Change-Id: I014d001a6a21a46c360678a346d3a3c8232f4d53
pache/harmony/xnet/provider/jsse/NativeCrypto.java
ouncycastle/x509/X509Util.java
d7119eb12622a4187553e68a32aafa61999d7162 15-May-2010 Elliott Hughes <enh@google.com> Merge "Fix getInetAddress/getPort/getLocalAddress/getLocalPort." into dalvik-dev
8cc54e9f098c4f299d2b88bb2b9110ce44354ed7 14-May-2010 Elliott Hughes <enh@google.com> Fix getInetAddress/getPort/getLocalAddress/getLocalPort.

Responsibility is split between Socket, SocketImpl, PlainSocketImpl,
SocketChannel, SocketChannelImpl, and SocketChannelImpl.SocketAdapter, and
we need to keep them synchronized. Our hands are somewhat tied by the fact
that the RI exposed way too much. I think, now I understand the relationships
a bit better, that we can probably rewrite this cluster of classes to be
simpler, but I don't want to bite off more than I can chew right now, and
this does fix the known problems.

This patch also makes us more compatible with the RI by making getLocalAddress
after the socket has been closed return the address we used.

By strange coincidence, harmony addressed this at the same time I was looking
at it (see http://svn.apache.org/viewvc?rev=944119&view=rev) but I feel they're
going in the wrong direction and making the relationships even more complicated.
I have run their new tests in addition to my own, though.

Bug: 1952042
Bug: http://code.google.com/p/android/issues/detail?id=1933
Bug: http://code.google.com/p/android/issues/detail?id=3123
Change-Id: Icb7793fb5d868e0d1f1b8b3d5da88c32fb973744
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/nio/internal/ServerSocketChannelImpl.java
pache/harmony/nio/internal/SocketChannelImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImplWrapper.java
9acacc36bafda869c6e9cc63786cdddd995ca96a 14-May-2010 Brian Carlstrom <bdc@google.com> Use JSSE cipher suite names and restore JSSE SSLSessionContext semantics

Summary:
- Switch to using JSSE cipher suite names
- SSLSessionContext implementation cleanup
- Updated tests

Details:

Switch to using JSSE cipher suite names
- We maintain backward compatability for enabling cipher suites using
OpenSSL names for old code that did so without checking for the
presence of the names in the supported list.
- We now have a well defined list of the supported cipher suites which
are sorted in priority order as specified in JSSE documentation so
that callers doing:
s.setEnabledCipherSuites(s.getSupportedCipherSuites())
will get something reasonable.
- We now have a default cipher suite list that is chose to match RI
behavior and priority, not based on OpenSSLs default and priorities.

Details:
- Added NativeCrypto OPENSSL_TO_STANDARD and STANDARD_TO_OPENSSL
mapping between naming conventions. STANDARD_TO_OPENSSL is a
LinkedHashMap so enumerating it gives the proper order for
SUPPORTED_CIPHER_SUITES.
- SSL_get_ciphers and SSL_set_cipher_list are removed, we now use
our own SSL_set_cipher_lists (defined seperately in
external/openssl/patches/jsse.patch) to set the set and order of
cipher suites. SSL_CTX_get_ciphers is also removed because we no
longer rely on the OpenSSL for the default cipher suites
behavior.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java
luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp

Add cipherSuite and protocol field caches for native values,
mapping the cipherSuite to a JSSE name from the OpenSSL name
returned by SSL_SESSION_cipher.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java

Fixed a long standing bug where we reused sessions found in the
client host/port cache even if the old protocol and cipher suite
where no longer compatible with what was specified by
setEnabledCipherSuites and setProtocols. Also fixed a recently
introduced bug where lastAccessedTime was being set on a cached
session even if it was not reused, found by fixed the above.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

Move most of SSLSessionContext implementation from subclasses to
AbstractSessionContext. This was primarily to align the
implementations of how different sessions id for the same host and
port were handled for RI compatability. client subclasses now focuses
on handling its host/port based cache and both deal with their own
persistent cache details.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/AbstractSessionContext.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientSessionContext.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerSessionContext.java

Tests

Added some variants of assertSSLSessionContextSize to simplify tests code.
Broke test_SSLSessionContext_setSessionCacheSize_oneConnect out of
test_SSLSessionContext_setSessionCacheSize_dynamic. Renamed
test_SSLSessionContext_setSessionCacheSize_basic to
test_SSLSessionContext_setSessionCacheSize_noConnect to match name
of _oneConnect. _dynamic was cleaned up a bit as getting it working
was the only goal of this change list. Fixed to filter
SSL_RSA_EXPORT_ ciphers since our test certificate key length is
too long for those. Lower test requirement to 3 unique cipher suites.

luni/src/test/java/javax/net/ssl/SSLSessionContextTest.java

Added checks that cipher suites and protocols have standard names.

luni/src/test/java/javax/net/ssl/SSLSessionTest.java

Removing known failures related to cipher suite naming. Fixed bug
of using assertNotNull instead of assertTrue. Added extra
size/length check which would have found the
assertNotNull/assertTrue issue.

luni/src/test/java/javax/net/ssl/SSLSocketFactoryTest.java
luni/src/test/java/javax/net/ssl/SSLSocketTest.java

Fixing test the explicitly worked around broken cipher suite naming.

luni/src/test/java/tests/api/javax/net/ssl/SSLSessionTest.java

Updated standard cipher suites to RI 6 list, which also now
specifies ordering, which we now align with.

support/src/test/java/javax/net/ssl/StandardNames.java

Unrelated

Remove more now obsolete jars from the test classpath

run-core-tests

Change-Id: I45c274a9327c9a1aeeccb39ecaf5a3fbe2903c8f
pache/harmony/xnet/provider/jsse/AbstractSessionContext.java
pache/harmony/xnet/provider/jsse/ClientSessionContext.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
pache/harmony/xnet/provider/jsse/ServerSessionContext.java
f33eae7e84eb6d3b0f4e86b59605bb3de73009f3 13-May-2010 Elliott Hughes <enh@google.com> Remove all trailing whitespace from the dalvik team-maintained parts of libcore.

Gentlemen, you may now set your editors to "strip trailing whitespace"...

Change-Id: I85b2f6c80e5fbef1af6cab11789790b078c11b1b
pache/harmony/archive/util/Util.java
pache/harmony/auth/internal/nls/Messages.java
pache/harmony/crypto/internal/NullCipherSpi.java
pache/harmony/crypto/internal/nls/Messages.java
pache/harmony/kernel/vm/LangAccess.java
pache/harmony/kernel/vm/ReflectionAccess.java
pache/harmony/kernel/vm/StringUtils.java
pache/harmony/kernel/vm/VM.java
pache/harmony/lang/annotation/AnnotationFactory.java
pache/harmony/lang/annotation/AnnotationMember.java
pache/harmony/luni/internal/net/www/MimeTable.java
pache/harmony/luni/internal/net/www/protocol/file/FileURLConnection.java
pache/harmony/luni/internal/net/www/protocol/file/Handler.java
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
pache/harmony/luni/internal/net/www/protocol/ftp/Handler.java
pache/harmony/luni/internal/net/www/protocol/http/Handler.java
pache/harmony/luni/internal/net/www/protocol/http/Header.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConfiguration.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
pache/harmony/luni/internal/net/www/protocol/https/Handler.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/jar/Handler.java
pache/harmony/luni/internal/net/www/protocol/jar/JarURLConnectionImpl.java
pache/harmony/luni/internal/util/TimezoneGetter.java
pache/harmony/luni/internal/util/ZoneInfo.java
pache/harmony/luni/lang/reflect/GenericSignatureParser.java
pache/harmony/luni/lang/reflect/ImplForArray.java
pache/harmony/luni/lang/reflect/ImplForType.java
pache/harmony/luni/lang/reflect/ImplForVariable.java
pache/harmony/luni/lang/reflect/ImplForWildcard.java
pache/harmony/luni/lang/reflect/ListOfTypes.java
pache/harmony/luni/net/GenericIPMreq.java
pache/harmony/luni/net/NetUtil.java
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/net/SocketInputStream.java
pache/harmony/luni/net/SocketOutputStream.java
pache/harmony/luni/net/Socks4Message.java
pache/harmony/luni/platform/AbstractMemorySpy.java
pache/harmony/luni/platform/Endianness.java
pache/harmony/luni/platform/FileDescriptorHandler.java
pache/harmony/luni/platform/ICommonDataTypes.java
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/IMemorySpy.java
pache/harmony/luni/platform/IMemorySystem.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/MappedPlatformAddress.java
pache/harmony/luni/platform/OSFileSystem.java
pache/harmony/luni/platform/OSMemory.java
pache/harmony/luni/platform/Platform.java
pache/harmony/luni/platform/PlatformAddress.java
pache/harmony/luni/platform/PlatformAddressFactory.java
pache/harmony/luni/platform/RuntimeMemorySpy.java
pache/harmony/luni/util/Base64.java
pache/harmony/luni/util/BinarySearch.java
pache/harmony/luni/util/FloatingPointParser.java
pache/harmony/luni/util/HexStringParser.java
pache/harmony/luni/util/Inet6Util.java
pache/harmony/luni/util/InputStreamHelper.java
pache/harmony/luni/util/InvalidJarIndexException.java
pache/harmony/luni/util/Msg.java
pache/harmony/luni/util/MsgHelp.java
pache/harmony/luni/util/NotImplementedException.java
pache/harmony/luni/util/NumberConverter.java
pache/harmony/luni/util/PasswordProtectedInputStream.java
pache/harmony/luni/util/PositionedInputStream.java
pache/harmony/luni/util/PriviAction.java
pache/harmony/luni/util/SHAOutputStream.java
pache/harmony/luni/util/TwoKeyHashMap.java
pache/harmony/luni/util/URLUtil.java
pache/harmony/luni/util/Util.java
pache/harmony/misc/HashCode.java
pache/harmony/misc/SystemUtils.java
pache/harmony/nio/AddressUtil.java
pache/harmony/nio/FileChannelFactory.java
pache/harmony/nio/internal/DatagramChannelImpl.java
pache/harmony/nio/internal/DirectBuffer.java
pache/harmony/nio/internal/FileChannelImpl.java
pache/harmony/nio/internal/FileLockImpl.java
pache/harmony/nio/internal/LockManager.java
pache/harmony/nio/internal/MappedByteBufferFactory.java
pache/harmony/nio/internal/PipeImpl.java
pache/harmony/nio/internal/ReadWriteFileChannel.java
pache/harmony/nio/internal/ServerSocketChannelImpl.java
pache/harmony/nio/internal/SocketChannelImpl.java
pache/harmony/nio/internal/WriteOnlyFileChannel.java
pache/harmony/security/DefaultPolicyScanner.java
pache/harmony/security/PolicyEntry.java
pache/harmony/security/PrivateKeyImpl.java
pache/harmony/security/PublicKeyImpl.java
pache/harmony/security/SystemScope.java
pache/harmony/security/UnresolvedPrincipal.java
pache/harmony/security/asn1/ASN1Any.java
pache/harmony/security/asn1/ASN1BitString.java
pache/harmony/security/asn1/ASN1Boolean.java
pache/harmony/security/asn1/ASN1Choice.java
pache/harmony/security/asn1/ASN1Constants.java
pache/harmony/security/asn1/ASN1Constructured.java
pache/harmony/security/asn1/ASN1Enumerated.java
pache/harmony/security/asn1/ASN1Exception.java
pache/harmony/security/asn1/ASN1Explicit.java
pache/harmony/security/asn1/ASN1GeneralizedTime.java
pache/harmony/security/asn1/ASN1Implicit.java
pache/harmony/security/asn1/ASN1Integer.java
pache/harmony/security/asn1/ASN1OctetString.java
pache/harmony/security/asn1/ASN1Oid.java
pache/harmony/security/asn1/ASN1OpenType.java
pache/harmony/security/asn1/ASN1Primitive.java
pache/harmony/security/asn1/ASN1Sequence.java
pache/harmony/security/asn1/ASN1SequenceOf.java
pache/harmony/security/asn1/ASN1Set.java
pache/harmony/security/asn1/ASN1SetOf.java
pache/harmony/security/asn1/ASN1StringType.java
pache/harmony/security/asn1/ASN1Time.java
pache/harmony/security/asn1/ASN1Type.java
pache/harmony/security/asn1/ASN1TypeCollection.java
pache/harmony/security/asn1/ASN1UTCTime.java
pache/harmony/security/asn1/ASN1ValueCollection.java
pache/harmony/security/asn1/BerInputStream.java
pache/harmony/security/asn1/BerOutputStream.java
pache/harmony/security/asn1/BitString.java
pache/harmony/security/asn1/DerInputStream.java
pache/harmony/security/asn1/DerOutputStream.java
pache/harmony/security/asn1/InformationObjectSet.java
pache/harmony/security/asn1/ObjectIdentifier.java
pache/harmony/security/fortress/DefaultPolicy.java
pache/harmony/security/fortress/DefaultPolicyParser.java
pache/harmony/security/fortress/Engine.java
pache/harmony/security/fortress/PolicyUtils.java
pache/harmony/security/fortress/SecurityAccess.java
pache/harmony/security/fortress/SecurityUtils.java
pache/harmony/security/fortress/Services.java
pache/harmony/security/internal/nls/Messages.java
pache/harmony/security/pkcs10/CertificationRequest.java
pache/harmony/security/pkcs10/CertificationRequestInfo.java
pache/harmony/security/pkcs7/AuthenticatedAttributes.java
pache/harmony/security/pkcs7/ContentInfo.java
pache/harmony/security/pkcs7/SignedData.java
pache/harmony/security/pkcs7/SignerInfo.java
pache/harmony/security/provider/cert/Cache.java
pache/harmony/security/provider/cert/DRLCertFactory.java
pache/harmony/security/provider/cert/X509CRLEntryImpl.java
pache/harmony/security/provider/cert/X509CRLImpl.java
pache/harmony/security/provider/cert/X509CertFactoryImpl.java
pache/harmony/security/provider/cert/X509CertImpl.java
pache/harmony/security/provider/cert/X509CertPathImpl.java
pache/harmony/security/provider/crypto/CryptoProvider.java
pache/harmony/security/provider/crypto/DSAKeyFactoryImpl.java
pache/harmony/security/provider/crypto/DSAPrivateKeyImpl.java
pache/harmony/security/provider/crypto/DSAPublicKeyImpl.java
pache/harmony/security/provider/crypto/RandomBitsSupplier.java
pache/harmony/security/provider/crypto/SHA1Impl.java
pache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java
pache/harmony/security/provider/crypto/SHA1_Data.java
pache/harmony/security/provider/crypto/SHA1_MessageDigestImpl.java
pache/harmony/security/provider/crypto/SHA1withDSA_SignatureImpl.java
pache/harmony/security/provider/crypto/ThreeIntegerSequence.java
pache/harmony/security/utils/AlgNameMapper.java
pache/harmony/security/utils/Array.java
pache/harmony/security/utils/JarUtils.java
pache/harmony/security/utils/ObjectIdentifier.java
pache/harmony/security/x501/AttributeType.java
pache/harmony/security/x501/AttributeTypeAndValue.java
pache/harmony/security/x501/AttributeTypeAndValueComparator.java
pache/harmony/security/x501/AttributeValue.java
pache/harmony/security/x501/Attributes.java
pache/harmony/security/x501/DirectoryString.java
pache/harmony/security/x501/Name.java
pache/harmony/security/x509/AccessDescription.java
pache/harmony/security/x509/AlgorithmIdentifier.java
pache/harmony/security/x509/AlternativeName.java
pache/harmony/security/x509/AuthorityKeyIdentifier.java
pache/harmony/security/x509/BasicConstraints.java
pache/harmony/security/x509/CRLDistributionPoints.java
pache/harmony/security/x509/CRLNumber.java
pache/harmony/security/x509/Certificate.java
pache/harmony/security/x509/CertificateIssuer.java
pache/harmony/security/x509/CertificateList.java
pache/harmony/security/x509/CertificatePolicies.java
pache/harmony/security/x509/DNParser.java
pache/harmony/security/x509/DistributionPoint.java
pache/harmony/security/x509/DistributionPointName.java
pache/harmony/security/x509/EDIPartyName.java
pache/harmony/security/x509/ExtendedKeyUsage.java
pache/harmony/security/x509/Extension.java
pache/harmony/security/x509/ExtensionValue.java
pache/harmony/security/x509/Extensions.java
pache/harmony/security/x509/GeneralName.java
pache/harmony/security/x509/GeneralNames.java
pache/harmony/security/x509/GeneralSubtree.java
pache/harmony/security/x509/GeneralSubtrees.java
pache/harmony/security/x509/InfoAccessSyntax.java
pache/harmony/security/x509/InhibitAnyPolicy.java
pache/harmony/security/x509/InvalidityDate.java
pache/harmony/security/x509/IssuingDistributionPoint.java
pache/harmony/security/x509/KeyUsage.java
pache/harmony/security/x509/NameConstraints.java
pache/harmony/security/x509/ORAddress.java
pache/harmony/security/x509/OtherName.java
pache/harmony/security/x509/PolicyConstraints.java
pache/harmony/security/x509/PolicyInformation.java
pache/harmony/security/x509/PolicyQualifierInfo.java
pache/harmony/security/x509/PrivateKeyUsagePeriod.java
pache/harmony/security/x509/ReasonCode.java
pache/harmony/security/x509/ReasonFlags.java
pache/harmony/security/x509/SubjectKeyIdentifier.java
pache/harmony/security/x509/SubjectPublicKeyInfo.java
pache/harmony/security/x509/TBSCertList.java
pache/harmony/security/x509/TBSCertificate.java
pache/harmony/security/x509/Time.java
pache/harmony/security/x509/Utils.java
pache/harmony/security/x509/Validity.java
pache/harmony/security/x509/X509PublicKey.java
pache/harmony/security/x509/tsp/MessageImprint.java
pache/harmony/security/x509/tsp/PKIFailureInfo.java
pache/harmony/security/x509/tsp/PKIStatus.java
pache/harmony/security/x509/tsp/PKIStatusInfo.java
pache/harmony/security/x509/tsp/TSTInfo.java
pache/harmony/security/x509/tsp/TimeStampReq.java
pache/harmony/security/x509/tsp/TimeStampResp.java
pache/harmony/text/BidiRun.java
pache/harmony/text/BidiWrapper.java
pache/harmony/xml/ExpatParser.java
pache/harmony/xml/ExpatPullParser.java
pache/harmony/xml/dom/AttrImpl.java
pache/harmony/xml/dom/CDATASectionImpl.java
pache/harmony/xml/dom/DOMImplementationImpl.java
pache/harmony/xml/dom/DocumentImpl.java
pache/harmony/xml/dom/DocumentTypeImpl.java
pache/harmony/xml/dom/ElementImpl.java
pache/harmony/xml/dom/InnerNodeImpl.java
pache/harmony/xml/dom/NamedNodeMapImpl.java
pache/harmony/xml/dom/NodeImpl.java
pache/harmony/xml/parsers/DocumentBuilderFactoryImpl.java
pache/harmony/xml/parsers/DocumentBuilderImpl.java
pache/harmony/xml/parsers/SAXParserFactoryImpl.java
pache/harmony/xnet/provider/jsse/AlertException.java
pache/harmony/xnet/provider/jsse/Appendable.java
pache/harmony/xnet/provider/jsse/CertificateMessage.java
pache/harmony/xnet/provider/jsse/CertificateRequest.java
pache/harmony/xnet/provider/jsse/CertificateVerify.java
pache/harmony/xnet/provider/jsse/CipherSuite.java
pache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
pache/harmony/xnet/provider/jsse/ClientHello.java
pache/harmony/xnet/provider/jsse/ClientKeyExchange.java
pache/harmony/xnet/provider/jsse/ClientSessionContext.java
pache/harmony/xnet/provider/jsse/ConnectionStateSSLv3.java
pache/harmony/xnet/provider/jsse/ConnectionStateTLS.java
pache/harmony/xnet/provider/jsse/DHParameters.java
pache/harmony/xnet/provider/jsse/DelegatedTask.java
pache/harmony/xnet/provider/jsse/DigitalSignature.java
pache/harmony/xnet/provider/jsse/FileClientSessionCache.java
pache/harmony/xnet/provider/jsse/Finished.java
pache/harmony/xnet/provider/jsse/Handshake.java
pache/harmony/xnet/provider/jsse/HandshakeIODataStream.java
pache/harmony/xnet/provider/jsse/HandshakeProtocol.java
pache/harmony/xnet/provider/jsse/HelloRequest.java
pache/harmony/xnet/provider/jsse/JSSEProvider.java
pache/harmony/xnet/provider/jsse/KeyManagerImpl.java
pache/harmony/xnet/provider/jsse/Logger.java
pache/harmony/xnet/provider/jsse/Message.java
pache/harmony/xnet/provider/jsse/OpenSSLMessageDigest.java
pache/harmony/xnet/provider/jsse/OpenSSLMessageDigestJDK.java
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
pache/harmony/xnet/provider/jsse/PRF.java
pache/harmony/xnet/provider/jsse/ProtocolVersion.java
pache/harmony/xnet/provider/jsse/SSLBufferedInput.java
pache/harmony/xnet/provider/jsse/SSLContextImpl.java
pache/harmony/xnet/provider/jsse/SSLEngineAppData.java
pache/harmony/xnet/provider/jsse/SSLEngineImpl.java
pache/harmony/xnet/provider/jsse/SSLParameters.java
pache/harmony/xnet/provider/jsse/SSLRecordProtocol.java
pache/harmony/xnet/provider/jsse/SSLSessionImpl.java
pache/harmony/xnet/provider/jsse/SSLv3Constants.java
pache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
pache/harmony/xnet/provider/jsse/ServerHello.java
pache/harmony/xnet/provider/jsse/ServerHelloDone.java
pache/harmony/xnet/provider/jsse/ServerKeyExchange.java
pache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java
3c/dom/Attr.java
3c/dom/CDATASection.java
3c/dom/CharacterData.java
3c/dom/Comment.java
3c/dom/DOMConfiguration.java
3c/dom/DOMError.java
3c/dom/DOMErrorHandler.java
3c/dom/DOMException.java
3c/dom/DOMImplementation.java
3c/dom/DOMImplementationList.java
3c/dom/DOMImplementationSource.java
3c/dom/DOMLocator.java
3c/dom/DOMStringList.java
3c/dom/Document.java
3c/dom/DocumentFragment.java
3c/dom/DocumentType.java
3c/dom/Element.java
3c/dom/Entity.java
3c/dom/EntityReference.java
3c/dom/NameList.java
3c/dom/NamedNodeMap.java
3c/dom/Node.java
3c/dom/NodeList.java
3c/dom/Notation.java
3c/dom/ProcessingInstruction.java
3c/dom/Text.java
3c/dom/TypeInfo.java
3c/dom/UserDataHandler.java
3c/dom/ls/DOMImplementationLS.java
3c/dom/ls/LSException.java
3c/dom/ls/LSInput.java
3c/dom/ls/LSOutput.java
3c/dom/ls/LSParser.java
3c/dom/ls/LSParserFilter.java
3c/dom/ls/LSResourceResolver.java
3c/dom/ls/LSSerializer.java
3c/dom/ls/LSSerializerFilter.java
3c/dom/traversal/NodeFilter.java
3c/dom/traversal/NodeIterator.java
ml/sax/AttributeList.java
ml/sax/Attributes.java
ml/sax/ContentHandler.java
ml/sax/DTDHandler.java
ml/sax/DocumentHandler.java
ml/sax/EntityResolver.java
ml/sax/ErrorHandler.java
ml/sax/HandlerBase.java
ml/sax/InputSource.java
ml/sax/Locator.java
ml/sax/Parser.java
ml/sax/SAXException.java
ml/sax/SAXNotSupportedException.java
ml/sax/SAXParseException.java
ml/sax/XMLReader.java
ml/sax/ext/Attributes2Impl.java
ml/sax/ext/DeclHandler.java
ml/sax/ext/DefaultHandler2.java
ml/sax/ext/EntityResolver2.java
ml/sax/ext/LexicalHandler.java
ml/sax/ext/Locator2.java
ml/sax/ext/Locator2Impl.java
ml/sax/helpers/AttributeListImpl.java
ml/sax/helpers/AttributesImpl.java
ml/sax/helpers/DefaultHandler.java
ml/sax/helpers/LocatorImpl.java
ml/sax/helpers/NamespaceSupport.java
ml/sax/helpers/NewInstance.java
ml/sax/helpers/ParserAdapter.java
ml/sax/helpers/ParserFactory.java
ml/sax/helpers/XMLFilterImpl.java
ml/sax/helpers/XMLReaderAdapter.java
ml/sax/helpers/XMLReaderFactory.java
fd6bb3510c2f94d636f3572dcf5f7f4dcd1a2726 13-May-2010 Elliott Hughes <enh@google.com> Remove //$NON-NLS-\d$ cruft.

Mostly done by perl(1), with manual cleanup of the few misspelled instances.
This makes our trailing whitespace slightly worse, but I'll fix all that with
a follow-on change.

Change-Id: I0b4ca98819be6f9519c4ba980d759bd1ee1a0303
pache/harmony/crypto/internal/NullCipherSpi.java
pache/harmony/crypto/internal/nls/Messages.java
pache/harmony/luni/internal/net/www/MimeTable.java
pache/harmony/luni/internal/net/www/protocol/file/FileURLConnection.java
pache/harmony/luni/internal/net/www/protocol/file/Handler.java
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
pache/harmony/luni/internal/net/www/protocol/ftp/Handler.java
pache/harmony/luni/internal/net/www/protocol/http/Handler.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConfiguration.java
pache/harmony/luni/internal/net/www/protocol/https/Handler.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/jar/Handler.java
pache/harmony/luni/internal/net/www/protocol/jar/JarURLConnectionImpl.java
pache/harmony/luni/net/NetUtil.java
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/net/SocketInputStream.java
pache/harmony/luni/net/SocketOutputStream.java
pache/harmony/luni/net/Socks4Message.java
pache/harmony/luni/platform/AbstractMemorySpy.java
pache/harmony/luni/platform/Endianness.java
pache/harmony/luni/platform/OSFileSystem.java
pache/harmony/luni/platform/PlatformAddress.java
pache/harmony/luni/util/FloatingPointParser.java
pache/harmony/luni/util/HexStringParser.java
pache/harmony/luni/util/InputStreamHelper.java
pache/harmony/luni/util/MsgHelp.java
pache/harmony/luni/util/URLUtil.java
pache/harmony/misc/SystemUtils.java
pache/harmony/nio/internal/MappedByteBufferFactory.java
pache/harmony/security/DefaultPolicyScanner.java
pache/harmony/security/PrivateKeyImpl.java
pache/harmony/security/PublicKeyImpl.java
pache/harmony/security/SystemScope.java
pache/harmony/security/UnresolvedPrincipal.java
pache/harmony/security/asn1/ASN1BitString.java
pache/harmony/security/asn1/ASN1Choice.java
pache/harmony/security/asn1/ASN1Explicit.java
pache/harmony/security/asn1/ASN1GeneralizedTime.java
pache/harmony/security/asn1/ASN1Implicit.java
pache/harmony/security/asn1/ASN1OpenType.java
pache/harmony/security/asn1/ASN1StringType.java
pache/harmony/security/asn1/ASN1Time.java
pache/harmony/security/asn1/ASN1Type.java
pache/harmony/security/asn1/ASN1TypeCollection.java
pache/harmony/security/asn1/ASN1UTCTime.java
pache/harmony/security/asn1/BerInputStream.java
pache/harmony/security/asn1/BitString.java
pache/harmony/security/asn1/DerInputStream.java
pache/harmony/security/asn1/ObjectIdentifier.java
pache/harmony/security/fortress/DefaultPolicy.java
pache/harmony/security/fortress/DefaultPolicyParser.java
pache/harmony/security/fortress/Engine.java
pache/harmony/security/fortress/PolicyUtils.java
pache/harmony/security/fortress/SecurityUtils.java
pache/harmony/security/fortress/Services.java
pache/harmony/security/internal/nls/Messages.java
pache/harmony/security/pkcs10/CertificationRequestInfo.java
pache/harmony/security/pkcs7/ContentInfo.java
pache/harmony/security/pkcs7/SignedData.java
pache/harmony/security/pkcs7/SignerInfo.java
pache/harmony/security/provider/cert/Cache.java
pache/harmony/security/provider/cert/DRLCertFactory.java
pache/harmony/security/provider/cert/X509CRLEntryImpl.java
pache/harmony/security/provider/cert/X509CRLImpl.java
pache/harmony/security/provider/cert/X509CertFactoryImpl.java
pache/harmony/security/provider/cert/X509CertImpl.java
pache/harmony/security/provider/cert/X509CertPathImpl.java
pache/harmony/security/provider/crypto/CryptoProvider.java
pache/harmony/security/provider/crypto/DSAKeyFactoryImpl.java
pache/harmony/security/provider/crypto/DSAPrivateKeyImpl.java
pache/harmony/security/provider/crypto/DSAPublicKeyImpl.java
pache/harmony/security/provider/crypto/RandomBitsSupplier.java
pache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java
pache/harmony/security/provider/crypto/SHA1_Data.java
pache/harmony/security/provider/crypto/SHA1_MessageDigestImpl.java
pache/harmony/security/provider/crypto/SHA1withDSA_SignatureImpl.java
pache/harmony/security/utils/AlgNameMapper.java
pache/harmony/security/utils/Array.java
pache/harmony/security/utils/JarUtils.java
pache/harmony/security/utils/ObjectIdentifier.java
pache/harmony/security/x501/AttributeTypeAndValue.java
pache/harmony/security/x501/Name.java
pache/harmony/security/x509/AccessDescription.java
pache/harmony/security/x509/AlgorithmIdentifier.java
pache/harmony/security/x509/AlternativeName.java
pache/harmony/security/x509/AuthorityKeyIdentifier.java
pache/harmony/security/x509/BasicConstraints.java
pache/harmony/security/x509/CRLDistributionPoints.java
pache/harmony/security/x509/CRLNumber.java
pache/harmony/security/x509/Certificate.java
pache/harmony/security/x509/CertificateIssuer.java
pache/harmony/security/x509/CertificateList.java
pache/harmony/security/x509/CertificatePolicies.java
pache/harmony/security/x509/DNParser.java
pache/harmony/security/x509/DistributionPoint.java
pache/harmony/security/x509/DistributionPointName.java
pache/harmony/security/x509/ExtendedKeyUsage.java
pache/harmony/security/x509/Extension.java
pache/harmony/security/x509/ExtensionValue.java
pache/harmony/security/x509/Extensions.java
pache/harmony/security/x509/GeneralName.java
pache/harmony/security/x509/GeneralSubtree.java
pache/harmony/security/x509/InfoAccessSyntax.java
pache/harmony/security/x509/InhibitAnyPolicy.java
pache/harmony/security/x509/InvalidityDate.java
pache/harmony/security/x509/IssuingDistributionPoint.java
pache/harmony/security/x509/KeyUsage.java
pache/harmony/security/x509/NameConstraints.java
pache/harmony/security/x509/PolicyConstraints.java
pache/harmony/security/x509/PolicyInformation.java
pache/harmony/security/x509/ReasonCode.java
pache/harmony/security/x509/ReasonFlags.java
pache/harmony/security/x509/SubjectKeyIdentifier.java
pache/harmony/security/x509/TBSCertList.java
pache/harmony/security/x509/TBSCertificate.java
pache/harmony/security/x509/X509PublicKey.java
2620ff9a08ce7fc6d66b60784b1eecd78eb001ba 13-May-2010 Elliott Hughes <enh@google.com> Fix *Channel to check that they're not trying to write into a read-only ByteBuffer.

Previously only DatagramChannel made the effort. Note that I also found another
customer for calculateTotalRemaining, and that the near-duplicate I'm removing
used an incorrect bound in its for loop.

Change-Id: Ia618ce271657a7fe7b3a0050dc089350d61e3398
pache/harmony/nio/internal/DatagramChannelImpl.java
pache/harmony/nio/internal/FileChannelImpl.java
pache/harmony/nio/internal/SocketChannelImpl.java
d85168bd730e513cb0bd561030da3f7ea5044725 13-May-2010 Elliott Hughes <enh@google.com> Slightly reduce duplication in FileChannelImpl/SocketChannelImpl.

Based on a harmony change.

Change-Id: I92a043d2a246aac74829cb38efeadf4886bf2ec3
pache/harmony/nio/internal/FileChannelImpl.java
pache/harmony/nio/internal/SocketChannelImpl.java
a008cf079f1cb812ec42a4fcc941fe170cc9b40d 13-May-2010 Elliott Hughes <enh@google.com> Minor file system changes.

Use fstat(2) instead of three seek(2)s to get the length of a file.

Java's readv should return -1 at EOF rather than 0.

The size() == 0 check in FileChannelImpl was (apparently) bogus.

(These changes are basically the same as harmony changes, and fix existing
harmony tests, so no new tests.)

Change-Id: I302611f777e91571b95654e03d0a3a41e1f97968
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/OSFileSystem.java
pache/harmony/nio/internal/FileChannelImpl.java
f281667712baf8e0721ceb2cc60e7eef19c2d859 12-May-2010 Elliott Hughes <enh@google.com> Reduced the amount of memory used by the TimeZone display names.

Bug: 2672057
Change-Id: I2f31ff3b5fbbf5cf8e16c89ef78a5246c6c3733a
pache/harmony/luni/internal/net/www/protocol/http/Header.java
a7ae90de24809b266bb5efdc9033a3261e31f521 11-May-2010 Brian Carlstrom <bdc@google.com> SSLSession and SSLSessionContext timeout improvements

Fix getIds Enumeration to filter invalid sessions.
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/AbstractSessionContext.java

Implement SSLSessionContext.setSessionTimeout to remove newly
invalid sessions as specified by the RI documentation. getSession
interfaces now filters invalid sessions from results.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientSessionContext.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerSessionContext.java

Added OpenSSLSocketImpl.creationTime instance field cache to avoid
repeated native calls since this is now used for all isValid tests.
Fixed broken isValid implementation:
- compared seconds to milliseconds
- direction of comparison backwards
- used last accessed time instead creation time as clarified in RI 7 documentation.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java

Unrelated

Replace java.io.* java.util.* imports with properly expanded versions:

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/AbstractSessionContext.java

Change-Id: Ib02218df414f014f1d260f7acc067e5647fb700b
pache/harmony/xnet/provider/jsse/AbstractSessionContext.java
pache/harmony/xnet/provider/jsse/ClientSessionContext.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/ServerSessionContext.java
0af0a7959d838c48e6b4e8dc9ac188ff6bbb6a87 11-May-2010 Brian Carlstrom <bdc@google.com> SSLSessionContexts should throw NullPointerException on getSession(null)

Add an explicit null check to ensure failure on a null argument to getSession to match the RI

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientSessionContext.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerSessionContext.java

Remove KnownFailures resolved by above fix as well as clarifiying SSL
session cache expections on Android vs the RI. The KnownFailures were
also hiding some latent issues to do SSL session tickets, so fixed
those up as well.

luni/src/test/java/javax/net/ssl/SSLSessionContextTest.java

Added constants for expected SSL session cache behavior for RI vs Android

support/src/test/java/javax/net/ssl/TestSSLContext.java

Change-Id: Ic6285192cf76c0a5c3fa45a24eaa504ed0babff5
pache/harmony/xnet/provider/jsse/ClientSessionContext.java
pache/harmony/xnet/provider/jsse/ServerSessionContext.java
f365a1c9cec94071b7a3161d7bdcb3f61d28f912 10-May-2010 Brian Carlstrom <bdc@google.com> SSLContext.getClientSessionContext and getServerSessionContext should work before SSLContext.init

Moved initialization of SSLContextImpl clientSessionContext and
serverSessionContext from engineInit time (in SSLParameters
constructor) to constructor time, making them final. This is to
fix javax.net.ssl.SSLContextTest which was failing because it
tried to access this before init was called, which worked fine on
the RI. The SSLParameters now simply takes the preallocated
session contexts as arguments. SSLParameters.getDefault() now
needs to create its own session contexts when an SSLContext is not
used, which is how Harmony does it.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLContextImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLParameters.java

Removed KnownFailure from SSLContextTest as its 100% working.

luni/src/test/java/javax/net/ssl/SSLContextTest.java

Changed persistentCache fields of ClientSessionContext and
ServerSessionContext from final to private and added a public
setter. This replaces passing the persistentCache implementation
in via the constructor. For momentarily backward compatibility
with frameworks/base, the now deprecated 5 argument engineInit
method now uses these setters for backward compatability. The
SSLParameters previously took these persistent caches as arguments
in order to pass them to the session context contructors, but as
SSLParameters no longer creates these, they are no longer relevant.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientSessionContext.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerSessionContext.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLContextImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLParameters.java

While moving the call of the AbstractSessionContext constructor
from SSLParameters to SSLContextImpl after removing the persistent
cache arguments, I realized there was no longer any reason to take
any arguments. I pushed the initization of sslCtxNativePointer to
the point of declaration.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/AbstractSessionContext.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientSessionContext.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerSessionContext.java

Change-Id: Ied2903a2f369bf4e521e702bf58f32f21cb97d17
pache/harmony/xnet/provider/jsse/AbstractSessionContext.java
pache/harmony/xnet/provider/jsse/ClientSessionContext.java
pache/harmony/xnet/provider/jsse/SSLContextImpl.java
pache/harmony/xnet/provider/jsse/SSLParameters.java
pache/harmony/xnet/provider/jsse/ServerSessionContext.java
edc2dae4345ea305f092ade00419685d77c8eee9 08-May-2010 Elliott Hughes <enh@google.com> Trivia.

Remove unused parameters from NetworkInterface's native methods.

Remove commented-out static initializers.

Fix FileChannel.force so that force(true) doesn't do _less_ than force(false).
Note that force(true) still doesn't do _more_ than force(false) because bionic
doesn't implement fdatasync(2). I've raised a bug against bionic about that.

Change-Id: Ia5e827638606a7919e3bcf324810747ee6bcbb9a
pache/harmony/nio/internal/FileChannelImpl.java
pache/harmony/nio/internal/ReadOnlyFileChannel.java
3e24c53ecc31b840e51869c295785d5a2f8b31eb 06-May-2010 Brian Carlstrom <bdc@google.com> Moving OpenSSLSocketImpl native code to NativeCrypto (and other clearnup)

Summary:
- Finished consolidating OpenSSL native code into NativeCrypto
- fixing local vs global ref bug with AppData
Added new ScopedGlobalRef as part of this fix
- fixed many historical memory leaks identified during code review
- fixed lack of error checking on allcoation with OpenSSL *_new routines
- Added to_SSL_CTX and to_SSL_SESSION to match to_SSL (renamed from getSslPointer)
- Replaced most uses of GetByteArrayElements with ScopedByteArray
(including cases where we we using ReleaseByteArrayElements(..,...,0) instead of JNI_ABORT)
- Replaced uses of GetStringUTFChars with ScopedUtfChars

Details:

Finished consolidating OpenSSL native code into NativeCrypto

OpenSSLSocketImpl NativeCrypto
---------------------------------------
nativeread SSL_read_byte
nativeread SSL_read
nativewrite SSL_write_byte
nativewrite SSL_write
nativeinterrupt SSL_interrupt
nativeclose SSL_shutdown
nativeverifysignature verifysignature

Also removed dead code that was wrapping SSL_get1_session

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp

Fixed NativeCrypto_SSL_write and NativeCrypto_d2i_SSL_SESSION to use
JNI_ABORT on release to avoid copy back of unchanged data (via ScopedByteArray).

luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp

While running the usual tests:
adb shell run-core-tests tests.xnet.AllTests javax.net.ssl.AllTests
there was an abort from the JNI checking because in the recent
handshaking change, local refs were kept in AppData and then reused in
later calls. Added new ScopedGlobalRef to handle the book keeping of this.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
include/ScopedGlobalRef.h

Fixed various leaks on old error paths spotted by reviewer.

luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp

Tracking move of verifySignature, a non-SSL bit of code that was lurking in OpenSSLSocketImpl

luni/src/main/java/org/apache/harmony/security/provider/cert/X509CertImpl.java

Change-Id: If1e409782bc99dc684039cfe3f53f8244e29346e
pache/harmony/security/provider/cert/X509CertImpl.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
5cc876d21b0038163bc916e58849478f13c40fef 06-May-2010 Elliott Hughes <enh@google.com> Trivia.

Fix my test to do what I intended (and what the comment claims), and privatize
Platform's privates.

Change-Id: Icedc8aed50d6ec69c69e4b00786e40b7c4071b91
pache/harmony/luni/platform/Platform.java
eeefcae2980c8db05ec08303b5b112afce232d26 06-May-2010 Elliott Hughes <enh@google.com> Remove the "Answers" javadoc barbarism.

I didn't realize how little of it was left, or I'd have done this earlier.

Change-Id: Ic4c23c3779bbee0ed4a8117584c5332e04536b5d
pache/harmony/luni/platform/Platform.java
pache/harmony/luni/util/TwoKeyHashMap.java
pache/harmony/luni/util/Util.java
pache/harmony/nio/internal/FileLockImpl.java
b470d3a945dea5544906614d3cfb3c43dba5a5c9 06-May-2010 Elliott Hughes <enh@google.com> Merge "Fix HttpURLConnection to not cache failures." into dalvik-dev
6247987eb505a482a67f5f19678260d9e7240a5f 05-May-2010 Elliott Hughes <enh@google.com> Fix HttpURLConnection to not cache failures.

Found while investigating http://code.google.com/p/android/issues/detail?id=7787,
which turned out to be caused by unclear documentation. I've improved the
documentation somewhat, and stopped offering failed responses to the cache.

Bug: http://code.google.com/p/android/issues/detail?id=7787
Change-Id: Iec69769344af92345392c7ced817b0c823963524
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/util/ExternalMessages.properties
f002bdddce924e2145a4a2b60592b7a40f4112f6 05-May-2010 Brian Carlstrom <bdc@google.com> Moving OpenSSLSessionImpl native code to NativeCrypto

OpenSSLSessionImpl NativeCrypto
-------------------------------------------------------
getId SSL_SESSION_session_id
getPeerCertificatesImpl SSL_SESSION_get_peer_cert_chain
getCreationTime SSL_SESSION_get_time
getProtocol SSL_SESSION_get_version
getCipherSuite SSL_SESSION_cipher
freeImpl SSL_SESSION_free
getEncoded i2d_SSL_SESSION
initializeNativeImpl d2i_SSL_SESSION

Change-Id: I4538df52280266711986a577b14868af3ea0ed62
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
7b18e4c9b11150a9492a779a69412ac78b6d51be 05-May-2010 Elliott Hughes <enh@google.com> Merge "Remove use of non-errno error codes in OSNetworkSystem." into dalvik-dev
b375c0ce8372b1343cfd9aa27698df1227c0b4e5 05-May-2010 Elliott Hughes <enh@google.com> Remove use of non-errno error codes in OSNetworkSystem.

This code's confusing enough without being so idiosyncratic. I've also changed
the native method so it returns a boolean rather leaking errno values in Java.

Where the original code used ENOTCONN, I've reverted to the native API's
EINPROGRESS for clarity. I've also used TEMP_FAILURE_RETRY to avoid manually
messing about with EINTR.

While I was here, I fixed a TODO about not needlessly passing a
sockaddr_storage by value, and removed a dead part of the old getsockopt code
I'd forgotten to remove.

Change-Id: I3c62fb80e33747619961ff39a0867422769126c4
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/nio/internal/SocketChannelImpl.java
e688a4123f165ed2905878e312b074b8c825d119 05-May-2010 Brian Carlstrom <bdc@google.com> Addressing post-submit comments regarding OpenSSL handhake changes

Following up on feedback from earlier change https://android-git.corp.google.com/g/50435

Added new test_SSLSocket_startHandshake_noClientCertificate to
make sure handshaking works when no client certificates are
present after issues raised by hwu during code review.

luni/src/test/java/javax/net/ssl/SSLSocketTest.java

Improve TestSSLContext.create* options
- added javadoc comments to help distinguish different versions
- fixed bug of not passing in keyStorePassword in create()
- added new createClient(server) method to create a TestSSLContext
that trusts the provided server TestSSLContext's certificate for
use by test_SSLSocket_startHandshake_noClientCertificate
- made createKeyStore optionally create a more minimal keystore if
aliases are not present
support/src/test/java/javax/net/ssl/TestSSLContext.java

Fixed argument names in SSL_*_mode methods names as pointed out by hwu

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java

Added comment to explain purpose of OpenSSLSessionImpl.resetId.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java

Two changes to OpenSocketImpl
- Added logging on runtime exception catch around
HandshakeCompletedListener execution to closely mirror RI
behavior.
- Cleaned up peerCertificate check to not just be on the client path.

luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

Addressed enh's comments about using clearEnv and when to delete AppData

luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp

Change-Id: I34f54e3e41a5d53d81fdc22aa34ca4de4ee9826f
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
6b811c5daec1b28e6f63b57f98a032236f2c3cf7 03-May-2010 Peter Hallam <peterhal@google.com> Merge awt-kernel, icu, luni-kernel, prefs, security-kernel, x-net into luni
Merge xml except xmlpull and kxml into luni
pache/harmony/kernel/vm/LangAccess.java
pache/harmony/kernel/vm/ReflectionAccess.java
pache/harmony/kernel/vm/StringUtils.java
pache/harmony/kernel/vm/VM.java
pache/harmony/lang/annotation/AnnotationFactory.java
pache/harmony/lang/annotation/AnnotationMember.java
pache/harmony/xml/ExpatAttributes.java
pache/harmony/xml/ExpatException.java
pache/harmony/xml/ExpatParser.java
pache/harmony/xml/ExpatPullParser.java
pache/harmony/xml/ExpatReader.java
pache/harmony/xml/dom/AttrImpl.java
pache/harmony/xml/dom/CDATASectionImpl.java
pache/harmony/xml/dom/CharacterDataImpl.java
pache/harmony/xml/dom/CommentImpl.java
pache/harmony/xml/dom/DOMConfigurationImpl.java
pache/harmony/xml/dom/DOMImplementationImpl.java
pache/harmony/xml/dom/DocumentFragmentImpl.java
pache/harmony/xml/dom/DocumentImpl.java
pache/harmony/xml/dom/DocumentTypeImpl.java
pache/harmony/xml/dom/ElementImpl.java
pache/harmony/xml/dom/EntityImpl.java
pache/harmony/xml/dom/EntityReferenceImpl.java
pache/harmony/xml/dom/InnerNodeImpl.java
pache/harmony/xml/dom/LeafNodeImpl.java
pache/harmony/xml/dom/NamedNodeMapImpl.java
pache/harmony/xml/dom/NodeImpl.java
pache/harmony/xml/dom/NodeListImpl.java
pache/harmony/xml/dom/NotationImpl.java
pache/harmony/xml/dom/ProcessingInstructionImpl.java
pache/harmony/xml/dom/TextImpl.java
pache/harmony/xml/parsers/DocumentBuilderFactoryImpl.java
pache/harmony/xml/parsers/DocumentBuilderImpl.java
pache/harmony/xml/parsers/SAXParserFactoryImpl.java
pache/harmony/xml/parsers/SAXParserImpl.java
pache/harmony/xnet/provider/jsse/AbstractSessionContext.java
pache/harmony/xnet/provider/jsse/AlertException.java
pache/harmony/xnet/provider/jsse/AlertProtocol.java
pache/harmony/xnet/provider/jsse/Appendable.java
pache/harmony/xnet/provider/jsse/CertificateMessage.java
pache/harmony/xnet/provider/jsse/CertificateRequest.java
pache/harmony/xnet/provider/jsse/CertificateVerify.java
pache/harmony/xnet/provider/jsse/CipherSuite.java
pache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
pache/harmony/xnet/provider/jsse/ClientHello.java
pache/harmony/xnet/provider/jsse/ClientKeyExchange.java
pache/harmony/xnet/provider/jsse/ClientSessionContext.java
pache/harmony/xnet/provider/jsse/ConnectionState.java
pache/harmony/xnet/provider/jsse/ConnectionStateSSLv3.java
pache/harmony/xnet/provider/jsse/ConnectionStateTLS.java
pache/harmony/xnet/provider/jsse/ContentType.java
pache/harmony/xnet/provider/jsse/DHParameters.java
pache/harmony/xnet/provider/jsse/DataStream.java
pache/harmony/xnet/provider/jsse/DelegatedTask.java
pache/harmony/xnet/provider/jsse/DigitalSignature.java
pache/harmony/xnet/provider/jsse/EndOfBufferException.java
pache/harmony/xnet/provider/jsse/EndOfSourceException.java
pache/harmony/xnet/provider/jsse/FileClientSessionCache.java
pache/harmony/xnet/provider/jsse/Finished.java
pache/harmony/xnet/provider/jsse/Handshake.java
pache/harmony/xnet/provider/jsse/HandshakeIODataStream.java
pache/harmony/xnet/provider/jsse/HandshakeProtocol.java
pache/harmony/xnet/provider/jsse/HelloRequest.java
pache/harmony/xnet/provider/jsse/JSSEProvider.java
pache/harmony/xnet/provider/jsse/KeyManagerFactoryImpl.java
pache/harmony/xnet/provider/jsse/KeyManagerImpl.java
pache/harmony/xnet/provider/jsse/Logger.java
pache/harmony/xnet/provider/jsse/Message.java
pache/harmony/xnet/provider/jsse/NativeCrypto.java
pache/harmony/xnet/provider/jsse/OpenSSLMessageDigest.java
pache/harmony/xnet/provider/jsse/OpenSSLMessageDigestJDK.java
pache/harmony/xnet/provider/jsse/OpenSSLServerSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSignature.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketFactoryImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
pache/harmony/xnet/provider/jsse/OpenSSLSocketImplWrapper.java
pache/harmony/xnet/provider/jsse/PRF.java
pache/harmony/xnet/provider/jsse/ProtocolVersion.java
pache/harmony/xnet/provider/jsse/SSLBufferedInput.java
pache/harmony/xnet/provider/jsse/SSLClientSessionCache.java
pache/harmony/xnet/provider/jsse/SSLContextImpl.java
pache/harmony/xnet/provider/jsse/SSLEngineAppData.java
pache/harmony/xnet/provider/jsse/SSLEngineDataStream.java
pache/harmony/xnet/provider/jsse/SSLEngineImpl.java
pache/harmony/xnet/provider/jsse/SSLInputStream.java
pache/harmony/xnet/provider/jsse/SSLParameters.java
pache/harmony/xnet/provider/jsse/SSLRecordProtocol.java
pache/harmony/xnet/provider/jsse/SSLServerSessionCache.java
pache/harmony/xnet/provider/jsse/SSLSessionImpl.java
pache/harmony/xnet/provider/jsse/SSLStreamedInput.java
pache/harmony/xnet/provider/jsse/SSLv3Constants.java
pache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
pache/harmony/xnet/provider/jsse/ServerHello.java
pache/harmony/xnet/provider/jsse/ServerHelloDone.java
pache/harmony/xnet/provider/jsse/ServerKeyExchange.java
pache/harmony/xnet/provider/jsse/ServerSessionContext.java
pache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java
pache/harmony/xnet/provider/jsse/TrustManagerImpl.java
pache/xalan/Version.java
pache/xalan/Version.src
pache/xalan/extensions/ExpressionContext.java
pache/xalan/extensions/ExpressionVisitor.java
pache/xalan/extensions/ExtensionHandler.java
pache/xalan/extensions/ExtensionNamespaceSupport.java
pache/xalan/extensions/ExtensionNamespacesManager.java
pache/xalan/extensions/ExtensionsTable.java
pache/xalan/extensions/ObjectFactory.java
pache/xalan/processor/ProcessorAttributeSet.java
pache/xalan/processor/ProcessorCharacters.java
pache/xalan/processor/ProcessorDecimalFormat.java
pache/xalan/processor/ProcessorExsltFuncResult.java
pache/xalan/processor/ProcessorExsltFunction.java
pache/xalan/processor/ProcessorGlobalParamDecl.java
pache/xalan/processor/ProcessorGlobalVariableDecl.java
pache/xalan/processor/ProcessorImport.java
pache/xalan/processor/ProcessorInclude.java
pache/xalan/processor/ProcessorKey.java
pache/xalan/processor/ProcessorLRE.java
pache/xalan/processor/ProcessorNamespaceAlias.java
pache/xalan/processor/ProcessorOutputElem.java
pache/xalan/processor/ProcessorPreserveSpace.java
pache/xalan/processor/ProcessorStripSpace.java
pache/xalan/processor/ProcessorStylesheetDoc.java
pache/xalan/processor/ProcessorStylesheetElement.java
pache/xalan/processor/ProcessorTemplate.java
pache/xalan/processor/ProcessorTemplateElem.java
pache/xalan/processor/ProcessorText.java
pache/xalan/processor/ProcessorUnknown.java
pache/xalan/processor/StylesheetHandler.java
pache/xalan/processor/TransformerFactoryImpl.java
pache/xalan/processor/WhitespaceInfoPaths.java
pache/xalan/processor/XSLProcessorVersion.src
pache/xalan/processor/XSLTAttributeDef.java
pache/xalan/processor/XSLTElementDef.java
pache/xalan/processor/XSLTElementProcessor.java
pache/xalan/processor/XSLTSchema.java
pache/xalan/processor/package.html
pache/xalan/res/XSLMessages.java
pache/xalan/res/XSLTErrorResources.java
pache/xalan/res/XSLTInfo.properties
pache/xalan/res/package.html
pache/xalan/serialize/SerializerUtils.java
pache/xalan/templates/AVT.java
pache/xalan/templates/AVTPart.java
pache/xalan/templates/AVTPartSimple.java
pache/xalan/templates/AVTPartXPath.java
pache/xalan/templates/AbsPathChecker.java
pache/xalan/templates/Constants.java
pache/xalan/templates/DecimalFormatProperties.java
pache/xalan/templates/ElemApplyImport.java
pache/xalan/templates/ElemApplyTemplates.java
pache/xalan/templates/ElemAttribute.java
pache/xalan/templates/ElemAttributeSet.java
pache/xalan/templates/ElemCallTemplate.java
pache/xalan/templates/ElemChoose.java
pache/xalan/templates/ElemComment.java
pache/xalan/templates/ElemCopy.java
pache/xalan/templates/ElemCopyOf.java
pache/xalan/templates/ElemElement.java
pache/xalan/templates/ElemEmpty.java
pache/xalan/templates/ElemExsltFuncResult.java
pache/xalan/templates/ElemExsltFunction.java
pache/xalan/templates/ElemExtensionCall.java
pache/xalan/templates/ElemExtensionDecl.java
pache/xalan/templates/ElemExtensionScript.java
pache/xalan/templates/ElemFallback.java
pache/xalan/templates/ElemForEach.java
pache/xalan/templates/ElemIf.java
pache/xalan/templates/ElemLiteralResult.java
pache/xalan/templates/ElemMessage.java
pache/xalan/templates/ElemNumber.java
pache/xalan/templates/ElemOtherwise.java
pache/xalan/templates/ElemPI.java
pache/xalan/templates/ElemParam.java
pache/xalan/templates/ElemSort.java
pache/xalan/templates/ElemTemplate.java
pache/xalan/templates/ElemTemplateElement.java
pache/xalan/templates/ElemText.java
pache/xalan/templates/ElemTextLiteral.java
pache/xalan/templates/ElemUnknown.java
pache/xalan/templates/ElemUse.java
pache/xalan/templates/ElemValueOf.java
pache/xalan/templates/ElemVariable.java
pache/xalan/templates/ElemVariablePsuedo.java
pache/xalan/templates/ElemWhen.java
pache/xalan/templates/ElemWithParam.java
pache/xalan/templates/FuncDocument.java
pache/xalan/templates/FuncFormatNumb.java
pache/xalan/templates/FuncKey.java
pache/xalan/templates/KeyDeclaration.java
pache/xalan/templates/NamespaceAlias.java
pache/xalan/templates/OutputProperties.java
pache/xalan/templates/RedundentExprEliminator.java
pache/xalan/templates/Stylesheet.java
pache/xalan/templates/StylesheetComposed.java
pache/xalan/templates/StylesheetRoot.java
pache/xalan/templates/TemplateList.java
pache/xalan/templates/TemplateSubPatternAssociation.java
pache/xalan/templates/VarNameCollector.java
pache/xalan/templates/WhiteSpaceInfo.java
pache/xalan/templates/XMLNSDecl.java
pache/xalan/templates/XSLTVisitable.java
pache/xalan/templates/XSLTVisitor.java
pache/xalan/templates/XUnresolvedVariable.java
pache/xalan/templates/XUnresolvedVariableSimple.java
pache/xalan/templates/package.html
pache/xalan/transformer/ClonerToResultTree.java
pache/xalan/transformer/Counter.java
pache/xalan/transformer/CountersTable.java
pache/xalan/transformer/DecimalToRoman.java
pache/xalan/transformer/KeyIterator.java
pache/xalan/transformer/KeyManager.java
pache/xalan/transformer/KeyTable.java
pache/xalan/transformer/MsgMgr.java
pache/xalan/transformer/NodeSortKey.java
pache/xalan/transformer/NodeSorter.java
pache/xalan/transformer/SerializerSwitcher.java
pache/xalan/transformer/TrAXFilter.java
pache/xalan/transformer/TransformState.java
pache/xalan/transformer/TransformerClient.java
pache/xalan/transformer/TransformerHandlerImpl.java
pache/xalan/transformer/TransformerIdentityImpl.java
pache/xalan/transformer/TransformerImpl.java
pache/xalan/transformer/TreeWalker2Result.java
pache/xalan/transformer/XalanProperties.java
pache/xalan/transformer/XalanTransformState.java
pache/xalan/transformer/package.html
pache/xalan/xslt/EnvironmentCheck.java
pache/xalan/xslt/ObjectFactory.java
pache/xalan/xslt/SecuritySupport.java
pache/xalan/xslt/SecuritySupport12.java
pache/xalan/xslt/package.html
pache/xml/dtm/Axis.java
pache/xml/dtm/DTM.java
pache/xml/dtm/DTMAxisIterator.java
pache/xml/dtm/DTMAxisTraverser.java
pache/xml/dtm/DTMConfigurationException.java
pache/xml/dtm/DTMDOMException.java
pache/xml/dtm/DTMException.java
pache/xml/dtm/DTMFilter.java
pache/xml/dtm/DTMIterator.java
pache/xml/dtm/DTMManager.java
pache/xml/dtm/DTMWSFilter.java
pache/xml/dtm/ObjectFactory.java
pache/xml/dtm/SecuritySupport.java
pache/xml/dtm/SecuritySupport12.java
pache/xml/dtm/ref/ChunkedIntArray.java
pache/xml/dtm/ref/CoroutineManager.java
pache/xml/dtm/ref/DTMAxisIterNodeList.java
pache/xml/dtm/ref/DTMAxisIteratorBase.java
pache/xml/dtm/ref/DTMChildIterNodeList.java
pache/xml/dtm/ref/DTMDefaultBase.java
pache/xml/dtm/ref/DTMDefaultBaseIterators.java
pache/xml/dtm/ref/DTMDefaultBaseTraversers.java
pache/xml/dtm/ref/DTMDocumentImpl.java
pache/xml/dtm/ref/DTMManagerDefault.java
pache/xml/dtm/ref/DTMNamedNodeMap.java
pache/xml/dtm/ref/DTMNodeIterator.java
pache/xml/dtm/ref/DTMNodeList.java
pache/xml/dtm/ref/DTMNodeListBase.java
pache/xml/dtm/ref/DTMNodeProxy.java
pache/xml/dtm/ref/DTMStringPool.java
pache/xml/dtm/ref/DTMTreeWalker.java
pache/xml/dtm/ref/ExpandedNameTable.java
pache/xml/dtm/ref/ExtendedType.java
pache/xml/dtm/ref/IncrementalSAXSource.java
pache/xml/dtm/ref/IncrementalSAXSource_Filter.java
pache/xml/dtm/ref/NodeLocator.java
pache/xml/dtm/ref/SecuritySupport.java
pache/xml/dtm/ref/SecuritySupport12.java
pache/xml/dtm/ref/dom2dtm/DOM2DTM.java
pache/xml/dtm/ref/dom2dtm/DOM2DTMdefaultNamespaceDeclarationNode.java
pache/xml/dtm/ref/sax2dtm/SAX2DTM.java
pache/xml/dtm/ref/sax2dtm/SAX2DTM2.java
pache/xml/dtm/ref/sax2dtm/SAX2RTFDTM.java
pache/xml/res/XMLErrorResources.java
pache/xml/res/XMLMessages.java
pache/xml/serializer/AttributesImplSerializer.java
pache/xml/serializer/CharInfo.java
pache/xml/serializer/DOM3Serializer.java
pache/xml/serializer/DOMSerializer.java
pache/xml/serializer/ElemContext.java
pache/xml/serializer/ElemDesc.java
pache/xml/serializer/EncodingInfo.java
pache/xml/serializer/Encodings.java
pache/xml/serializer/Encodings.properties
pache/xml/serializer/ExtendedContentHandler.java
pache/xml/serializer/ExtendedLexicalHandler.java
pache/xml/serializer/HTMLEntities.properties
pache/xml/serializer/Method.java
pache/xml/serializer/NamespaceMappings.java
pache/xml/serializer/ObjectFactory.java
pache/xml/serializer/OutputPropertiesFactory.java
pache/xml/serializer/OutputPropertyUtils.java
pache/xml/serializer/SecuritySupport.java
pache/xml/serializer/SecuritySupport12.java
pache/xml/serializer/SerializationHandler.java
pache/xml/serializer/Serializer.java
pache/xml/serializer/SerializerBase.java
pache/xml/serializer/SerializerConstants.java
pache/xml/serializer/SerializerFactory.java
pache/xml/serializer/SerializerTrace.java
pache/xml/serializer/SerializerTraceWriter.java
pache/xml/serializer/ToHTMLStream.java
pache/xml/serializer/ToSAXHandler.java
pache/xml/serializer/ToStream.java
pache/xml/serializer/ToTextSAXHandler.java
pache/xml/serializer/ToTextStream.java
pache/xml/serializer/ToUnknownStream.java
pache/xml/serializer/ToXMLSAXHandler.java
pache/xml/serializer/ToXMLStream.java
pache/xml/serializer/TransformStateSetter.java
pache/xml/serializer/TreeWalker.java
pache/xml/serializer/Version.java
pache/xml/serializer/Version.src
pache/xml/serializer/WriterChain.java
pache/xml/serializer/WriterToASCI.java
pache/xml/serializer/WriterToUTF8Buffered.java
pache/xml/serializer/XMLEntities.properties
pache/xml/serializer/XSLOutputAttributes.java
pache/xml/serializer/dom3/DOM3SerializerImpl.java
pache/xml/serializer/dom3/DOM3TreeWalker.java
pache/xml/serializer/dom3/DOMConstants.java
pache/xml/serializer/dom3/DOMErrorHandlerImpl.java
pache/xml/serializer/dom3/DOMErrorImpl.java
pache/xml/serializer/dom3/DOMLocatorImpl.java
pache/xml/serializer/dom3/DOMOutputImpl.java
pache/xml/serializer/dom3/DOMStringListImpl.java
pache/xml/serializer/dom3/LSSerializerImpl.java
pache/xml/serializer/dom3/NamespaceSupport.java
pache/xml/serializer/output_html.properties
pache/xml/serializer/output_text.properties
pache/xml/serializer/output_unknown.properties
pache/xml/serializer/output_xml.properties
pache/xml/serializer/package.html
pache/xml/serializer/utils/AttList.java
pache/xml/serializer/utils/DOM2Helper.java
pache/xml/serializer/utils/Messages.java
pache/xml/serializer/utils/MsgKey.java
pache/xml/serializer/utils/SerializerMessages.java
pache/xml/serializer/utils/SerializerMessages_ca.java
pache/xml/serializer/utils/SerializerMessages_cs.java
pache/xml/serializer/utils/SerializerMessages_de.java
pache/xml/serializer/utils/SerializerMessages_en.java
pache/xml/serializer/utils/SerializerMessages_es.java
pache/xml/serializer/utils/SerializerMessages_fr.java
pache/xml/serializer/utils/SerializerMessages_hu.java
pache/xml/serializer/utils/SerializerMessages_it.java
pache/xml/serializer/utils/SerializerMessages_ja.java
pache/xml/serializer/utils/SerializerMessages_ko.java
pache/xml/serializer/utils/SerializerMessages_pl.java
pache/xml/serializer/utils/SerializerMessages_pt_BR.java
pache/xml/serializer/utils/SerializerMessages_ru.java
pache/xml/serializer/utils/SerializerMessages_sk.java
pache/xml/serializer/utils/SerializerMessages_sl.java
pache/xml/serializer/utils/SerializerMessages_sv.java
pache/xml/serializer/utils/SerializerMessages_tr.java
pache/xml/serializer/utils/SerializerMessages_zh.java
pache/xml/serializer/utils/SerializerMessages_zh_CN.java
pache/xml/serializer/utils/SerializerMessages_zh_TW.java
pache/xml/serializer/utils/StringToIntTable.java
pache/xml/serializer/utils/SystemIDResolver.java
pache/xml/serializer/utils/URI.java
pache/xml/serializer/utils/Utils.java
pache/xml/serializer/utils/WrappedRuntimeException.java
pache/xml/serializer/utils/XML11Char.java
pache/xml/serializer/utils/XMLChar.java
pache/xml/utils/AttList.java
pache/xml/utils/BoolStack.java
pache/xml/utils/Constants.java
pache/xml/utils/DOM2Helper.java
pache/xml/utils/DOMBuilder.java
pache/xml/utils/DOMHelper.java
pache/xml/utils/DOMOrder.java
pache/xml/utils/DefaultErrorHandler.java
pache/xml/utils/FastStringBuffer.java
pache/xml/utils/IntStack.java
pache/xml/utils/IntVector.java
pache/xml/utils/NSInfo.java
pache/xml/utils/NameSpace.java
pache/xml/utils/NamespaceSupport2.java
pache/xml/utils/NodeConsumer.java
pache/xml/utils/NodeVector.java
pache/xml/utils/ObjectFactory.java
pache/xml/utils/ObjectPool.java
pache/xml/utils/ObjectStack.java
pache/xml/utils/ObjectVector.java
pache/xml/utils/PrefixResolver.java
pache/xml/utils/PrefixResolverDefault.java
pache/xml/utils/QName.java
pache/xml/utils/SAXSourceLocator.java
pache/xml/utils/SecuritySupport.java
pache/xml/utils/SecuritySupport12.java
pache/xml/utils/StopParseException.java
pache/xml/utils/StringBufferPool.java
pache/xml/utils/StringToIntTable.java
pache/xml/utils/StringVector.java
pache/xml/utils/StylesheetPIHandler.java
pache/xml/utils/SuballocatedIntVector.java
pache/xml/utils/SystemIDResolver.java
pache/xml/utils/ThreadControllerWrapper.java
pache/xml/utils/TreeWalker.java
pache/xml/utils/URI.java
pache/xml/utils/UnImplNode.java
pache/xml/utils/WrappedRuntimeException.java
pache/xml/utils/XML11Char.java
pache/xml/utils/XMLChar.java
pache/xml/utils/XMLCharacterRecognizer.java
pache/xml/utils/XMLReaderManager.java
pache/xml/utils/XMLString.java
pache/xml/utils/XMLStringDefault.java
pache/xml/utils/XMLStringFactory.java
pache/xml/utils/package.html
pache/xml/utils/res/CharArrayWrapper.java
pache/xml/utils/res/IntArrayWrapper.java
pache/xml/utils/res/LongArrayWrapper.java
pache/xml/utils/res/StringArrayWrapper.java
pache/xml/utils/res/XResourceBundle.java
pache/xml/utils/res/XResourceBundleBase.java
pache/xml/utils/res/XResources_cy.java
pache/xml/utils/res/XResources_de.java
pache/xml/utils/res/XResources_el.java
pache/xml/utils/res/XResources_en.java
pache/xml/utils/res/XResources_es.java
pache/xml/utils/res/XResources_fr.java
pache/xml/utils/res/XResources_he.java
pache/xml/utils/res/XResources_hy.java
pache/xml/utils/res/XResources_it.java
pache/xml/utils/res/XResources_ja_JP_A.java
pache/xml/utils/res/XResources_ja_JP_HA.java
pache/xml/utils/res/XResources_ja_JP_HI.java
pache/xml/utils/res/XResources_ja_JP_I.java
pache/xml/utils/res/XResources_ka.java
pache/xml/utils/res/XResources_ko.java
pache/xml/utils/res/XResources_sv.java
pache/xml/utils/res/XResources_zh_CN.java
pache/xml/utils/res/XResources_zh_TW.java
pache/xpath/Arg.java
pache/xpath/CachedXPathAPI.java
pache/xpath/Expression.java
pache/xpath/ExpressionNode.java
pache/xpath/ExpressionOwner.java
pache/xpath/ExtensionsProvider.java
pache/xpath/FoundIndex.java
pache/xpath/NodeSet.java
pache/xpath/NodeSetDTM.java
pache/xpath/SourceTree.java
pache/xpath/SourceTreeManager.java
pache/xpath/VariableStack.java
pache/xpath/WhitespaceStrippingElementMatcher.java
pache/xpath/XPath.java
pache/xpath/XPathAPI.java
pache/xpath/XPathContext.java
pache/xpath/XPathException.java
pache/xpath/XPathFactory.java
pache/xpath/XPathProcessorException.java
pache/xpath/XPathVisitable.java
pache/xpath/XPathVisitor.java
pache/xpath/axes/AttributeIterator.java
pache/xpath/axes/AxesWalker.java
pache/xpath/axes/BasicTestIterator.java
pache/xpath/axes/ChildIterator.java
pache/xpath/axes/ChildTestIterator.java
pache/xpath/axes/ContextNodeList.java
pache/xpath/axes/DescendantIterator.java
pache/xpath/axes/FilterExprIterator.java
pache/xpath/axes/FilterExprIteratorSimple.java
pache/xpath/axes/FilterExprWalker.java
pache/xpath/axes/HasPositionalPredChecker.java
pache/xpath/axes/IteratorPool.java
pache/xpath/axes/LocPathIterator.java
pache/xpath/axes/MatchPatternIterator.java
pache/xpath/axes/NodeSequence.java
pache/xpath/axes/OneStepIterator.java
pache/xpath/axes/OneStepIteratorForward.java
pache/xpath/axes/PathComponent.java
pache/xpath/axes/PredicatedNodeTest.java
pache/xpath/axes/RTFIterator.java
pache/xpath/axes/ReverseAxesWalker.java
pache/xpath/axes/SelfIteratorNoPredicate.java
pache/xpath/axes/SubContextList.java
pache/xpath/axes/UnionChildIterator.java
pache/xpath/axes/UnionPathIterator.java
pache/xpath/axes/WalkerFactory.java
pache/xpath/axes/WalkingIterator.java
pache/xpath/axes/WalkingIteratorSorted.java
pache/xpath/axes/package.html
pache/xpath/compiler/Compiler.java
pache/xpath/compiler/FunctionTable.java
pache/xpath/compiler/Keywords.java
pache/xpath/compiler/Lexer.java
pache/xpath/compiler/OpCodes.java
pache/xpath/compiler/OpMap.java
pache/xpath/compiler/OpMapVector.java
pache/xpath/compiler/PsuedoNames.java
pache/xpath/compiler/XPathDumper.java
pache/xpath/compiler/XPathParser.java
pache/xpath/compiler/package.html
pache/xpath/domapi/XPathStylesheetDOM3Exception.java
pache/xpath/functions/FuncBoolean.java
pache/xpath/functions/FuncCeiling.java
pache/xpath/functions/FuncConcat.java
pache/xpath/functions/FuncContains.java
pache/xpath/functions/FuncCount.java
pache/xpath/functions/FuncCurrent.java
pache/xpath/functions/FuncDoclocation.java
pache/xpath/functions/FuncExtElementAvailable.java
pache/xpath/functions/FuncExtFunction.java
pache/xpath/functions/FuncExtFunctionAvailable.java
pache/xpath/functions/FuncFalse.java
pache/xpath/functions/FuncFloor.java
pache/xpath/functions/FuncGenerateId.java
pache/xpath/functions/FuncId.java
pache/xpath/functions/FuncLang.java
pache/xpath/functions/FuncLast.java
pache/xpath/functions/FuncLocalPart.java
pache/xpath/functions/FuncNamespace.java
pache/xpath/functions/FuncNormalizeSpace.java
pache/xpath/functions/FuncNot.java
pache/xpath/functions/FuncNumber.java
pache/xpath/functions/FuncPosition.java
pache/xpath/functions/FuncQname.java
pache/xpath/functions/FuncRound.java
pache/xpath/functions/FuncStartsWith.java
pache/xpath/functions/FuncString.java
pache/xpath/functions/FuncStringLength.java
pache/xpath/functions/FuncSubstring.java
pache/xpath/functions/FuncSubstringAfter.java
pache/xpath/functions/FuncSubstringBefore.java
pache/xpath/functions/FuncSum.java
pache/xpath/functions/FuncSystemProperty.java
pache/xpath/functions/FuncTranslate.java
pache/xpath/functions/FuncTrue.java
pache/xpath/functions/FuncUnparsedEntityURI.java
pache/xpath/functions/Function.java
pache/xpath/functions/Function2Args.java
pache/xpath/functions/Function3Args.java
pache/xpath/functions/FunctionDef1Arg.java
pache/xpath/functions/FunctionMultiArgs.java
pache/xpath/functions/FunctionOneArg.java
pache/xpath/functions/ObjectFactory.java
pache/xpath/functions/SecuritySupport.java
pache/xpath/functions/SecuritySupport12.java
pache/xpath/functions/WrongNumberArgsException.java
pache/xpath/functions/package.html
pache/xpath/jaxp/JAXPExtensionsProvider.java
pache/xpath/jaxp/JAXPPrefixResolver.java
pache/xpath/jaxp/JAXPVariableStack.java
pache/xpath/jaxp/XPathExpressionImpl.java
pache/xpath/jaxp/XPathFactoryImpl.java
pache/xpath/jaxp/XPathImpl.java
pache/xpath/objects/DTMXRTreeFrag.java
pache/xpath/objects/XBoolean.java
pache/xpath/objects/XBooleanStatic.java
pache/xpath/objects/XMLStringFactoryImpl.java
pache/xpath/objects/XNodeSet.java
pache/xpath/objects/XNodeSetForDOM.java
pache/xpath/objects/XNull.java
pache/xpath/objects/XNumber.java
pache/xpath/objects/XObject.java
pache/xpath/objects/XObjectFactory.java
pache/xpath/objects/XRTreeFrag.java
pache/xpath/objects/XRTreeFragSelectWrapper.java
pache/xpath/objects/XString.java
pache/xpath/objects/XStringForChars.java
pache/xpath/objects/XStringForFSB.java
pache/xpath/objects/package.html
pache/xpath/operations/And.java
pache/xpath/operations/Bool.java
pache/xpath/operations/Div.java
pache/xpath/operations/Equals.java
pache/xpath/operations/Gt.java
pache/xpath/operations/Gte.java
pache/xpath/operations/Lt.java
pache/xpath/operations/Lte.java
pache/xpath/operations/Minus.java
pache/xpath/operations/Mod.java
pache/xpath/operations/Mult.java
pache/xpath/operations/Neg.java
pache/xpath/operations/NotEquals.java
pache/xpath/operations/Number.java
pache/xpath/operations/Operation.java
pache/xpath/operations/Or.java
pache/xpath/operations/Plus.java
pache/xpath/operations/Quo.java
pache/xpath/operations/String.java
pache/xpath/operations/UnaryOperation.java
pache/xpath/operations/Variable.java
pache/xpath/operations/VariableSafeAbsRef.java
pache/xpath/operations/package.html
pache/xpath/package.html
pache/xpath/patterns/ContextMatchStepPattern.java
pache/xpath/patterns/FunctionPattern.java
pache/xpath/patterns/NodeTest.java
pache/xpath/patterns/NodeTestFilter.java
pache/xpath/patterns/StepPattern.java
pache/xpath/patterns/UnionPattern.java
pache/xpath/patterns/package.html
pache/xpath/res/XPATHErrorResources.java
pache/xpath/res/XPATHMessages.java
pache/xpath/res/package.html
3c/dom/Attr.java
3c/dom/CDATASection.java
3c/dom/CharacterData.java
3c/dom/Comment.java
3c/dom/DOMConfiguration.java
3c/dom/DOMError.java
3c/dom/DOMErrorHandler.java
3c/dom/DOMException.java
3c/dom/DOMImplementation.java
3c/dom/DOMImplementationList.java
3c/dom/DOMImplementationSource.java
3c/dom/DOMLocator.java
3c/dom/DOMStringList.java
3c/dom/Document.java
3c/dom/DocumentFragment.java
3c/dom/DocumentType.java
3c/dom/Element.java
3c/dom/Entity.java
3c/dom/EntityReference.java
3c/dom/NameList.java
3c/dom/NamedNodeMap.java
3c/dom/Node.java
3c/dom/NodeList.java
3c/dom/Notation.java
3c/dom/ProcessingInstruction.java
3c/dom/Text.java
3c/dom/TypeInfo.java
3c/dom/UserDataHandler.java
3c/dom/ls/DOMImplementationLS.java
3c/dom/ls/LSException.java
3c/dom/ls/LSInput.java
3c/dom/ls/LSOutput.java
3c/dom/ls/LSParser.java
3c/dom/ls/LSParserFilter.java
3c/dom/ls/LSResourceResolver.java
3c/dom/ls/LSSerializer.java
3c/dom/ls/LSSerializerFilter.java
3c/dom/package.html
3c/dom/traversal/NodeFilter.java
3c/dom/traversal/NodeIterator.java
ml/sax/AttributeList.java
ml/sax/Attributes.java
ml/sax/ContentHandler.java
ml/sax/DTDHandler.java
ml/sax/DocumentHandler.java
ml/sax/EntityResolver.java
ml/sax/ErrorHandler.java
ml/sax/HandlerBase.java
ml/sax/InputSource.java
ml/sax/Locator.java
ml/sax/Parser.java
ml/sax/SAXException.java
ml/sax/SAXNotRecognizedException.java
ml/sax/SAXNotSupportedException.java
ml/sax/SAXParseException.java
ml/sax/XMLFilter.java
ml/sax/XMLReader.java
ml/sax/ext/Attributes2.java
ml/sax/ext/Attributes2Impl.java
ml/sax/ext/DeclHandler.java
ml/sax/ext/DefaultHandler2.java
ml/sax/ext/EntityResolver2.java
ml/sax/ext/LexicalHandler.java
ml/sax/ext/Locator2.java
ml/sax/ext/Locator2Impl.java
ml/sax/ext/package.html
ml/sax/helpers/AttributeListImpl.java
ml/sax/helpers/AttributesImpl.java
ml/sax/helpers/DefaultHandler.java
ml/sax/helpers/LocatorImpl.java
ml/sax/helpers/NamespaceSupport.java
ml/sax/helpers/NewInstance.java
ml/sax/helpers/ParserAdapter.java
ml/sax/helpers/ParserFactory.java
ml/sax/helpers/XMLFilterImpl.java
ml/sax/helpers/XMLReaderAdapter.java
ml/sax/helpers/XMLReaderFactory.java
ml/sax/helpers/package.html
ml/sax/package.html
252299f5206edf81e208f368deef054c464e9d2e 04-May-2010 Elliott Hughes <enh@google.com> Merge "Fix IPv6 multicast TTLs." into dalvik-dev
4401c75ac7d85da33472d0398d8166df6ce4beb5 04-May-2010 Elliott Hughes <enh@google.com> Fix IPv6 multicast TTLs.

There's a Linux kernel bug we need to work-around for now. This patch adds that
workaround and tidies up the getSocketOption implementation.

This also fixes a bug I introduced in the last patch where setSocketOption
would reject InetAddress parameters.

Change-Id: Ie309b693520fed8306d346d5b4492c42e8967721
pache/harmony/luni/net/PlainDatagramSocketImpl.java
f4c62bce9efbba1ded656acacb0695694a16d309 04-May-2010 Brian Carlstrom <bdc@google.com> Merge "OpenSSLSocket handshake overhaul" into dalvik-dev
bcfb325d5b1f9529b439cc0805a1c140521510f7 02-May-2010 Brian Carlstrom <bdc@google.com> OpenSSLSocket handshake overhaul

Summary:
- SSLSocket.startHandshake now generalized to handle both client and
server handshaking as well as client/server role reversal
- handshake_cutthrough.patch is properly integrated with support
delayed handshake completion now integrated with delayed updates to
session cache and callbacks to HandshakeCompletedListeners
- Many fixes to SSLSession, which is the end product of the handshake
- Generally more RI and SSLEngine compliant behavior.
- More native code deletion through unification of client/server
handshake, unification of client/server certificate chain
verification, etc. More native code moved from various OpenSSL
classes to cleaner NativeCrypto interfaces that more directly mirror
the OpenSSL interfaces.

Details:

Delay SSL_new call until handshake time when we know for sure whether
the OpenSSLSocket will be used in client or server mode and we can
allocate the SSL_new from the apppriate client or server SSL_CTX used
for session caching.

Now that no SSL is allocated for an OpenSSLServerSocketImpl,
store enabledProtocols and enabledCipherSuites in instance String
arrays. Use new NativeCrypto.checkEnabled* methdods for argument
validation. OpenSSLServerSocketImpl passes these enabled arrays to
a new OpenSSLSocket constructor during accept(). Removed finalizer
from OpenSSLServerSocketImpl since it no longer has any native
storage and socket is already closed by PlainSocketImpl finalizer.

X-net/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLServerSocketImpl.java
x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

OpenSSLSocket major overhaul to properly implement handshaking
including switching client and server roles and session ID caching
with handshake_cutthrough.patch.
- now implements NativeCrypto.HandshakeCompletedListeners for
properly timed callback when handshake_cutthrough.patch delays
handshake completion until first SSLSocket.getInputStream()
read.
- similar enabledProtocols/enabledCipherSuites changes as
OpenSSLServerSocketImpl since we need to store the state
somewhere other than an openssl SSL struct until we are sure if
we are doing a client or server handshake.
- added handshake completed field so that startHandshake can tell
if handshake was completed during SSL_do_handshake or will be
completed later by a call to HandshakeCompletedCallback.handshakeCompleted.
- removed nativegetsession as the equivalent value is now returned by SSL_do_handshake
- removed nativecipherauthenticationmethod as the value is now passed to verifyCertificateChain
- startHandshake is now a wrapper that forces a fully synchronous handshake
- startHandshake(boolean) is the the most changed method in this
changelist, combinding both the old startHandshake logic, but
also the OpenSSLSocketImpl.accept code as well. Notable
differences from the old code:
* now responsible for SSL_new
* single code path for client/server handshaking dealing with SSLSession caching
* now handles server certificate requests previously in
OpenSSLServerSocketImpl, since a client can request to act
like a server and therefore need to be able to make suck
demands on its peer.
* supports turning off handshake_cutthrough at a callers request
via explicit call to startHandshake()
* certificate verification happens during an upcall from openssl
during SSL_do_handshake to verifyCertificateChain for both
client and server cases. previously there was not quite right
upcall support on the server side and post-handshake checking
on the client, which did not allow for a proper alert to be
sent to the peer informing them of the issue, which the RI and
SSLEngine code do.
* Similarly, setEnableSessionCreation(false) did not send an
alert to the peer as the RI and SSLEngine code in the client
case. In the server case, nothing was previously done.
* The use of local certificates was not determined from
introspecting the SSL struct post-handshake. This is now
partially implemented and will be completed in a later change.
- SSLSocket.{shutdownInput,shutdownOutput} are now restored to the
proper behavior of throwing UnsupportedOperationException.
- Gutted OpenSSLSocketImpl finalizer. The comment explains in
detail the trouble of having the finalizer do anything more than
touch its the instances own state due to unpredictable order of
finalization and the future possability of parallel
finalization.

x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

SSLSession fixes
- Made OpenSSLSessionImpl.sessionContext non-final so it could be
nulled by SSLSession.invalidate to match RI behavior.
- As noted in AbstractSessionContext discussion, removed
OpenSSLSessionImpl constructor that took SSLParameters, instead
we take the possibly null localCertificates
directly. OpenSSLSessionImpl.getLocalCertificates now simply
returns the localCertificates member variable instead of
incorrectly trying to query the KeyManager for certificates that
may not have been used.
- OpenSSLSessionImpl now caches its native ID to avoid numerious
native calls but also now provides as resetId which will update
the cache when a delayed handshake happens due to the
handshake_cutthrough.patch
- Fixed bug in getPeerPrincipal that it wasn't calling
getPeerCertificates to initialize peerCertificates field.
- freeImpl is now 'public static' in preparation for move to NativeCrypto.

x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSessionImpl.java

The old SSLSessionImpl class that is still used for representing
the invalid session now returns
isValid => false
and
getProtocol => "NONE"
to match the RI.

x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSessionImpl.java

NativeCrypto improvements
- Adding NativeCrypto.SSL_{get,set,clear}_mode similar to
NativeCrypto.SSL_{get,set,clear}_options along with
SSL_MODE_HANDSHAKE_CUTTHROUGH constant which is used to
explicitly disable/enable the Android handshake_cutthrough.patch
behavior.
- Added missing NativeCrypto.SSL_clear_options and used to properly
implement NativeCrypto.setEnabledProtocols.
- Added NativeCrypto.checkEnabledProtocols and
NativeCrypto.checkEnabledCipherSuites helpers to implement
exception compatability with the RI. While some of this code is
refactored from existing NativeCrypto code, it is now also used
by OpenSSLServerSocketImpl and OpenSSLSocketImpl which maintain
their own String[]s of what is enabled until startHandshake time. (see below)
- Changed NativeCrypto.findSuite to use foreach style loop for clarity.
- Moved OpenSSLServerSocketImpl nativesetclientauth and
SSL_VERIFY_* constants to NativeCrypto.SSL_set_verify
- Added NativeCrypto.SSL_set_session based on part of old OpenSSLSocketImpl.nativeconnect
- Added NativeCrypto.SSL_set_session_creation_enabled to properly implement
SSLSocket.setEnableSessionCreation(false) which uses new
external/openssl/patches/jsse.patch functionality.
- New NativeCrypto.SSL_do_handshake consolidates
OpenSSLSocketImpl.{nativeconnect, nativeaccept} while properly
implementing SSLSocket.setUseClientMode(false) for clients and
SSLSocket.setUseClientMode(true) for servers.
- New NativeCrypto.SSL_get_certificate is determine if local
certificate requested by peer. While functional, currently
NativeCrypto.SSL_new always sets a value via SSL_use_certificate
instead of relying on a callback set via SSL_CTX_set_client_cert_cb.
- Changed NativeCrypto.CertificateChainVerifier.verifyCertificateChain
to throw a checked CertificateException to match TrustManager.{checkServerTrusted,
checkClientTrusted}. It also takes an authMethod so avoid the need to call
the old OpenSSLSocketImpl.nativecipherauthenticationmethod.
- Added NativeCrypto.HandshakeCompletedCallback which has its
handshakeCompleted method called from OpenSSL when the now
delayed handshake_cutthrough.patch handshake is completed so
SSLSession caching can be delayed until a session ID is available
and to provide a better time for HandshakeCompletedListeners to
be notified.

x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java
x-net/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp

Some other changes specific to the naitve side of the code
- Added JNITRACE calls (enabled at compile time with JNI_TRACE)
for future debugging.
- throw SSLException subclass of IOException instead IOException
itself for better RI compatability
x-net/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp
- changed from old struct app_data to new class AppData at enh's request

Remove dubious usage of SSLParameters within AbstractSessionContext
to pass through to OpenSSLSessionImpl constructor for use in
calling getLocalCertificates for sessions created from a byte array
with AbstractSessionContext.toSession. Our
AbstractSessionContext.toBytes doesn't currently include the local
certificates in its output, so it cannot be expected to have in toSession.

x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/AbstractSessionContext.java
x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientSessionContext.java
x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerSessionContext.java
x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLParameters.java

Test maintenance

openssl 1.0.0 adds support for RFC 4507 session tickets which
remove the need for server side session state. These tests needed
to be updated for this new behavior. If IS_RI is true, they still
follow the old behavior.

luni/src/test/java/javax/net/ssl/SSLSessionContextTest.java
luni/src/test/java/javax/net/ssl/SSLSessionTest.java
luni/src/test/java/javax/net/ssl/SSLSocketTest.java

Update KnownFailures and add specific comments at point of failure
about what remains to be fixed.

luni/src/test/java/javax/net/ssl/SSLSessionTest.java

Added tests to cover the use of standard cipher suite
names. Historically Android has used OpenSSL string constants for
cipher suite names, but JSSE actually specifies supported and
expected names.

luni/src/test/java/javax/net/ssl/SSLSocketFactoryTest.java
luni/src/test/java/javax/net/ssl/SSLSocketTest.java

Create new support/src/test/java/javax/net/ssl with old Helper
support code pulled from javax.net.ssl tests:
SSLContextTest.Helper -> TestSSLContext
SSLSocketTest.Helper -> TestSSLSocketPair
SSLSessionTest.Helper -> TestSSLSessions
Also added new StandardNames here, which contains a collection of
expected constants for test validation.

luni/src/test/java/javax/net/ssl/SSLContextTest.java
luni/src/test/java/javax/net/ssl/SSLSocketTest.java
luni/src/test/java/javax/net/ssl/SSLSessionTest.java
support/src/test/java/javax/net/ssl/TestSSLContext.java
support/src/test/java/javax/net/ssl/TestSSLSocketPair.java
support/src/test/java/javax/net/ssl/TestSSLSessions.java
support/src/test/java/javax/net/ssl/StandardNames.java

Removed some now fixed KnownFailures and unneeded !IS_RI
code. Marked some [Un]KnownFailures where exceptions are thrown
and visible in the output but aren't correctly causing the test to
fail. Fixed assertNonNull to assertTrue in
test_SSLSocketTest_Test_create. Added
stress_test_SSLSocketTest_Test_create to track down test
flakiness, leading to rewrite of SSLSocket finalization.

luni/src/test/java/javax/net/ssl/SSLSocketTest.java

Reenable javax.net.ssl.AllTests now that it is does not hang

luni/src/test/java/tests/AllTests.java

Improve error messages while debugging overflow problem.
Added new assert when debugging new RFC 4507 behavior.
Removed KnownFailure annotation for now working test case.
x-net/src/test/java/tests/api/javax/net/ssl/SSLSessionTest.java

Client code changes

Now that startHandshake implies synchronous vs Android's default async handshake, remove unneeded explict calls to SSLSocket.startHandshake

luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java

Removed IBM 1.4.x codepath that involved startHandshake

x-net/src/main/java/javax/net/ssl/DefaultHostnameVerifier.java

Unrelated

Remove unneed SSLSocket.setUseClientMode while removing unneeded SSLSocket.startHandshake

luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java

Removed warnings due to now missing modules in classpath

run-core-tests

Change-Id: I6e149ae259b3feccdfb0673209c85cfeb60befc8
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
4d8e9333e494ceedff074def3b6e44f523f3830e 03-May-2010 Elliott Hughes <enh@google.com> Fix MulticastSocket.setTTL.

Fixes two jtreg failures. I assumed the problem was with the native code, so I
simplified that until I'd convinced myself it was now correct. Then I found a
sign-extension bug in the Java side.

Change-Id: I398cecbe8e9245cb45c27f35eff3a0cd2995394e
pache/harmony/luni/net/PlainDatagramSocketImpl.java
385ee6370db97d951fdd9708ab85ba345bf68981 01-May-2010 repo sync <enh@google.com> resolved conflicts for merge of f3565212 to froyo-plus-aosp

Change-Id: I2c1dacb28eefd2c57f798dabc9fdc23b3b9ff0dc
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
33088caf672e6f3a3b8da66460f57c6433e491a8 28-Apr-2010 Elliott Hughes <enh@google.com> Remove almost all of the temporary allocations.

The main source of garbage when running the tests is now
OutputStream.write(int)'s creation of temporary single-byte byte arrays, but
no performance-conscious caller should be using that. In sensible cases, we
now produce very little garbage.

Change-Id: I13b5c8aef9a48c6aca33b039af2b13d5613a5f05
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
fe0dabac54c0bada280a15fb9b499a084b837e86 28-Apr-2010 Elliott Hughes <enh@google.com> Merge "Fix HttpURLConnection.setFixedLengthStreamingMode." into dalvik-dev
02f0cb2eb84a112fcf644d7d1fd0b5f94ea2f03b 28-Apr-2010 Elliott Hughes <enh@google.com> Fix HttpURLConnection.setFixedLengthStreamingMode.

Add better testing of chunked and fixed-length modes, and fix fixed-length mode
so it doesn't try to buffer all the output (which is the last thing you want
because the only point of that mode is to explicitly disable as much buffering
as possible).

Bug: http://code.google.com/p/android/issues/detail?id=3164
Change-Id: Ie0adc374b9c8093ab55211222cec0eeab0e27e96
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
cec4dd4b1d33f78997603d0f89c0d0e56e64dbcd 26-Apr-2010 Peter Hallam <peterhal@google.com> merge more modules into luni
pache/harmony/archive/internal/nls/Messages.java
pache/harmony/archive/internal/nls/messages.properties
pache/harmony/archive/util/Util.java
pache/harmony/auth/internal/nls/Messages.java
pache/harmony/auth/internal/nls/messages.properties
pache/harmony/crypto/internal/NullCipherSpi.java
pache/harmony/crypto/internal/nls/Messages.java
pache/harmony/crypto/internal/nls/messages.properties
pache/harmony/security/DefaultPolicyScanner.java
pache/harmony/security/PolicyEntry.java
pache/harmony/security/PrivateKeyImpl.java
pache/harmony/security/PublicKeyImpl.java
pache/harmony/security/SystemScope.java
pache/harmony/security/UnresolvedPrincipal.java
pache/harmony/security/Util.java
pache/harmony/security/asn1/ASN1Any.java
pache/harmony/security/asn1/ASN1BitString.java
pache/harmony/security/asn1/ASN1Boolean.java
pache/harmony/security/asn1/ASN1Choice.java
pache/harmony/security/asn1/ASN1Constants.java
pache/harmony/security/asn1/ASN1Constructured.java
pache/harmony/security/asn1/ASN1Enumerated.java
pache/harmony/security/asn1/ASN1Exception.java
pache/harmony/security/asn1/ASN1Explicit.java
pache/harmony/security/asn1/ASN1GeneralizedTime.java
pache/harmony/security/asn1/ASN1Implicit.java
pache/harmony/security/asn1/ASN1Integer.java
pache/harmony/security/asn1/ASN1OctetString.java
pache/harmony/security/asn1/ASN1Oid.java
pache/harmony/security/asn1/ASN1OpenType.java
pache/harmony/security/asn1/ASN1Primitive.java
pache/harmony/security/asn1/ASN1Sequence.java
pache/harmony/security/asn1/ASN1SequenceOf.java
pache/harmony/security/asn1/ASN1Set.java
pache/harmony/security/asn1/ASN1SetOf.java
pache/harmony/security/asn1/ASN1StringType.java
pache/harmony/security/asn1/ASN1Time.java
pache/harmony/security/asn1/ASN1Type.java
pache/harmony/security/asn1/ASN1TypeCollection.java
pache/harmony/security/asn1/ASN1UTCTime.java
pache/harmony/security/asn1/ASN1ValueCollection.java
pache/harmony/security/asn1/BerInputStream.java
pache/harmony/security/asn1/BerOutputStream.java
pache/harmony/security/asn1/BitString.java
pache/harmony/security/asn1/DerInputStream.java
pache/harmony/security/asn1/DerOutputStream.java
pache/harmony/security/asn1/InformationObjectSet.java
pache/harmony/security/asn1/ObjectIdentifier.java
pache/harmony/security/fortress/DefaultPolicy.java
pache/harmony/security/fortress/DefaultPolicyParser.java
pache/harmony/security/fortress/Engine.java
pache/harmony/security/fortress/PolicyUtils.java
pache/harmony/security/fortress/SecurityAccess.java
pache/harmony/security/fortress/SecurityUtils.java
pache/harmony/security/fortress/Services.java
pache/harmony/security/internal/nls/Messages.java
pache/harmony/security/internal/nls/messages.properties
pache/harmony/security/pkcs10/CertificationRequest.java
pache/harmony/security/pkcs10/CertificationRequestInfo.java
pache/harmony/security/pkcs7/AuthenticatedAttributes.java
pache/harmony/security/pkcs7/ContentInfo.java
pache/harmony/security/pkcs7/SignedData.java
pache/harmony/security/pkcs7/SignerInfo.java
pache/harmony/security/pkcs8/PrivateKeyInfo.java
pache/harmony/security/provider/cert/Cache.java
pache/harmony/security/provider/cert/DRLCertFactory.java
pache/harmony/security/provider/cert/X509CRLEntryImpl.java
pache/harmony/security/provider/cert/X509CRLImpl.java
pache/harmony/security/provider/cert/X509CertFactoryImpl.java
pache/harmony/security/provider/cert/X509CertImpl.java
pache/harmony/security/provider/cert/X509CertPathImpl.java
pache/harmony/security/provider/crypto/CryptoProvider.java
pache/harmony/security/provider/crypto/DSAKeyFactoryImpl.java
pache/harmony/security/provider/crypto/DSAPrivateKeyImpl.java
pache/harmony/security/provider/crypto/DSAPublicKeyImpl.java
pache/harmony/security/provider/crypto/RandomBitsSupplier.java
pache/harmony/security/provider/crypto/SHA1Impl.java
pache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java
pache/harmony/security/provider/crypto/SHA1_Data.java
pache/harmony/security/provider/crypto/SHA1_MessageDigestImpl.java
pache/harmony/security/provider/crypto/SHA1withDSA_SignatureImpl.java
pache/harmony/security/provider/crypto/ThreeIntegerSequence.java
pache/harmony/security/utils/AlgNameMapper.java
pache/harmony/security/utils/Array.java
pache/harmony/security/utils/JarUtils.java
pache/harmony/security/utils/ObjectIdentifier.java
pache/harmony/security/x501/AttributeType.java
pache/harmony/security/x501/AttributeTypeAndValue.java
pache/harmony/security/x501/AttributeTypeAndValueComparator.java
pache/harmony/security/x501/AttributeValue.java
pache/harmony/security/x501/Attributes.java
pache/harmony/security/x501/DirectoryString.java
pache/harmony/security/x501/Name.java
pache/harmony/security/x509/AccessDescription.java
pache/harmony/security/x509/AlgorithmIdentifier.java
pache/harmony/security/x509/AlternativeName.java
pache/harmony/security/x509/AuthorityKeyIdentifier.java
pache/harmony/security/x509/BasicConstraints.java
pache/harmony/security/x509/CRLDistributionPoints.java
pache/harmony/security/x509/CRLNumber.java
pache/harmony/security/x509/Certificate.java
pache/harmony/security/x509/CertificateIssuer.java
pache/harmony/security/x509/CertificateList.java
pache/harmony/security/x509/CertificatePolicies.java
pache/harmony/security/x509/DNParser.java
pache/harmony/security/x509/DistributionPoint.java
pache/harmony/security/x509/DistributionPointName.java
pache/harmony/security/x509/EDIPartyName.java
pache/harmony/security/x509/ExtendedKeyUsage.java
pache/harmony/security/x509/Extension.java
pache/harmony/security/x509/ExtensionValue.java
pache/harmony/security/x509/Extensions.java
pache/harmony/security/x509/GeneralName.java
pache/harmony/security/x509/GeneralNames.java
pache/harmony/security/x509/GeneralSubtree.java
pache/harmony/security/x509/GeneralSubtrees.java
pache/harmony/security/x509/InfoAccessSyntax.java
pache/harmony/security/x509/InhibitAnyPolicy.java
pache/harmony/security/x509/InvalidityDate.java
pache/harmony/security/x509/IssuingDistributionPoint.java
pache/harmony/security/x509/KeyUsage.java
pache/harmony/security/x509/NameConstraints.java
pache/harmony/security/x509/ORAddress.java
pache/harmony/security/x509/OtherName.java
pache/harmony/security/x509/PolicyConstraints.java
pache/harmony/security/x509/PolicyInformation.java
pache/harmony/security/x509/PolicyQualifierInfo.java
pache/harmony/security/x509/PrivateKeyUsagePeriod.java
pache/harmony/security/x509/ReasonCode.java
pache/harmony/security/x509/ReasonFlags.java
pache/harmony/security/x509/SubjectKeyIdentifier.java
pache/harmony/security/x509/SubjectPublicKeyInfo.java
pache/harmony/security/x509/TBSCertList.java
pache/harmony/security/x509/TBSCertificate.java
pache/harmony/security/x509/Time.java
pache/harmony/security/x509/Utils.java
pache/harmony/security/x509/Validity.java
pache/harmony/security/x509/X509PublicKey.java
pache/harmony/security/x509/tsp/MessageImprint.java
pache/harmony/security/x509/tsp/PKIFailureInfo.java
pache/harmony/security/x509/tsp/PKIStatus.java
pache/harmony/security/x509/tsp/PKIStatusInfo.java
pache/harmony/security/x509/tsp/TSTInfo.java
pache/harmony/security/x509/tsp/TimeStampReq.java
pache/harmony/security/x509/tsp/TimeStampResp.java
pache/harmony/text/BidiRun.java
pache/harmony/text/BidiWrapper.java
ouncycastle/asn1/ASN1Choice.java
ouncycastle/asn1/ASN1Collection.java
ouncycastle/asn1/ASN1Encodable.java
ouncycastle/asn1/ASN1EncodableVector.java
ouncycastle/asn1/ASN1InputStream.java
ouncycastle/asn1/ASN1Null.java
ouncycastle/asn1/ASN1OctetString.java
ouncycastle/asn1/ASN1OutputStream.java
ouncycastle/asn1/ASN1Sequence.java
ouncycastle/asn1/ASN1Set.java
ouncycastle/asn1/ASN1TaggedObject.java
ouncycastle/asn1/BERConstructedOctetString.java
ouncycastle/asn1/BERConstructedSequence.java
ouncycastle/asn1/BERInputStream.java
ouncycastle/asn1/BERNull.java
ouncycastle/asn1/BEROutputStream.java
ouncycastle/asn1/BERSequence.java
ouncycastle/asn1/BERSet.java
ouncycastle/asn1/BERTaggedObject.java
ouncycastle/asn1/DERApplicationSpecific.java
ouncycastle/asn1/DERBMPString.java
ouncycastle/asn1/DERBitString.java
ouncycastle/asn1/DERBoolean.java
ouncycastle/asn1/DERConstructedSequence.java
ouncycastle/asn1/DERConstructedSet.java
ouncycastle/asn1/DEREncodable.java
ouncycastle/asn1/DEREncodableVector.java
ouncycastle/asn1/DEREnumerated.java
ouncycastle/asn1/DERGeneralString.java
ouncycastle/asn1/DERGeneralizedTime.java
ouncycastle/asn1/DERIA5String.java
ouncycastle/asn1/DERInputStream.java
ouncycastle/asn1/DERInteger.java
ouncycastle/asn1/DERNull.java
ouncycastle/asn1/DERNumericString.java
ouncycastle/asn1/DERObject.java
ouncycastle/asn1/DERObjectIdentifier.java
ouncycastle/asn1/DEROctetString.java
ouncycastle/asn1/DEROutputStream.java
ouncycastle/asn1/DERPrintableString.java
ouncycastle/asn1/DERSequence.java
ouncycastle/asn1/DERSet.java
ouncycastle/asn1/DERString.java
ouncycastle/asn1/DERT61String.java
ouncycastle/asn1/DERTaggedObject.java
ouncycastle/asn1/DERTags.java
ouncycastle/asn1/DERUTCTime.java
ouncycastle/asn1/DERUTF8String.java
ouncycastle/asn1/DERUniversalString.java
ouncycastle/asn1/DERUnknownTag.java
ouncycastle/asn1/DERVisibleString.java
ouncycastle/asn1/OIDTokenizer.java
ouncycastle/asn1/OrderedTable.java
ouncycastle/asn1/cmp/PKIFailureInfo.java
ouncycastle/asn1/cmp/PKIFreeText.java
ouncycastle/asn1/cmp/PKIStatus.java
ouncycastle/asn1/cmp/PKIStatusInfo.java
ouncycastle/asn1/cms/Attribute.java
ouncycastle/asn1/cms/AttributeTable.java
ouncycastle/asn1/cms/CMSAttributes.java
ouncycastle/asn1/cms/CMSObjectIdentifiers.java
ouncycastle/asn1/cms/CompressedData.java
ouncycastle/asn1/cms/ContentInfo.java
ouncycastle/asn1/cms/EncryptedContentInfo.java
ouncycastle/asn1/cms/EnvelopedData.java
ouncycastle/asn1/cms/IssuerAndSerialNumber.java
ouncycastle/asn1/cms/KEKIdentifier.java
ouncycastle/asn1/cms/KEKRecipientInfo.java
ouncycastle/asn1/cms/KeyAgreeRecipientInfo.java
ouncycastle/asn1/cms/KeyTransRecipientInfo.java
ouncycastle/asn1/cms/OriginatorIdentifierOrKey.java
ouncycastle/asn1/cms/OriginatorInfo.java
ouncycastle/asn1/cms/OriginatorPublicKey.java
ouncycastle/asn1/cms/OtherKeyAttribute.java
ouncycastle/asn1/cms/OtherRecipientInfo.java
ouncycastle/asn1/cms/PasswordRecipientInfo.java
ouncycastle/asn1/cms/RecipientIdentifier.java
ouncycastle/asn1/cms/RecipientInfo.java
ouncycastle/asn1/cms/RecipientKeyIdentifier.java
ouncycastle/asn1/cms/SignedData.java
ouncycastle/asn1/cms/SignerIdentifier.java
ouncycastle/asn1/cms/SignerInfo.java
ouncycastle/asn1/cms/Time.java
ouncycastle/asn1/cryptopro/CryptoProObjectIdentifiers.java
ouncycastle/asn1/esf/CommitmentTypeIdentifier.java
ouncycastle/asn1/esf/CommitmentTypeIndication.java
ouncycastle/asn1/esf/CommitmentTypeQualifier.java
ouncycastle/asn1/esf/ESFAttributes.java
ouncycastle/asn1/esf/SignerLocation.java
ouncycastle/asn1/ess/ContentIdentifier.java
ouncycastle/asn1/ess/ESSCertID.java
ouncycastle/asn1/ess/OtherCertID.java
ouncycastle/asn1/ess/OtherSigningCertificate.java
ouncycastle/asn1/ess/SigningCertificate.java
ouncycastle/asn1/gnu/GNUObjectIdentifiers.java
ouncycastle/asn1/iana/IANAObjectIdentifiers.java
ouncycastle/asn1/icao/DataGroupHash.java
ouncycastle/asn1/icao/ICAOObjectIdentifiers.java
ouncycastle/asn1/icao/LDSSecurityObject.java
ouncycastle/asn1/misc/IDEACBCPar.java
ouncycastle/asn1/misc/MiscObjectIdentifiers.java
ouncycastle/asn1/misc/NetscapeCertType.java
ouncycastle/asn1/misc/NetscapeRevocationURL.java
ouncycastle/asn1/misc/VerisignCzagExtension.java
ouncycastle/asn1/mozilla/PublicKeyAndChallenge.java
ouncycastle/asn1/nist/NISTObjectIdentifiers.java
ouncycastle/asn1/ocsp/BasicOCSPResponse.java
ouncycastle/asn1/ocsp/CertID.java
ouncycastle/asn1/ocsp/CertStatus.java
ouncycastle/asn1/ocsp/CrlID.java
ouncycastle/asn1/ocsp/OCSPObjectIdentifiers.java
ouncycastle/asn1/ocsp/OCSPRequest.java
ouncycastle/asn1/ocsp/OCSPResponse.java
ouncycastle/asn1/ocsp/OCSPResponseStatus.java
ouncycastle/asn1/ocsp/Request.java
ouncycastle/asn1/ocsp/ResponderID.java
ouncycastle/asn1/ocsp/ResponseBytes.java
ouncycastle/asn1/ocsp/ResponseData.java
ouncycastle/asn1/ocsp/RevokedInfo.java
ouncycastle/asn1/ocsp/ServiceLocator.java
ouncycastle/asn1/ocsp/Signature.java
ouncycastle/asn1/ocsp/SingleResponse.java
ouncycastle/asn1/ocsp/TBSRequest.java
ouncycastle/asn1/oiw/OIWObjectIdentifiers.java
ouncycastle/asn1/pkcs/Attribute.java
ouncycastle/asn1/pkcs/AuthenticatedSafe.java
ouncycastle/asn1/pkcs/CertBag.java
ouncycastle/asn1/pkcs/CertificationRequest.java
ouncycastle/asn1/pkcs/CertificationRequestInfo.java
ouncycastle/asn1/pkcs/ContentInfo.java
ouncycastle/asn1/pkcs/DHParameter.java
ouncycastle/asn1/pkcs/EncryptedData.java
ouncycastle/asn1/pkcs/EncryptedPrivateKeyInfo.java
ouncycastle/asn1/pkcs/EncryptionScheme.java
ouncycastle/asn1/pkcs/IssuerAndSerialNumber.java
ouncycastle/asn1/pkcs/KeyDerivationFunc.java
ouncycastle/asn1/pkcs/MacData.java
ouncycastle/asn1/pkcs/PBES2Algorithms.java
ouncycastle/asn1/pkcs/PBES2Parameters.java
ouncycastle/asn1/pkcs/PBKDF2Params.java
ouncycastle/asn1/pkcs/PKCS12PBEParams.java
ouncycastle/asn1/pkcs/PKCSObjectIdentifiers.java
ouncycastle/asn1/pkcs/Pfx.java
ouncycastle/asn1/pkcs/PrivateKeyInfo.java
ouncycastle/asn1/pkcs/RC2CBCParameter.java
ouncycastle/asn1/pkcs/RSAESOAEPparams.java
ouncycastle/asn1/pkcs/RSAPrivateKeyStructure.java
ouncycastle/asn1/pkcs/RSASSAPSSparams.java
ouncycastle/asn1/pkcs/SafeBag.java
ouncycastle/asn1/pkcs/SignedData.java
ouncycastle/asn1/pkcs/SignerInfo.java
ouncycastle/asn1/teletrust/TeleTrusTObjectIdentifiers.java
ouncycastle/asn1/tsp/Accuracy.java
ouncycastle/asn1/tsp/MessageImprint.java
ouncycastle/asn1/tsp/TSTInfo.java
ouncycastle/asn1/tsp/TimeStampReq.java
ouncycastle/asn1/tsp/TimeStampResp.java
ouncycastle/asn1/util/ASN1Dump.java
ouncycastle/asn1/util/DERDump.java
ouncycastle/asn1/util/Dump.java
ouncycastle/asn1/x509/AccessDescription.java
ouncycastle/asn1/x509/AlgorithmIdentifier.java
ouncycastle/asn1/x509/AttCertIssuer.java
ouncycastle/asn1/x509/AttCertValidityPeriod.java
ouncycastle/asn1/x509/Attribute.java
ouncycastle/asn1/x509/AttributeCertificate.java
ouncycastle/asn1/x509/AttributeCertificateInfo.java
ouncycastle/asn1/x509/AuthorityInformationAccess.java
ouncycastle/asn1/x509/AuthorityKeyIdentifier.java
ouncycastle/asn1/x509/BasicConstraints.java
ouncycastle/asn1/x509/CRLDistPoint.java
ouncycastle/asn1/x509/CRLNumber.java
ouncycastle/asn1/x509/CRLReason.java
ouncycastle/asn1/x509/CertPolicyId.java
ouncycastle/asn1/x509/CertificateList.java
ouncycastle/asn1/x509/CertificatePolicies.java
ouncycastle/asn1/x509/DSAParameter.java
ouncycastle/asn1/x509/DigestInfo.java
ouncycastle/asn1/x509/DisplayText.java
ouncycastle/asn1/x509/DistributionPoint.java
ouncycastle/asn1/x509/DistributionPointName.java
ouncycastle/asn1/x509/ExtendedKeyUsage.java
ouncycastle/asn1/x509/GeneralName.java
ouncycastle/asn1/x509/GeneralNames.java
ouncycastle/asn1/x509/GeneralSubtree.java
ouncycastle/asn1/x509/Holder.java
ouncycastle/asn1/x509/IetfAttrSyntax.java
ouncycastle/asn1/x509/IssuerSerial.java
ouncycastle/asn1/x509/IssuingDistributionPoint.java
ouncycastle/asn1/x509/KeyPurposeId.java
ouncycastle/asn1/x509/KeyUsage.java
ouncycastle/asn1/x509/NameConstraints.java
ouncycastle/asn1/x509/NoticeReference.java
ouncycastle/asn1/x509/ObjectDigestInfo.java
ouncycastle/asn1/x509/PolicyInformation.java
ouncycastle/asn1/x509/PolicyMappings.java
ouncycastle/asn1/x509/PolicyQualifierId.java
ouncycastle/asn1/x509/PolicyQualifierInfo.java
ouncycastle/asn1/x509/RSAPublicKeyStructure.java
ouncycastle/asn1/x509/ReasonFlags.java
ouncycastle/asn1/x509/RoleSyntax.java
ouncycastle/asn1/x509/SubjectDirectoryAttributes.java
ouncycastle/asn1/x509/SubjectKeyIdentifier.java
ouncycastle/asn1/x509/SubjectPublicKeyInfo.java
ouncycastle/asn1/x509/TBSCertList.java
ouncycastle/asn1/x509/TBSCertificateStructure.java
ouncycastle/asn1/x509/Time.java
ouncycastle/asn1/x509/UserNotice.java
ouncycastle/asn1/x509/V1TBSCertificateGenerator.java
ouncycastle/asn1/x509/V2AttributeCertificateInfoGenerator.java
ouncycastle/asn1/x509/V2Form.java
ouncycastle/asn1/x509/V2TBSCertListGenerator.java
ouncycastle/asn1/x509/V3TBSCertificateGenerator.java
ouncycastle/asn1/x509/X509Attributes.java
ouncycastle/asn1/x509/X509CertificateStructure.java
ouncycastle/asn1/x509/X509DefaultEntryConverter.java
ouncycastle/asn1/x509/X509Extension.java
ouncycastle/asn1/x509/X509Extensions.java
ouncycastle/asn1/x509/X509Name.java
ouncycastle/asn1/x509/X509NameElementList.java
ouncycastle/asn1/x509/X509NameEntryConverter.java
ouncycastle/asn1/x509/X509NameTokenizer.java
ouncycastle/asn1/x509/X509ObjectIdentifiers.java
ouncycastle/asn1/x509/qualified/BiometricData.java
ouncycastle/asn1/x509/qualified/ETSIQCObjectIdentifiers.java
ouncycastle/asn1/x509/qualified/Iso4217CurrencyCode.java
ouncycastle/asn1/x509/qualified/MonetaryValue.java
ouncycastle/asn1/x509/qualified/QCStatement.java
ouncycastle/asn1/x509/qualified/RFC3739QCObjectIdentifiers.java
ouncycastle/asn1/x509/qualified/SemanticsInformation.java
ouncycastle/asn1/x509/qualified/TypeOfBiometricData.java
ouncycastle/asn1/x509/sigi/SigIObjectIdentifiers.java
ouncycastle/asn1/x9/X9ObjectIdentifiers.java
ouncycastle/crypto/AsymmetricBlockCipher.java
ouncycastle/crypto/AsymmetricCipherKeyPair.java
ouncycastle/crypto/AsymmetricCipherKeyPairGenerator.java
ouncycastle/crypto/BasicAgreement.java
ouncycastle/crypto/BlockCipher.java
ouncycastle/crypto/BufferedAsymmetricBlockCipher.java
ouncycastle/crypto/BufferedBlockCipher.java
ouncycastle/crypto/CipherKeyGenerator.java
ouncycastle/crypto/CipherParameters.java
ouncycastle/crypto/CryptoException.java
ouncycastle/crypto/DSA.java
ouncycastle/crypto/DataLengthException.java
ouncycastle/crypto/DerivationFunction.java
ouncycastle/crypto/DerivationParameters.java
ouncycastle/crypto/Digest.java
ouncycastle/crypto/ExtendedDigest.java
ouncycastle/crypto/InvalidCipherTextException.java
ouncycastle/crypto/KeyGenerationParameters.java
ouncycastle/crypto/Mac.java
ouncycastle/crypto/PBEParametersGenerator.java
ouncycastle/crypto/RuntimeCryptoException.java
ouncycastle/crypto/Signer.java
ouncycastle/crypto/SignerWithRecovery.java
ouncycastle/crypto/StreamBlockCipher.java
ouncycastle/crypto/StreamCipher.java
ouncycastle/crypto/Wrapper.java
ouncycastle/crypto/agreement/DHAgreement.java
ouncycastle/crypto/agreement/DHBasicAgreement.java
ouncycastle/crypto/digests/GeneralDigest.java
ouncycastle/crypto/digests/LongDigest.java
ouncycastle/crypto/digests/MD4Digest.java
ouncycastle/crypto/digests/MD5Digest.java
ouncycastle/crypto/digests/SHA1Digest.java
ouncycastle/crypto/digests/SHA224Digest.java
ouncycastle/crypto/digests/SHA256Digest.java
ouncycastle/crypto/digests/SHA384Digest.java
ouncycastle/crypto/digests/SHA512Digest.java
ouncycastle/crypto/digests/ShortenedDigest.java
ouncycastle/crypto/encodings/ISO9796d1Encoding.java
ouncycastle/crypto/encodings/OAEPEncoding.java
ouncycastle/crypto/encodings/PKCS1Encoding.java
ouncycastle/crypto/engines/AESEngine.java
ouncycastle/crypto/engines/AESFastEngine.java
ouncycastle/crypto/engines/AESLightEngine.java
ouncycastle/crypto/engines/AESWrapEngine.java
ouncycastle/crypto/engines/DESEngine.java
ouncycastle/crypto/engines/DESedeEngine.java
ouncycastle/crypto/engines/DESedeWrapEngine.java
ouncycastle/crypto/engines/IESEngine.java
ouncycastle/crypto/engines/NullEngine.java
ouncycastle/crypto/engines/RC2Engine.java
ouncycastle/crypto/engines/RSAEngine.java
ouncycastle/crypto/generators/BaseKDFBytesGenerator.java
ouncycastle/crypto/generators/DESKeyGenerator.java
ouncycastle/crypto/generators/DESedeKeyGenerator.java
ouncycastle/crypto/generators/DHBasicKeyPairGenerator.java
ouncycastle/crypto/generators/DHKeyGeneratorHelper.java
ouncycastle/crypto/generators/DHKeyPairGenerator.java
ouncycastle/crypto/generators/DHParametersGenerator.java
ouncycastle/crypto/generators/DSAKeyPairGenerator.java
ouncycastle/crypto/generators/DSAParametersGenerator.java
ouncycastle/crypto/generators/KDF1BytesGenerator.java
ouncycastle/crypto/generators/KDF2BytesGenerator.java
ouncycastle/crypto/generators/MGF1BytesGenerator.java
ouncycastle/crypto/generators/OpenSSLPBEParametersGenerator.java
ouncycastle/crypto/generators/PKCS12ParametersGenerator.java
ouncycastle/crypto/generators/PKCS5S1ParametersGenerator.java
ouncycastle/crypto/generators/PKCS5S2ParametersGenerator.java
ouncycastle/crypto/generators/RSAKeyPairGenerator.java
ouncycastle/crypto/io/DigestInputStream.java
ouncycastle/crypto/io/DigestOutputStream.java
ouncycastle/crypto/io/MacInputStream.java
ouncycastle/crypto/io/MacOutputStream.java
ouncycastle/crypto/macs/BlockCipherMac.java
ouncycastle/crypto/macs/CBCBlockCipherMac.java
ouncycastle/crypto/macs/CFBBlockCipherMac.java
ouncycastle/crypto/macs/HMac.java
ouncycastle/crypto/macs/ISO9797Alg3Mac.java
ouncycastle/crypto/macs/OldHMac.java
ouncycastle/crypto/modes/CBCBlockCipher.java
ouncycastle/crypto/modes/CCMBlockCipher.java
ouncycastle/crypto/modes/CFBBlockCipher.java
ouncycastle/crypto/modes/CTSBlockCipher.java
ouncycastle/crypto/modes/GOFBBlockCipher.java
ouncycastle/crypto/modes/OFBBlockCipher.java
ouncycastle/crypto/modes/PaddedBlockCipher.java
ouncycastle/crypto/modes/SICBlockCipher.java
ouncycastle/crypto/paddings/BlockCipherPadding.java
ouncycastle/crypto/paddings/ISO10126d2Padding.java
ouncycastle/crypto/paddings/ISO7816d4Padding.java
ouncycastle/crypto/paddings/PKCS7Padding.java
ouncycastle/crypto/paddings/PaddedBufferedBlockCipher.java
ouncycastle/crypto/paddings/TBCPadding.java
ouncycastle/crypto/paddings/X923Padding.java
ouncycastle/crypto/paddings/ZeroBytePadding.java
ouncycastle/crypto/params/AsymmetricKeyParameter.java
ouncycastle/crypto/params/CCMParameters.java
ouncycastle/crypto/params/DESParameters.java
ouncycastle/crypto/params/DESedeParameters.java
ouncycastle/crypto/params/DHKeyGenerationParameters.java
ouncycastle/crypto/params/DHKeyParameters.java
ouncycastle/crypto/params/DHParameters.java
ouncycastle/crypto/params/DHPrivateKeyParameters.java
ouncycastle/crypto/params/DHPublicKeyParameters.java
ouncycastle/crypto/params/DHValidationParameters.java
ouncycastle/crypto/params/DSAKeyGenerationParameters.java
ouncycastle/crypto/params/DSAKeyParameters.java
ouncycastle/crypto/params/DSAParameters.java
ouncycastle/crypto/params/DSAPrivateKeyParameters.java
ouncycastle/crypto/params/DSAPublicKeyParameters.java
ouncycastle/crypto/params/DSAValidationParameters.java
ouncycastle/crypto/params/IESParameters.java
ouncycastle/crypto/params/IESWithCipherParameters.java
ouncycastle/crypto/params/ISO18033KDFParameters.java
ouncycastle/crypto/params/KDFParameters.java
ouncycastle/crypto/params/KeyParameter.java
ouncycastle/crypto/params/MGFParameters.java
ouncycastle/crypto/params/ParametersWithIV.java
ouncycastle/crypto/params/ParametersWithRandom.java
ouncycastle/crypto/params/ParametersWithSBox.java
ouncycastle/crypto/params/ParametersWithSalt.java
ouncycastle/crypto/params/RC2Parameters.java
ouncycastle/crypto/params/RC5Parameters.java
ouncycastle/crypto/params/RSAKeyGenerationParameters.java
ouncycastle/crypto/params/RSAKeyParameters.java
ouncycastle/crypto/params/RSAPrivateCrtKeyParameters.java
ouncycastle/crypto/signers/DSASigner.java
ouncycastle/crypto/signers/ISO9796d2PSSSigner.java
ouncycastle/crypto/signers/ISO9796d2Signer.java
ouncycastle/crypto/signers/PSSSigner.java
ouncycastle/crypto/util/PrivateKeyFactory.java
ouncycastle/crypto/util/PublicKeyFactory.java
ouncycastle/i18n/ErrorBundle.java
ouncycastle/i18n/LocalizedException.java
ouncycastle/i18n/LocalizedMessage.java
ouncycastle/i18n/MessageBundle.java
ouncycastle/i18n/MissingEntryException.java
ouncycastle/i18n/TextBundle.java
ouncycastle/i18n/filter/Filter.java
ouncycastle/i18n/filter/HTMLFilter.java
ouncycastle/i18n/filter/SQLFilter.java
ouncycastle/i18n/filter/UntrustedInput.java
ouncycastle/jce/PKCS10CertificationRequest.java
ouncycastle/jce/PKCS7SignedData.java
ouncycastle/jce/PrincipalUtil.java
ouncycastle/jce/X509KeyUsage.java
ouncycastle/jce/X509Principal.java
ouncycastle/jce/X509V1CertificateGenerator.java
ouncycastle/jce/X509V2CRLGenerator.java
ouncycastle/jce/X509V3CertificateGenerator.java
ouncycastle/jce/interfaces/BCKeyStore.java
ouncycastle/jce/interfaces/IESKey.java
ouncycastle/jce/interfaces/PKCS12BagAttributeCarrier.java
ouncycastle/jce/netscape/NetscapeCertRequest.java
ouncycastle/jce/provider/AnnotatedException.java
ouncycastle/jce/provider/BouncyCastleProvider.java
ouncycastle/jce/provider/BrokenJCEBlockCipher.java
ouncycastle/jce/provider/BrokenKDF2BytesGenerator.java
ouncycastle/jce/provider/BrokenPBE.java
ouncycastle/jce/provider/CertPathValidatorUtilities.java
ouncycastle/jce/provider/CertStoreCollectionSpi.java
ouncycastle/jce/provider/DHUtil.java
ouncycastle/jce/provider/DSAUtil.java
ouncycastle/jce/provider/IndexedPKIXParameters.java
ouncycastle/jce/provider/JCEBlockCipher.java
ouncycastle/jce/provider/JCEDHKeyAgreement.java
ouncycastle/jce/provider/JCEDHPrivateKey.java
ouncycastle/jce/provider/JCEDHPublicKey.java
ouncycastle/jce/provider/JCEDigestUtil.java
ouncycastle/jce/provider/JCEIESCipher.java
ouncycastle/jce/provider/JCEKeyGenerator.java
ouncycastle/jce/provider/JCEMac.java
ouncycastle/jce/provider/JCEPBEKey.java
ouncycastle/jce/provider/JCERSACipher.java
ouncycastle/jce/provider/JCERSAPrivateCrtKey.java
ouncycastle/jce/provider/JCERSAPrivateKey.java
ouncycastle/jce/provider/JCERSAPublicKey.java
ouncycastle/jce/provider/JCESecretKeyFactory.java
ouncycastle/jce/provider/JCEStreamCipher.java
ouncycastle/jce/provider/JDKAlgorithmParameterGenerator.java
ouncycastle/jce/provider/JDKAlgorithmParameters.java
ouncycastle/jce/provider/JDKDSAPrivateKey.java
ouncycastle/jce/provider/JDKDSAPublicKey.java
ouncycastle/jce/provider/JDKDSASigner.java
ouncycastle/jce/provider/JDKDigestSignature.java
ouncycastle/jce/provider/JDKECDSAAlgParameters.java
ouncycastle/jce/provider/JDKISOSignature.java
ouncycastle/jce/provider/JDKKeyFactory.java
ouncycastle/jce/provider/JDKKeyPairGenerator.java
ouncycastle/jce/provider/JDKKeyStore.java
ouncycastle/jce/provider/JDKMessageDigest.java
ouncycastle/jce/provider/JDKPKCS12KeyStore.java
ouncycastle/jce/provider/JDKPSSSigner.java
ouncycastle/jce/provider/JDKX509CertificateFactory.java
ouncycastle/jce/provider/PBE.java
ouncycastle/jce/provider/PKIXCertPath.java
ouncycastle/jce/provider/PKIXCertPathBuilderSpi.java
ouncycastle/jce/provider/PKIXCertPathValidatorSpi.java
ouncycastle/jce/provider/PKIXPolicyNode.java
ouncycastle/jce/provider/RSAUtil.java
ouncycastle/jce/provider/WrapCipherSpi.java
ouncycastle/jce/provider/X509CRLEntryObject.java
ouncycastle/jce/provider/X509CRLObject.java
ouncycastle/jce/provider/X509CertificateObject.java
ouncycastle/jce/provider/X509SignatureUtil.java
ouncycastle/jce/spec/IEKeySpec.java
ouncycastle/jce/spec/IESParameterSpec.java
ouncycastle/openssl/PEMWriter.java
ouncycastle/util/Arrays.java
ouncycastle/util/BigIntegers.java
ouncycastle/util/Strings.java
ouncycastle/util/encoders/Base64.java
ouncycastle/util/encoders/Base64Encoder.java
ouncycastle/util/encoders/BufferedDecoder.java
ouncycastle/util/encoders/BufferedEncoder.java
ouncycastle/util/encoders/Encoder.java
ouncycastle/util/encoders/Hex.java
ouncycastle/util/encoders/HexEncoder.java
ouncycastle/util/encoders/HexTranslator.java
ouncycastle/util/encoders/Translator.java
ouncycastle/util/encoders/UrlBase64.java
ouncycastle/util/encoders/UrlBase64Encoder.java
ouncycastle/x509/AttributeCertificateHolder.java
ouncycastle/x509/AttributeCertificateIssuer.java
ouncycastle/x509/CertPathReviewerException.java
ouncycastle/x509/CertPathReviewerMessages.properties
ouncycastle/x509/PKIXCertPathReviewer.java
ouncycastle/x509/X509Attribute.java
ouncycastle/x509/X509AttributeCertificate.java
ouncycastle/x509/X509Util.java
ouncycastle/x509/X509V1CertificateGenerator.java
ouncycastle/x509/X509V2AttributeCertificate.java
ouncycastle/x509/X509V2AttributeCertificateGenerator.java
ouncycastle/x509/X509V2CRLGenerator.java
ouncycastle/x509/X509V3CertificateGenerator.java
ouncycastle/x509/extension/AuthorityKeyIdentifierStructure.java
ouncycastle/x509/extension/SubjectKeyIdentifierStructure.java
ouncycastle/x509/extension/X509ExtensionUtil.java
3ff29eb11a241d58c54ecc84230bb0672f4aa148 23-Apr-2010 Peter Hallam <peterhal@google.com> More merging of nio into luni

Change-Id: Ib4356b3cd57490df8ff246ea6a4bc1c269ba848b
pache/harmony/nio/AddressUtil.java
pache/harmony/nio/FileChannelFactory.java
pache/harmony/nio/internal/DatagramChannelImpl.java
pache/harmony/nio/internal/DirectBuffer.java
pache/harmony/nio/internal/FileChannelImpl.java
pache/harmony/nio/internal/FileLockImpl.java
pache/harmony/nio/internal/IOUtil.java
pache/harmony/nio/internal/LockManager.java
pache/harmony/nio/internal/MappedByteBufferFactory.java
pache/harmony/nio/internal/PipeImpl.java
pache/harmony/nio/internal/ReadOnlyFileChannel.java
pache/harmony/nio/internal/ReadWriteFileChannel.java
pache/harmony/nio/internal/SelectionKeyImpl.java
pache/harmony/nio/internal/SelectorImpl.java
pache/harmony/nio/internal/SelectorProviderImpl.java
pache/harmony/nio/internal/ServerSocketChannelImpl.java
pache/harmony/nio/internal/SocketChannelImpl.java
pache/harmony/nio/internal/WriteOnlyFileChannel.java
8baf143a7c8921d07b54adbc66ac1e5b42de5fe6 21-Apr-2010 Jesse Wilson <jessewilson@google.com> Rewrite the HTTP connection pool used by HttpURLConnection.

This started off as incremental changes, but it ended up going
far enough that it earned the "rewrite" badge.

System.getProperty() is not called for every HTTP connection.
This is slightly controversial, but the old code had to bend
over backwards to support dynamic pool changes, and it didn't
even support the case when the pool shrank but not to 0.

The new code doesn't do I/O within static synchronized blocks.
This should reduce contention described here: http://b/issue?id=2606547

Also: simpify implementation, prettier names, more focused doc.
pache/harmony/luni/internal/net/www/protocol/http/HttpConfiguration.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnectionManager.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnectionPool.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
2f633269e71f3fb0b6248cc695cf37c5cbaf7e60 20-Apr-2010 Jesse Wilson <jessewilson@google.com> Fixing TimeZone.setDefault() documentation.

Set expectations for date formatting to tolerate "GMT-07" in the
output. The alternative is to emit an ambigous date string.
Applications that want pretty date formatting should use the
proper facilities: SimpleDateFormat, etc.

This problem was detected by org.apache.harmony.luni.tests.java.util.DateTest.test_toString
pache/harmony/luni/internal/util/ZoneInfoDB.java
f88ba00a6ec9c43c344fbd1708c6d4ee2b593ca0 18-Apr-2010 Elliott Hughes <enh@google.com> Remove a dangling import, and another unused Messages.java.

Also tidy up our two awt.font classes.

Change-Id: I931d348eef7265190f76c31f74c9a5d9ec5d6597
pache/harmony/misc/internal/nls/Messages.java
b7e820b92c7345cdc0cd4fea50954289ae66eb67 16-Apr-2010 Elliott Hughes <enh@google.com> Change DecimalFormatSymbols to have a field per symbol.

I'd been wanting to do this for some time, but cleaning up the recent
performance changes I made to Formatter was the final straw.

Change-Id: I6d516de66a0bed5e759bca590b4cc124ce2eb712
pache/harmony/luni/util/LocaleCache.java
03c0a8e681c776fdba0389ab8593282139afc6d6 14-Apr-2010 Elliott Hughes <enh@google.com> Remove "Messages" from the nio, prefs, sql, text, and x-net modules.

Also remove an file of unused messages from luni, and inline one of luni's
other files. (There are plenty more.)

Also remove some German translations of bouncycastle messages (that are
actually in English anyway).

Change-Id: I9c565f6f2201a5d877eba5bf0af4ffad7b769984
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
pache/harmony/luni/internal/nls/Messages.java
pache/harmony/luni/internal/nls/messages.properties
pache/harmony/misc/internal/nls/messages.properties
565a85d06ab8bc321d39f12012468cdfb65f5cfe 31-Mar-2010 Elliott Hughes <enh@google.com> Add Java 6's ResourceBundle/Properties API.

I've pretty much taken the upstream ResourceBundle implementations
as-is, putting back our string-to-locale conversion, removing a bit
of duplication and non-free, non-spec EBCDIC support, and hard-coding
the text of the MissingResourceExceptions (since harmony's changed
its message catalog from ours, so I had to touch those bits of the
code anyway).

(Why haven't I bothered to pay much attention to the resource bundle
implementations? Because I already rewrote our only code that was
using them to not use them, and third-party developers should be
using Android's resource system instead. There's very little chance
anyone needs Java resource bundles. I paid some attention to Properties,
because they're still somewhat useful.)

Also remove various unused messages, and update our tests. I've mostly
_not_ taken the upstream tests, because it would require a lot of work
that we'll be doing anyway when we switch to using their test suite
properly.

I ran the jtreg tests we're able to run, and the normal-case ones (plus
the stress test) seemed okay.

Bug: 2497395
Change-Id: I91606df0dc1a45e6974fbb27a0d334af87254f0b
pache/harmony/luni/internal/nls/messages.properties
pache/harmony/luni/util/ExternalMessages.properties
97144c87ada735a82221d7cdf65555b8f063a05a 30-Mar-2010 Elliott Hughes <enh@google.com> Trivial tidying up of networking code.

Removing cruft and renaming things.

Change-Id: I317726c40a1addf3a1ad9d905239438424082549
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
b748a9b827665a8b19d60af4b419503b45e74329 24-Mar-2010 Elliott Hughes <enh@google.com> Remove explicit 8192 arguments to BufferedReader and friends.

These were clearly added just to shut up our own warning, and are now
unnecessary and misleading to future maintainers.

There's one barely-related change: InputStreamReader and OutputStreamWriter
are very similar, and this patch makes them more similar, and adds a few
missing modifiers from their fields.

Change-Id: I959011f914ff215e92bbfa41c1bac66465803685
pache/harmony/luni/internal/net/www/protocol/file/FileURLConnection.java
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
d9d263010b4b3fb039ecb88bddbc565414d82c63 16-Mar-2010 Elliott Hughes <enh@google.com> Remove dead fields, constants, and redundant pass-through methods.

(This is just preliminary to what I really want to do, which is vastly
reduce the number of near-duplicate methods we have: all the send/recv
variants, for example.)

Change-Id: Ib03653820a18f55aea6c5b876c397afd281a98dc
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/platform/OSNetworkSystem.java
fdd13e86ec613e46b68376f90d2c89c2ac33b4b5 13-Mar-2010 Elliott Hughes <enh@google.com> Remove dead obfuscatory code.

Bug: 2509206
Change-Id: I72a34e1f80fd6936d255b94daf5683cc2a0f2327
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
49e79cdc1aadb2922178e8905a7907df0bdaf7b3 12-Mar-2010 Elliott Hughes <enh@google.com> Use ioctl(FIONREAD) rather than recv(MSG_PEEK) to implement Socket.available.

As well as avoiding unnecessary work, this also means we can reuse the native
code we already have for ioctl(FIONREAD), though we need to change the
interface to take FileDescriptor rather than int, and extract the int on the
native side.

Change-Id: I4c6d9e4e72e514e3e7872c7f882bda5441059915
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSFileSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
77dd26ad0da51486d5dcfbc4da346f2acaa1c8fa 11-Mar-2010 Elliott Hughes <enh@google.com> Plug a resource leak with "finally" and make Object.getClass' return type match Java 6.

Change-Id: Ia8ae90634bfb3680c8e82e4e4cf7f7459263c3d3
pache/harmony/luni/internal/net/www/protocol/jar/JarURLConnectionImpl.java
eb238ef640a1eef7eec7c5b057ce0e14f762043c 24-Feb-2010 Elliott Hughes <enh@google.com> Fix "HttpUrlConnection.addRequestProperty replaces existing properties instead of append them".

The bug was actually that the copy constructor wasn't reconstructing the 'props'
list correctly. Upstream has applied the same fix, so I'm also bringing my
earlier change into sync with theirs, whitespace-wise (and removing no longer
necessary 'android-changed' tags).

Bug: http://code.google.com/p/android/issues/detail?id=6722
pache/harmony/luni/internal/net/www/protocol/http/Header.java
e3f55fef357e71daa6d56e838fbba31dcebe443e 17-Feb-2010 Elliott Hughes <enh@google.com> HTTP headers should be case-insensitive but case-preserving.

Bug: http://code.google.com/p/android/issues/detail?id=6684
pache/harmony/luni/internal/net/www/protocol/http/Header.java
96474a05d47fcca92f7d511e41a20f994fc1e677 27-Jan-2010 Elliott Hughes <enh@google.com> Add a cache to Currency.getInstance(Locale).

Statically there are lots of calls to Currency.getInstance(String) in the
core libraries and only one to Currency.getInstance(Locale). This might
be why the former has a cache but the latter doesn't. Dynamically, looking
up Currency by Locale is a common operation because that one caller --
DecimalFormatSymbols -- is widely used, and it sets up its currency data
eagerly. (Which might be worth coming back and also fixing later.)
pache/harmony/luni/util/LocaleCache.java
4c5cbf2953ada194c4dc9d7b387615b1c6fe3e63 20-Jan-2010 Elliott Hughes <enh@google.com> One true way to query "java.net.preferIPv6Addresses".

Also stop querying and passing this boolean to code that doesn't care. (We
sort our InetAddress[]s appropriately, so most code doesn't need to worry
about this.)

Bug: http://code.google.com/p/android/issues/detail?id=5903
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
398cf32a303a3b2a878a48cbae54be5ac23f7ecd 07-Jan-2010 Jesse Wilson <jessewilson@google.com> Fixing our default HTTP Accept header to be spec-compliant.

See bug http://code.google.com/p/android/issues/detail?id=5843

Also fixing a bug in the test webserver, where we weren't formatting
the headers properly. I'm dumbfounded how the tests passed previously;
although I fear that omitting the @TestTargetNew annotation might mean
that they weren't being run. I'll investigate that in a follow up.
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
55392539fea537abfb6581b474918f9d611fba27 16-Dec-2009 Jesse Wilson <jessewilson@google.com> Update luni package to Harmony r888752.

Conflicts:
libcore/luni/META-INF/MANIFEST.MF
libcore/luni/make/findbugs-exclude-filter.xml
libcore/luni/src/main/java/java/io/BufferedOutputStream.java
libcore/luni/src/main/java/java/io/BufferedReader.java
libcore/luni/src/main/java/java/io/CharArrayReader.java
libcore/luni/src/main/java/java/io/StringReader.java
libcore/luni/src/main/java/java/lang/StrictMath.java
libcore/luni/src/main/java/java/lang/ref/ReferenceQueue.java
libcore/luni/src/main/java/java/net/Inet4Address.java
libcore/luni/src/main/java/java/net/InetAddress.java
libcore/luni/src/main/java/java/util/ArrayList.java
libcore/luni/src/main/java/java/util/EnumSet.java
libcore/luni/src/main/java/java/util/HugeEnumSet.java
libcore/luni/src/main/java/org/apache/harmony/luni/internal/reflect/ProxyConstantPool.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/AbstractMemorySpy.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/DebugMemorySpy.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/Endianness.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/IFileSystem.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/IMemorySystem.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/INetworkSystem.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/IPlatformConstants.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/OSFileSystem.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/OSMemory.java
libcore/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java
libcore/luni/src/main/java/org/apache/harmony/luni/util/InputStreamExposer.java
libcore/luni/src/main/native/hyzip/shared/zipcache.c
libcore/luni/src/main/native/hyzip/shared/zipsup.c
libcore/luni/src/main/native/include/jni.h
libcore/luni/src/main/native/include/jni_types.h
libcore/luni/src/main/native/include/jvmti.h
libcore/luni/src/main/native/include/jvmti_types.h
libcore/luni/src/main/native/launcher/unix/main_hlp.c
libcore/luni/src/main/native/luni/shared/OSNetworkSystem.c
libcore/luni/src/main/native/luni/shared/file.c
libcore/luni/src/main/native/luni/windows/makefile
libcore/luni/src/test/api/unix/org/apache/harmony/luni/tests/java/io/UnixFileTest.java
libcore/luni/src/test/java/tests/api/java/io/BufferedOutputStreamTest.java
libcore/luni/src/test/java/tests/api/java/io/BufferedReaderTest.java
libcore/luni/src/test/java/tests/api/java/io/SerializationStressTest.java
libcore/luni/src/test/java/tests/api/java/net/SocketTest.java
libcore/luni/src/test/java/tests/api/java/util/ArrayListTest.java
libcore/luni/src/test/java/tests/api/java/util/EnumSetTest.java
libcore/luni/src/test/java/tests/api/java/util/TimerTest.java
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
pache/harmony/luni/internal/nls/messages.properties
pache/harmony/luni/platform/AbstractMemorySpy.java
pache/harmony/luni/platform/IMemorySystem.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/luni/platform/RuntimeMemorySpy.java
pache/harmony/luni/util/Base64.java
pache/harmony/luni/util/ExposedByteArrayInputStream.java
pache/harmony/luni/util/InputStreamExposer.java
pache/harmony/luni/util/SneakyThrow.java
43738ceee7ba810bf0b84ff4dcd441a366975a5c 15-Dec-2009 Elliott Hughes <enh@google.com> Eclipse doesn't like that this class' directory didn't match its package.

Resolve in favor of the package declaration.
pache/harmony/luni/InputStreamHelper.java
pache/harmony/luni/util/InputStreamHelper.java
f7c6911047d63bc76292f55ce538da32818dd931 10-Dec-2009 Jesse Wilson <jessewilson@google.com> Merge branch 'archive_888752' into archive_dalvik

Conflicts:
libcore/archive/build.xml
libcore/archive/src/main/java/java/util/jar/JarFile.java
libcore/archive/src/main/java/java/util/zip/GZIPInputStream.java
libcore/archive/src/main/java/java/util/zip/Inflater.java
libcore/archive/src/main/java/java/util/zip/InflaterInputStream.java
libcore/archive/src/main/java/java/util/zip/ZipEntry.java
libcore/archive/src/main/java/java/util/zip/ZipFile.java
libcore/archive/src/main/java/java/util/zip/ZipInputStream.java
libcore/archive/src/main/java/org/apache/harmony/archive/internal/nls/Messages.java
libcore/archive/src/main/java/org/apache/harmony/archive/internal/nls/messages.properties
libcore/archive/src/main/native/archive/unix/exports.txt
libcore/archive/src/main/native/archive/unix/makefile
libcore/archive/src/main/native/archive/windows/makefile
libcore/archive/src/main/native/archive_copyright.c
libcore/archive/src/main/native/jarfile.c
libcore/archive/src/main/native/java_util_zip_Deflater.c
libcore/archive/src/main/native/zip.c
libcore/archive/src/main/native/zipcache.c
libcore/archive/src/main/native/zlib/unix/makefile
libcore/archive/src/main/native/zlib/windows/makefile
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/AllTests.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarInputStreamTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarOutputStreamTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/ManifestTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/Pack200Test.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterOutputStreamTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterInputStreamTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipEntryTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipInputStreamTest.java
pache/harmony/luni/InputStreamHelper.java
d385bfc328b9d85901eec969a55afb28125f2b51 09-Dec-2009 Elliott Hughes <enh@google.com> Improve the FileNotFoundExceptions thrown by OSFileSystem.open.

When I improved the internals of java.io.File, I failed to keep
OSFileSystem.open (which uses the internals of java.io.File) in
sync, leading to misleading error reporting. java.io.File's
internals now include a trailing NUL, which is useful for the
native code but confuses Java if it tries to decode the byte[]
as a UTF-8 sequence.

This patch fixes the bug and also improves OSFileSystem.open's
error reporting to include the reason for the failure.

Bug: 2313271
pache/harmony/luni/platform/OSFileSystem.java
d2c1275661bbebbbb3fae30b6359f71f2628c4b3 21-Nov-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I9fa3ef2c

* changes:
Rewrite NetworkInterface's JNI for IPv6.
e004690c9eb948e9276aa9d4bb92d98f22bc879f 21-Nov-2009 Dan Egnor <egnor@google.com> am 070dbac8: am 0dfef7bc: Fix bugs created by caching NumberFormat & DecimalFormatSymbols objects

Merge commit '070dbac882856834111bc0e766224ee53c8d5471'

* commit '070dbac882856834111bc0e766224ee53c8d5471':
Fix bugs created by caching NumberFormat & DecimalFormatSymbols objects
ff30d8c3c306d660a58a9bad60e7256d372bc6e8 21-Nov-2009 Dan Egnor <egnor@google.com> Fix bugs created by caching NumberFormat & DecimalFormatSymbols objects
pache/harmony/luni/util/LocaleCache.java
b5fc5ecd3fe5315fc2756c0c25adc458cc8c8d91 20-Nov-2009 Elliott Hughes <enh@google.com> Rewrite NetworkInterface's JNI for IPv6.

The old ioctl SIOCGIFCONF implementation of getNetworkInterfaces only returns
IPv4 addresses. Now we've switched everything over to IPv6, that's not good
enough. This change (a) implements glibc/BSD-like getifaddrs(3)/freeifaddrs(3)
for Android, and (b) rewrites our getNetworkInterfaces to use that method. Of
particular note is that we now do more of the work in Java. The JNI hands back
a Java equivalent of getifaddrs(3)'s linked list of ifaddrs structs. The new
package-private java.net.InterfaceAddress class serves as Java's "struct
ifaddrs".

The old implementation was also broken: SIOCGIFCONF doesn't actually return
interface indexes from the kernel as the old code believed, so we were
pulling the address family out of the IPv4 address it returned, leading
us to assign the index 2 to all network interfaces. This caused all kinds of
weird behavior later.

I also had to fix GenericIPMreq so that its interface index field is actually
set. The native code gets passed one of these objects when setNetworkInterface
is called, so it's kind of important that the object identify which interface
it's supposed to correspond to.

I've also added missing copyright headers.

This fixes all of the harmony tests on the simulator and on the device. It
fixes several but not all of the jtreg MulticastSocket and IPv6 tests.
pache/harmony/luni/net/GenericIPMreq.java
d3012a3bff31557a81c74c1ef1b50ef556b38967 20-Nov-2009 Elliott Hughes <enh@google.com> Implement ZoneInfo.toString for debugging convenience.

Bug: 2276903
pache/harmony/luni/internal/util/ZoneInfo.java
d5011e8caf816d71ac85243e3c5f6343e362236c 18-Nov-2009 Dan Egnor <egnor@google.com> am 50f82ad4: am 08e0023c: Merge change I42d17725 into eclair-mr2

Merge commit '50f82ad4f2c4047382029560fd09d1907518adc8'

* commit '50f82ad4f2c4047382029560fd09d1907518adc8':
Cache NumberFormat and DecimalFormatSymbols objects in a ThreadLocal,
84a0540c3925ef1e48ea3ef310db76adce1246fa 18-Nov-2009 Dan Egnor <egnor@google.com> Cache NumberFormat and DecimalFormatSymbols objects in a ThreadLocal,
so they can be reused between multiple instances of Formatter on the
same thread. This speeds up my unscientific benchmark (a number of
printouts involved in a debugging diagnostics output) by 3x, and
should have a similar impact on anyone who uses String.format(),
PrintWriter.format(), and the like.
pache/harmony/luni/util/LocaleCache.java
e40c9e3935a5024c0f3ebfb3f1441fcd5c48ed86 12-Nov-2009 Elliott Hughes <enh@google.com> Fix HttpURLConnection's chunked encoding behavior.

A third-party developer who wasn't reading to the end of the stream found that
their next connection would return junk, which turned out to be the tail of
the first response (thanks to connection recycling). Make sure we clean up
a chunked-encoding stream before allowing the connection to be reused.

Enhance our test web server to implement chunked encoding properly, with
configurable chunk sizes, rather than just responding with a single chunk.

Bug: http://code.google.com/p/android/issues/detail?id=2939
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
7861ea9a813b337a4abd0378584baae9cc177896 12-Nov-2009 Elliott Hughes <enh@google.com> Remove OSNetworkSystem.oneTimeInitialization.

Do this work at JNI registration time, as we do for almost everything else.
(I did this to rule out a warning from the dalvikvm deadlock prediction
code, which doesn't like the unusual lock ordering at initialization time,
and although it didn't make any difference to that, I prefer to have a
defined static order of initialization.)
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
ba563a4578c970b0c750464c7efe7ec5dc0ad2c1 05-Nov-2009 Elliott Hughes <enh@google.com> More OSNetworkSystem cleanup.

Handle select(2) errors by throwing exceptions from native code (which is
simpler and provides more useful detail messages).

Factor out exception throwing commonality. This is probably ready for JNIHelp.h
now.

Remove sockSelect. Simplify selectWait by observing that it's only ever called
with a "read" fdset.

Remove a little more SOCKERR_* cruft.

Remove a few unused #defines.
pache/harmony/luni/platform/OSNetworkSystem.java
21d6937a70c255b47b707a995c1f9e76a5460fa4 03-Nov-2009 Elliott Hughes <enh@google.com> Kill OSNetworkSystem.inheritedChannelImpl.

This code is broken (and more broken than upstream), and not obviously relevant
to our platform. Let's make it clear that all this currently does is return
null.

The changes in the Java side bring us back in sync with upstream.
pache/harmony/luni/platform/OSNetworkSystem.java
a9a57f2581773484d13e160fd3407692e825971a 31-Oct-2009 Elliott Hughes <enh@google.com> More OSNetworkSystem cleanup.

valgrind didn't like what we were doing here, specifically the way we
were setting ss_family to AF_INET if getsockopt IP_MULTICAST_IF didn't
return an AF_INET address, and ignoring the fact that the rest of
the sockaddr_storage doesn't necessarily correspond to an AF_INET address.
Linux seems to return an AF_UNSPEC address (rather than INADDR_ANY) if we
haven't set a multicast interface, so we have to do the conversion ourselves.

More disturbingly (and unfixed by this patch) we sometimes see ss_family
come back as 127 (when AF_MAX is 32 on our system). My guess is that the
kernel is just handing back bad data we gave it earlier, but I'll come back
to see about fixing multicast properly later.

I've inlined socketAddressToString into osNetworkSystem_byteArrayToIpString,
its only caller, because it's clearer that way now we've simplified the
division of error handling between the two.

I've brought getSocketLocalAddressImpl and getSocketLocalPortImpl in line
with each other and changed them to at least log errors. I've also added
a new test that fails, to demonstrate that this implementation is broken
as designed.

I've changed the name of JAVASOCKOPT_IP_MULTICAST_IF to match the Java
constant.

I've fixed the exception we throw if we're asked to convert a bad address
family's address from code that can't throw IOException --- AssertionError
doesn't have a String constructor. Really, we need to kill this code, so
I've added a TODO.

I've also made a real push to get rid of most of the SOCKERR_*-based error
reporting. (I had a transient failure with a meaningless error message
that sent me to the source to work out which errno it was actually
trying to report.)

I've changed setTTL to call setTimeToLive, and change the implementation
of the latter to pass Integer rather than Byte to the native implementation,
since that's what the native code needs anyway and native Byte support was
only for TTL.

Bug: 2225748
pache/harmony/luni/net/PlainDatagramSocketImpl.java
d9179c4701153caeb821cf3da639b28465317508 27-Oct-2009 Elliott Hughes <enh@google.com> Remove OSNetworkSystem.sendStream and all use of ErrorCodeException.

Removing OSNetworkSystem.sendStream brings us in line with harmony. I've
also rewritten writeSocketImpl to not make a temporary copy of the data it's
going to send.

The weird code in writeSocketDirectImpl that threw ErrorCodeException turns out
to be a very awkward way of returning zero to the only two callers that are
paying attention. (Harmony actually calls the equivalent of this code every
time it throws SocketException from native code, but these two callers were
the only places that checked for the special case.)
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/luni/util/ErrorCodeException.java
954754fc999fb5fb747f7928302639d16dd3ac7e 23-Oct-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I3628c655

* changes:
OSMemorySystem.mmap fixes.
3c6ff817ba94b64cf24014acff7201859410fb13 23-Oct-2009 Elliott Hughes <enh@google.com> OSMemorySystem.mmap fixes.

Stop silently truncating the arguments to mmap. Check they're actually valid.

Fix mmap to actually throw IOException on error, as it claimed to do.

Correct parameter name 'alignment' to 'offset'.

Remove dead code (getPageSize).
pache/harmony/luni/platform/IMemorySystem.java
pache/harmony/luni/platform/OSMemory.java
70882923fb227de7a54a9b1a2a4dd2c6ec8b51ae 22-Oct-2009 Elliott Hughes <enh@google.com> Remove OSNetworkSystem.receiveStream.

Harmony removed this some time ago, and -- if we change our read/readDirect
implementations slightly -- we can too.

I've also added some bounds checking in the Java so we don't ask native code
to perform a buffer overrun for us.

I've also rewritten the native readSocketImpl to use GetByteArrayElements and
ReleaseByteArrayElements rather than its own custom stack/heap allocation and
arbitrary 64KiB limit. (As far as I can tell from the harmony history, the
limit dates from when they always read into an on-stack buffer, and was never
removed.)

I've also brought us in line with harmony so we only pass 'address' to
readDirect, rather than 'address' and 'offset'.

I've changed SocketTest to match upstream and -- since they pulled out some
of the tests into a new file -- I've added their UnixSocketTest so we don't
miss out. Our old SocketTest's test_getInputStream is the only test my new
code doesn't pass, but I think the old SocketTest was broken and the new
SocketTest/UnixSocketTest is correct.

I've also brought us back into line with harmony's MulticastSocketTest. With
the up-to-date tests, the new code behaves the same as the old code. (With
our old tests, the new code fails the joinGroup test with a
NullPointerException instead of a junit comparison failure.)
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
b150dcd6a072b41df6b010a60977a1657a7bdfa5 21-Oct-2009 Elliott Hughes <enh@google.com> More OSNetworkSystem cleanup.

Rewrite OSNetworkSystem.connect in terms of connectStreamWithTimeoutSocketImpl
in Java rather than in native code. Remove OSNetworkSystem.connectSocketImpl.
Make INetworkSystem.connect void, since the return value is always 0.

Use TEMP_FAILURE_RETRY rather than explicit do loops to retry interrupted
system calls.

Fix peekDatagramImpl to actually update the byte[] in the passed-in
InetAddress.

Stop pulling the int fd out of the FileDescriptor each time round the loop
in sendStreamImpl and sendDatagramImpl2.

More tiny steps towards eliminating the SOCKERR_ nonsense in favor of errno.

Prefer sizeof(variable) to sizeof(type).

Remove a few more superfluous "struct" keywords.
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
4030ad60f305d1f23e9b681dca7a181ab4f09276 20-Oct-2009 Jesse Wilson <jessewilson@google.com> Removing caching of file canonical path caching, and fixing NIO tests.

I checked in some regressions in the NIO test cases with the NIO patch;
this addresses those problems.
pache/harmony/luni/internal/io/FileCanonPathCache.java
b869baf43ffd3d81098c6a68b9d9af6791119a7f 16-Oct-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I2e354493

* changes:
Update NIO and NIO char packages to Harmony 802921.
eaa2ff09069424b0f7a95c7cd831cef1b744fe67 16-Oct-2009 Jesse Wilson <jessewilson@google.com> Update NIO and NIO char packages to Harmony 802921.

Notable changes:
- We don't use Harmony's new indexing for SelectorImpl. See the long bug
thread on Harmony's site, https://issues.apache.org/jira/browse/HARMONY-6312
This patch includes the latest Harmony changes to SelectorImpl, which
have been optimized since this patch was first created.
- Several uses of StringBuffer updated to use StringBuilder
- CharBuffer.read implementation changes
- Additional checking in CharsetEncoder
- Some inner classes made static
- Harmony changed their Charset impl from ICU to Java. We're sticking with ICU.
- Harmony added support for epoll. We're sticking with standard 'poll'.

commit 2ed6cb602a52f4681afbf1348928f1b0c36d914d
Merge: 8a74fca bcc5ec7
Author: Jesse Wilson <jessewilson@google.com>
Date: Fri Aug 14 15:14:10 2009 -0700

Merge branch 'nio_802921' into nio_dalvik

Conflicts:
libcore/nio/.classpath
libcore/nio/META-INF/MANIFEST.MF
libcore/nio/build.xml
libcore/nio/make/exclude.linux.x86.drl
libcore/nio/make/exclude.linux.x86.ibm
libcore/nio/make/exclude.linux.x86_64.drl
libcore/nio/src/main/java/java/nio/BaseByteBuffer.java
libcore/nio/src/main/java/java/nio/Buffer.java
libcore/nio/src/main/java/java/nio/BufferOverflowException.java
libcore/nio/src/main/java/java/nio/BufferUnderflowException.java
libcore/nio/src/main/java/java/nio/ByteBuffer.java
libcore/nio/src/main/java/java/nio/ByteOrder.java
libcore/nio/src/main/java/java/nio/CharArrayBuffer.java
libcore/nio/src/main/java/java/nio/CharBuffer.java
libcore/nio/src/main/java/java/nio/CharSequenceAdapter.java
libcore/nio/src/main/java/java/nio/CharToByteBufferAdapter.java
libcore/nio/src/main/java/java/nio/DirectByteBuffer.java
libcore/nio/src/main/java/java/nio/DirectByteBuffers.java
libcore/nio/src/main/java/java/nio/DoubleArrayBuffer.java
libcore/nio/src/main/java/java/nio/DoubleBuffer.java
libcore/nio/src/main/java/java/nio/DoubleToByteBufferAdapter.java
libcore/nio/src/main/java/java/nio/FloatArrayBuffer.java
libcore/nio/src/main/java/java/nio/FloatBuffer.java
libcore/nio/src/main/java/java/nio/FloatToByteBufferAdapter.java
libcore/nio/src/main/java/java/nio/HeapByteBuffer.java
libcore/nio/src/main/java/java/nio/IntArrayBuffer.java
libcore/nio/src/main/java/java/nio/IntBuffer.java
libcore/nio/src/main/java/java/nio/IntToByteBufferAdapter.java
libcore/nio/src/main/java/java/nio/InvalidMarkException.java
libcore/nio/src/main/java/java/nio/LongArrayBuffer.java
libcore/nio/src/main/java/java/nio/LongBuffer.java
libcore/nio/src/main/java/java/nio/LongToByteBufferAdapter.java
libcore/nio/src/main/java/java/nio/MappedByteBuffer.java
libcore/nio/src/main/java/java/nio/MappedByteBufferAdapter.java
libcore/nio/src/main/java/java/nio/ReadOnlyBufferException.java
libcore/nio/src/main/java/java/nio/ReadOnlyCharArrayBuffer.java
libcore/nio/src/main/java/java/nio/ReadOnlyDirectByteBuffer.java
libcore/nio/src/main/java/java/nio/ReadOnlyDoubleArrayBuffer.java
libcore/nio/src/main/java/java/nio/ReadOnlyFloatArrayBuffer.java
libcore/nio/src/main/java/java/nio/ReadOnlyHeapByteBuffer.java
libcore/nio/src/main/java/java/nio/ReadOnlyIntArrayBuffer.java
libcore/nio/src/main/java/java/nio/ReadOnlyLongArrayBuffer.java
libcore/nio/src/main/java/java/nio/ReadOnlyShortArrayBuffer.java
libcore/nio/src/main/java/java/nio/ReadWriteCharArrayBuffer.java
libcore/nio/src/main/java/java/nio/ReadWriteDirectByteBuffer.java
libcore/nio/src/main/java/java/nio/ReadWriteDoubleArrayBuffer.java
libcore/nio/src/main/java/java/nio/ReadWriteFloatArrayBuffer.java
libcore/nio/src/main/java/java/nio/ReadWriteHeapByteBuffer.java
libcore/nio/src/main/java/java/nio/ReadWriteIntArrayBuffer.java
libcore/nio/src/main/java/java/nio/ReadWriteLongArrayBuffer.java
libcore/nio/src/main/java/java/nio/ReadWriteShortArrayBuffer.java
libcore/nio/src/main/java/java/nio/ShortArrayBuffer.java
libcore/nio/src/main/java/java/nio/ShortBuffer.java
libcore/nio/src/main/java/java/nio/ShortToByteBufferAdapter.java
libcore/nio/src/main/java/java/nio/channels/AlreadyConnectedException.java
libcore/nio/src/main/java/java/nio/channels/AsynchronousCloseException.java
libcore/nio/src/main/java/java/nio/channels/ByteChannel.java
libcore/nio/src/main/java/java/nio/channels/CancelledKeyException.java
libcore/nio/src/main/java/java/nio/channels/Channel.java
libcore/nio/src/main/java/java/nio/channels/Channels.java
libcore/nio/src/main/java/java/nio/channels/ClosedByInterruptException.java
libcore/nio/src/main/java/java/nio/channels/ClosedChannelException.java
libcore/nio/src/main/java/java/nio/channels/ClosedSelectorException.java
libcore/nio/src/main/java/java/nio/channels/ConnectionPendingException.java
libcore/nio/src/main/java/java/nio/channels/DatagramChannel.java
libcore/nio/src/main/java/java/nio/channels/FileChannel.java
libcore/nio/src/main/java/java/nio/channels/FileLock.java
libcore/nio/src/main/java/java/nio/channels/FileLockInterruptionException.java
libcore/nio/src/main/java/java/nio/channels/GatheringByteChannel.java
libcore/nio/src/main/java/java/nio/channels/IllegalBlockingModeException.java
libcore/nio/src/main/java/java/nio/channels/IllegalSelectorException.java
libcore/nio/src/main/java/java/nio/channels/InterruptibleChannel.java
libcore/nio/src/main/java/java/nio/channels/NoConnectionPendingException.java
libcore/nio/src/main/java/java/nio/channels/NonReadableChannelException.java
libcore/nio/src/main/java/java/nio/channels/NonWritableChannelException.java
libcore/nio/src/main/java/java/nio/channels/NotYetBoundException.java
libcore/nio/src/main/java/java/nio/channels/NotYetConnectedException.java
libcore/nio/src/main/java/java/nio/channels/OverlappingFileLockException.java
libcore/nio/src/main/java/java/nio/channels/Pipe.java
libcore/nio/src/main/java/java/nio/channels/ReadableByteChannel.java
libcore/nio/src/main/java/java/nio/channels/ScatteringByteChannel.java
libcore/nio/src/main/java/java/nio/channels/SelectableChannel.java
libcore/nio/src/main/java/java/nio/channels/SelectionKey.java
libcore/nio/src/main/java/java/nio/channels/Selector.java
libcore/nio/src/main/java/java/nio/channels/ServerSocketChannel.java
libcore/nio/src/main/java/java/nio/channels/SocketChannel.java
libcore/nio/src/main/java/java/nio/channels/UnresolvedAddressException.java
libcore/nio/src/main/java/java/nio/channels/UnsupportedAddressTypeException.java
libcore/nio/src/main/java/java/nio/channels/WritableByteChannel.java
libcore/nio/src/main/java/java/nio/channels/spi/AbstractInterruptibleChannel.java
libcore/nio/src/main/java/java/nio/channels/spi/AbstractSelectableChannel.java
libcore/nio/src/main/java/java/nio/channels/spi/AbstractSelectionKey.java
libcore/nio/src/main/java/java/nio/channels/spi/AbstractSelector.java
libcore/nio/src/main/java/java/nio/channels/spi/SelectorProvider.java
libcore/nio/src/main/java/org/apache/harmony/nio/AddressUtil.java
libcore/nio/src/main/java/org/apache/harmony/nio/FileChannelFactory.java
libcore/nio/src/main/java/org/apache/harmony/nio/internal/DatagramChannelImpl.java
libcore/nio/src/main/java/org/apache/harmony/nio/internal/DirectBuffer.java
libcore/nio/src/main/java/org/apache/harmony/nio/internal/FileChannelImpl.java
libcore/nio/src/main/java/org/apache/harmony/nio/internal/FileLockImpl.java
libcore/nio/src/main/java/org/apache/harmony/nio/internal/IOUtil.java
libcore/nio/src/main/java/org/apache/harmony/nio/internal/MappedByteBufferFactory.java
libcore/nio/src/main/java/org/apache/harmony/nio/internal/ReadOnlyFileChannel.java
libcore/nio/src/main/java/org/apache/harmony/nio/internal/ReadWriteFileChannel.java
libcore/nio/src/main/java/org/apache/harmony/nio/internal/SelectorImpl.java
libcore/nio/src/main/java/org/apache/harmony/nio/internal/SelectorProviderImpl.java
libcore/nio/src/main/java/org/apache/harmony/nio/internal/SocketChannelImpl.java
libcore/nio/src/main/java/org/apache/harmony/nio/internal/WriteOnlyFileChannel.java
libcore/nio/src/main/native/nio/shared/DirectBufferUtil.c
libcore/nio/src/main/native/nio/unix/exports.txt
libcore/nio/src/main/native/nio/unix/makefile
libcore/nio/src/main/native/nio/windows/makefile
libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/BufferOverflowExceptionTest.java
libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/BufferUnderflowExceptionTest.java
libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/CharBufferTest.java
libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/FloatBufferTest.java
libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/InvalidMarkExceptionTest.java
libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/MappedByteBufferTest.java
libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/ReadOnlyBufferExceptionTest.java
libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/DatagramChannelTest.java
libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/FileChannelLockingTest.java
libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/FileChannelTest.java
libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/FileChannelWin32OnlyTest.java
libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/FileLockTest.java
libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/ServerSocketChannelTest.java
libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/SocketChannelTest.java
libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/spi/AbstractSelectableChannelTest.java
libcore/nio_char/.classpath
libcore/nio_char/META-INF/MANIFEST.MF
libcore/nio_char/build.xml
libcore/nio_char/src/main/java/java/nio/charset/CharacterCodingException.java
libcore/nio_char/src/main/java/java/nio/charset/Charset.java
libcore/nio_char/src/main/java/java/nio/charset/CharsetDecoder.java
libcore/nio_char/src/main/java/java/nio/charset/CharsetEncoder.java
libcore/nio_char/src/main/java/java/nio/charset/CoderMalfunctionError.java
libcore/nio_char/src/main/java/java/nio/charset/CoderResult.java
libcore/nio_char/src/main/java/java/nio/charset/CodingErrorAction.java
libcore/nio_char/src/main/java/java/nio/charset/IllegalCharsetNameException.java
libcore/nio_char/src/main/java/java/nio/charset/MalformedInputException.java
libcore/nio_char/src/main/java/java/nio/charset/UnmappableCharacterException.java
libcore/nio_char/src/main/java/java/nio/charset/UnsupportedCharsetException.java
libcore/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetDecoderTest.java
libcore/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetEncoderTest.java
libcore/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetTest.java
libcore/nio_char/src/test/java/tests/api/java/nio/charset/ASCCharsetDecoderTest.java
libcore/nio_char/src/test/java/tests/api/java/nio/charset/CharsetDecoderTest.java
libcore/nio_char/src/test/java/tests/api/java/nio/charset/CharsetEncoderTest.java
libcore/nio_char/src/test/java/tests/api/java/nio/charset/CharsetProviderTest.java
libcore/nio_char/src/test/java/tests/api/java/nio/charset/CharsetTest.java
libcore/nio_char/src/test/java/tests/api/java/nio/charset/GBCharsetDecoderTest.java
libcore/nio_char/src/test/java/tests/api/java/nio/charset/GBCharsetEncoderTest.java
libcore/nio_char/src/test/java/tests/api/java/nio/charset/ISOCharsetDecoderTest.java
libcore/nio_char/src/test/java/tests/api/java/nio/charset/UTF16BECharsetDecoderTest.java
libcore/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetDecoderTest.java
libcore/nio_char/src/test/java/tests/api/java/nio/charset/UTF16CharsetEncoderTest.java
libcore/nio_char/src/test/java/tests/api/java/nio/charset/UTF16LECharsetDecoderTest.java
libcore/nio_char/src/test/java/tests/api/java/nio/charset/UTFCharsetDecoderTest.java
libcore/nio_char/src/test/java/tests/api/java/nio/charset/UTFCharsetEncoderTest.java

commit 8a74fca0d85c82a9d02a83d00fd028d9b09755f7
Author: Jesse Wilson <jessewilson@google.com>
Date: Thu Aug 13 16:03:25 2009 -0700

Dalvik Nio, Nio char

commit bcc5ec78806787fbecab742e716fc0d63bcece5c
Author: Jesse Wilson <jessewilson@google.com>
Date: Thu Aug 13 16:01:06 2009 -0700

Nio, nio char 802921

commit fc1e09e74aec8e49e0e23f13643deed1e9112af4
Author: Jesse Wilson <jessewilson@google.com>
Date: Thu Aug 13 15:48:17 2009 -0700

Nio, nio char 527399
pache/harmony/luni/platform/FileDescriptorHandler.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
1c422fc0ab0692e10a05af6f48c6276c4dad4bea 16-Oct-2009 Jesse Wilson <jessewilson@google.com> Respond to impossible CloneNotSupportedExceptions with AssertionErrors.

See bug 2183132.
pache/harmony/luni/internal/net/www/protocol/http/Header.java
5839b909d9528b7726e678a4b696ed37df15d897 10-Oct-2009 Jesse Wilson <jessewilson@google.com> Udating luni to Harmony r823222.

Highlights:
- InputStream.skip concurrency issue
- "better" messages in bound exceptions for streams and arrays
- prefer fewer writes to underlying streams (using byte[] buffers)
- Rename subclasses to not reuse names from their superclasses
- PlatformAddressFactory.allocMap bugfix

Plus some spelling fixes, style fixes, serial version UIDs and other
boilerplate improvements.
pache/harmony/luni/internal/io/FileCanonPathCache.java
pache/harmony/luni/internal/net/www/protocol/http/Handler.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/https/Handler.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnection.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
pache/harmony/luni/internal/net/www/protocol/jar/Handler.java
pache/harmony/luni/internal/net/www/protocol/jar/JarURLConnection.java
pache/harmony/luni/internal/net/www/protocol/jar/JarURLConnectionImpl.java
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/SocketInputStream.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSMemory.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/luni/platform/PlatformAddress.java
pache/harmony/luni/platform/PlatformAddressFactory.java
pache/harmony/luni/util/ExternalMessages.properties
109fc1115e7afd2907544b805eaa2cc8a0e2635f 01-Oct-2009 Elliott Hughes <enh@google.com> Simplify FileInputStream.skip to match the RI.

The RI throws IOException on any non-seekable stream, including stdin.
This patch removes harmony's special-case hack for stdin, and the native
cruft that wasn't even necessary if you did want a special hack for
stdin.

Bug: 1542253
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/OSFileSystem.java
3d478ad9fefa9c90b5c644f5e3d9437828537ed9 27-Sep-2009 Elliott Hughes <enh@google.com> Throw meaningful IOException instances from native code.

The Java side of OSFileSystem was throwing IOExceptions with no detail
message. If we throw from the native side instead, we can supply
meaningful explanations. This turned up a couple of bugs:

* read, readDirect, readv, writev, and ttyRead would only throw IOException
if they returned < -1, which is impossible. (writev was probably a copy & paste
from readv, and the reads were probably confused by the impedence mismatch
between Unix's use of 0 to mean end of file and -1 to mean error, and Java's
use of -1 for end of file.)

* inconsistent checking for null byte[]s passed in.

* read and write would retry on EINTR, but readDirect and writeDirect wouldn't.

* we'd silently truncate seek/lock/truncate offsets that didn't fit in 32 bits;
we now throw an IOException instead.

It also means a few native functions become "void" because errors are now
reported by throwing exceptions, and the Java functions that used to call them
are no longer needed.

Also change ProcessManager to use jniThrowIOException, remove the unused
throwIOExceptionStr from OSNetworkSystem.cpp, and remove the KnownFailure from
FileTest's test_delete, now we have a fixed version of yaffs that won't
rmdir(2) non-empty directories.

Bug: 1542253
pache/harmony/luni/platform/OSFileSystem.java
e8596906d75fd8ccda31600d71ad56391cd7cd3a 19-Sep-2009 Lorenzo Colitti <lorenzo@google.com> Manual merge of change I3665f82b into master.
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/luni/util/Inet6Util.java
7356e5631e05b8b31d22a7e303bdef8b1221b065 19-Sep-2009 Lorenzo Colitti <lorenzo@google.com> Use native code to convert strings to IP addresses.

1. Add an ipStringToByteArray method to the OSNetworkSystem interface and
provide a native implementation for it.
2. Change InetAddress to use the new method.
3. Remove a mid-sized chunk of Inet6Util, which is now redundant.
4. Remove the KnownFailure annotations from the InetAddress, InetAddress and
Inet6Address tests that expected 1.2.3, 1.3 and 3 to be valid IPv4
addresses. These tests now pass again.
5. Removed an unused native method.
6. Added a comment to the top of the native socket implementation to the effect
that the file is significantly different from harmony.

Change-Id: I3665f82b00ebc089e9133cc6166dda5a99fa10e4
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/luni/util/Inet6Util.java
8ed4ad0c5b361f7a196eb97bc3ec210ab086623b 22-Sep-2009 Elliott Hughes <enh@google.com> Fix useDaylightTime for zh_TW (and other locales).

TimeZone.useDaylightTime shouldn't report whether a locale has *ever* used DST,
but whether a locale uses DST "these days". Taiwan is an example supported
locale that historically used DST but hasn't used it since 1980.

Bug: 877
pache/harmony/luni/internal/util/ZoneInfo.java
511ab05f7731dffa3480cbd0b79836b231f77ef6 19-Sep-2009 Lorenzo Colitti <lorenzo@google.com> Manual merge of eclair change I26548922 into master.
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/luni/util/Inet6Util.java
ec67773c5d9bbdbff7e846ef28816a3870d4cac2 18-Sep-2009 Lorenzo Colitti <lorenzo@google.com> Use native code to convert IP addresses to strings.

- Add a byteArrayToIpString method to the INetworkSystem interface and implement
it in native code
- Fix the native code so it does better error reporting
- Change InetAddress's getHostAddress, getHostName and getCanonicalHostName
methods to use it and remove the IPv4-only Java implementations
- Remove Inet6Util.createIPAddrStringFromByteArray
- Fix InetAddress so getByAddress(null) throws UnknownHostException instead of
NullPointerException for compatibility with the RI.

Change-Id: I26548922e9eed63b295173456183c4ab3ce20718
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/luni/util/Inet6Util.java
b406800f8463936bc70f47e53746ef0e60ea5046 16-Sep-2009 Lorenzo Colitti <lorenzo@google.com> Make getHostByAddr and getHostByName return the proper object type.

Change-Id: I51c75205095b7fe093ccb4451bbf7cc6a287bc49
pache/harmony/luni/platform/OSNetworkSystem.java
adad03692b86958bbc1da598c260b5e322f4d8ce 12-Sep-2009 Jesse Wilson <jessewilson@google.com> Fixing the delimiter for the HTTP "Accept" header to be well-formed.

See bug 2107897.
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java
a389b4a499f40379b0b204d7ba1c2057663d95c0 11-Aug-2009 Jesse Wilson <jessewilson@google.com> Update Luni to Harmony r802921.

Notable changes:
- replaced StringBuffer with StringBuilder in several places
- fixed a problem with BufferedInputStream's newline characters (EBCDIC)
- cleanup Timer's finalizer helper object
- new cache for the canonical path of a file
- fixed concurrency issue with ArrayList
- floating point parsing now trims length for very small numbers
- encoding specified "UTF-8" when converting some byte[]s to strings (JarURLConnection, Util, OSFileSystem)
- Harmony now implements floor and ceil in Java. We continue to use native code.
pache/harmony/luni/internal/io/FileCanonPathCache.java
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java
pache/harmony/luni/internal/net/www/protocol/jar/Handler.java
pache/harmony/luni/internal/net/www/protocol/jar/JarURLConnection.java
pache/harmony/luni/platform/IMemorySystem.java
pache/harmony/luni/platform/OSFileSystem.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/luni/util/ExternalMessages.properties
pache/harmony/luni/util/FloatingPointParser.java
pache/harmony/luni/util/Util.java
451ee2cdd4bce45cea6020409ea1f2ebd11eea71 30-Jul-2009 Urs Grob <ursg@google.com> am 29326482: Removing MD2

Merge commit '2932648271e72bad181b293e1fa5945265c7dbed'

* commit '2932648271e72bad181b293e1fa5945265c7dbed':
Removing MD2
87eb4de6347e1be029cde77dd43ad9b1af901472 22-Jul-2009 Urs Grob <ursg@google.com> Removing MD2
pache/harmony/luni/util/OIDDatabase.java
f5597e626ecf7949d249dea08c1a2964d890ec11 25-Jul-2009 Jesse Wilson <jessewilson@google.com> Integrate luni module (but not tests) to Harmony r772995.

Notable changes
- Stripped "@since Android 1.0" from many files. Most files
are now 100% the same in Dalvik and Harmony.
- AbstractStringBuilder.reverse() supports surrogates
- AbstractStringBuilder shares less to waste less memory
- Bitset optimized
- BufferedInputStream changed to support unsynchronized close()
- BufferedOutputStream does flushInternal
- BufferedReader supports EBCDIC NEL
- Collections.synchronizedList().indexOf() does a copy for more concurrency
- Classes in nio module changed: DatagramChannelImpl, SocketChannelImpl
and ServerSocketChannelImpl (these depend on internal APIs changed in
this update)
- DataInputStream/DataOutputStream now use a small buffer to limit the
number of times the underlying stream is accessed
- Date now has a minutes offset, more efficient toString()
- ExposedByteArrayInputStream: new internal class
- DeleteOnExit moved to top-level class
- FileDescriptor.isValid() now non-native
- Float, Double lessThan optimized (fix for compare(-0.0F, 0.0F) still pending)
- FileURLConnection now guesses content types from streams
- HashMap iterator changes
- Hashtable iterator changes
- INetworkSystem
- removes bind2(), createMulticastSocket, sendStream(),
- renames createSocket to createStreamSocket
- JarURLConnection rewritten
- LinkedHashMap: new iterator
- Locale, Currency, TimeZone: now use ICU in Harmony, plain Java in Dalvik
- ObjectInputStream: Accessor objects in Harmony, direct native in Dalvik
- ProxyClassFile - many changes
- String - optimized ascii for toLowerCase, toUpperCase, compare
- Timer - rewritten
- TreeMap - rewritten
- URLClassLoader - new
- URLConnection - new guessContentTypeFromStream(), uses org.apache.harmony.awt.www.content
to lookup content type handlers
pache/harmony/luni/internal/net/www/MimeTable.java
pache/harmony/luni/internal/net/www/protocol/file/FileURLConnection.java
pache/harmony/luni/internal/net/www/protocol/file/Handler.java
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
pache/harmony/luni/internal/net/www/protocol/http/Header.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConfiguration.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnectionManager.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnection.java
pache/harmony/luni/internal/net/www/protocol/jar/Handler.java
pache/harmony/luni/internal/net/www/protocol/jar/JarURLConnection.java
pache/harmony/luni/internal/nls/messages.properties
pache/harmony/luni/internal/reflect/ProxyCharArrayCache.java
pache/harmony/luni/internal/reflect/ProxyClassFile.java
pache/harmony/luni/internal/reflect/ProxyConstantPool.java
pache/harmony/luni/internal/reflect/ProxyConstants.java
pache/harmony/luni/internal/reflect/ProxyMethod.java
pache/harmony/luni/internal/reflect/ProxyNameAndTypeCache.java
pache/harmony/luni/internal/reflect/ProxyObjectCache.java
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainMulticastSocketImpl.java
pache/harmony/luni/net/PlainServerSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl2.java
pache/harmony/luni/net/SocketImplProvider.java
pache/harmony/luni/platform/AbstractMemorySpy.java
pache/harmony/luni/platform/AdapterManager.java
pache/harmony/luni/platform/IAdaptable.java
pache/harmony/luni/platform/IAdapterFactory.java
pache/harmony/luni/platform/IAdapterManager.java
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/ISystemComponent.java
pache/harmony/luni/platform/OSComponent.java
pache/harmony/luni/platform/OSComponentFactory.java
pache/harmony/luni/platform/OSFileSystem.java
pache/harmony/luni/platform/OSMemory.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/luni/platform/Platform.java
pache/harmony/luni/platform/RuntimeMemorySpy.java
pache/harmony/luni/util/DeleteOnExit.java
pache/harmony/luni/util/ExposedByteArrayInputStream.java
pache/harmony/luni/util/ExternalMessages.properties
pache/harmony/luni/util/FloatingPointParser.java
pache/harmony/luni/util/HexStringParser.java
pache/harmony/luni/util/HistoricalNamesUtil.java
pache/harmony/luni/util/Inet6Util.java
pache/harmony/luni/util/InputStreamExposer.java
pache/harmony/luni/util/Sorter.java
pache/harmony/luni/util/TwoKeyHashMap.java
pache/harmony/luni/util/Util.java
8c9fdedea866c9c225d5a877230772ce85ab2c42 11-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 2279

* changes:
Updating archive to Harmony r772995.
7c618fe1f388514bb9080057fd95c7926a3a06fc 10-Jun-2009 Dan Bornstein <danfuzz@android.com> Fix internal issue #1898791 ("PlatformAddressFactory PlatformAddress cache
causes memory to not be freed in a timely manner.").

The change makes the two PlatformAddressFactory.alloc() methods always
allocate separate PlatformAddress objects instead of looking for them
in the cache. This means that, should they have auto-free turned on,
there won't be a reference in the cache that prevents the freeing from
happening. And since we're talking about freshly-allocated memory anyway,
it would be surprising that either a matching address would be found in
cache *or* that a subsequent call to on() would ever happen with the
same address. So, it's a win on several fronts.
pache/harmony/luni/platform/PlatformAddressFactory.java
57995e8186b54515d5a03bf2ab104c3dc247f1b6 22-May-2009 Jesse Wilson <jessewilson@google.com> Updating archive to Harmony r772995.

Squashed commit of the following:
Adding @TestTargetNew tags

Initial merge of branch 'archive_772995' into archive_dalvik.

Fixed some problems, including InflaterInputStream.available()
and JarFile.skip() bugs.

Conflicts:
libcore/archive/.classpath
libcore/archive/META-INF/MANIFEST.MF
libcore/archive/build.xml
libcore/archive/make/hyproperties.xml
libcore/archive/src/main/java/java/util/jar/Attributes.java
libcore/archive/src/main/java/java/util/jar/JarEntry.java
libcore/archive/src/main/java/java/util/jar/JarException.java
libcore/archive/src/main/java/java/util/jar/JarFile.java
libcore/archive/src/main/java/java/util/jar/JarInputStream.java
libcore/archive/src/main/java/java/util/jar/JarVerifier.java
libcore/archive/src/main/java/java/util/jar/Manifest.java
libcore/archive/src/main/java/java/util/jar/Pack200.java
libcore/archive/src/main/java/java/util/zip/Adler32.java
libcore/archive/src/main/java/java/util/zip/CRC32.java
libcore/archive/src/main/java/java/util/zip/Checksum.java
libcore/archive/src/main/java/java/util/zip/DataFormatException.java
libcore/archive/src/main/java/java/util/zip/Deflater.java
libcore/archive/src/main/java/java/util/zip/DeflaterOutputStream.java
libcore/archive/src/main/java/java/util/zip/GZIPInputStream.java
libcore/archive/src/main/java/java/util/zip/GZIPOutputStream.java
libcore/archive/src/main/java/java/util/zip/Inflater.java
libcore/archive/src/main/java/java/util/zip/InflaterInputStream.java
libcore/archive/src/main/java/java/util/zip/ZipEntry.java
libcore/archive/src/main/java/java/util/zip/ZipException.java
libcore/archive/src/main/java/java/util/zip/ZipFile.java
libcore/archive/src/main/java/java/util/zip/ZipInputStream.java
libcore/archive/src/main/java/java/util/zip/ZipOutputStream.java
libcore/archive/src/main/java/org/apache/harmony/archive/internal/nls/Messages.java
libcore/archive/src/main/native/archive/shared/archiveglob.c
libcore/archive/src/main/native/archive/shared/jarfile.c
libcore/archive/src/main/native/archive/shared/zip.c
libcore/archive/src/main/native/archive/shared/zip.h
libcore/archive/src/main/native/archive/unix/makefile
libcore/archive/src/main/native/archive/windows/makefile
libcore/archive/src/main/native/java_util_zip_Adler32.c
libcore/archive/src/main/native/java_util_zip_CRC32.c
libcore/archive/src/main/native/java_util_zip_Deflater.c
libcore/archive/src/main/native/java_util_zip_Inflater.c
libcore/archive/src/main/native/zip/shared/hyzip.nls
libcore/archive/src/main/native/zip/unix/makefile
libcore/archive/src/main/native/zipsup.h
libcore/archive/src/main/native/zlib/unix/makefile
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/AttributesNameTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/AttributesTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarEntryTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarInputStreamTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarOutputStreamTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/ManifestTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/GZIPInputStreamTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/GZIPOutputStreamTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java

commit 946f165f5b592f4453fd8f2c19766921544d38dd
Author: Jesse Wilson <jessewilson@google.com>
Date: Tue May 12 15:12:55 2009 -0700

Strip @Since Android 1.0 from Archive

commit 3498f216d7e826bfc9c4cc7c0da35830ca239367
Author: Jesse Wilson <jessewilson@google.com>
Date: Tue May 12 15:09:05 2009 -0700

Dalvik archive

commit 62e9db90bc6aa6b5d1c897cccdd616d812672677
Author: Jesse Wilson <jessewilson@google.com>
Date: Tue May 12 15:07:51 2009 -0700

Archive 772995

commit d1bf618681d6badf1b50edaf204a083d3912213d
Author: Jesse Wilson <jessewilson@google.com>
Date: Tue May 12 15:06:36 2009 -0700

Archive 527399
pache/harmony/luni/util/InputStreamExposer.java
pache/harmony/luni/util/ThreadLocalCache.java
4a18dac1dae17aefb889a458497f3b9a5a6a64ef 28-Feb-2009 t.mehrvarz <othy74@gmail.com> Code to reuse PlatformAddress objects. Minimizing garbage creation on the framework level and reducing the number of runtime GC-hiccups for OpenGL apps and animations.
2nd version: complete rewrite using 8 bit hash, up to 5 probes, cycle through probes cache replacement. (Thank you MichaelDt for your help.)
- 1st amend: applied requested modifications
- 2nd amend: comment openers, curly bracket
pache/harmony/luni/platform/PlatformAddressFactory.java
b7e757e28b814b742baf1910b7faf8391be67ae1 19-Mar-2009 Jean-Baptiste Queru <jbq@google.com> Merge commit 'remotes/korg/cupcake' into cupcake_to_master
e99e2306d96e652d43ad201226fe8dea8921a4f6 28-Feb-2009 t.mehrvarz <othy74@gmail.com> Code to reuse PlatformAddress objects. Minimizing garbage creation on the framework level and reducing the number of runtime GC-hiccups for OpenGL apps and animations.
2nd version: complete rewrite using 8 bit hash, up to 5 probes, cycle through probes cache replacement. (Thank you MichaelDt for your help.)
- 1st amend: applied requested modifications
- 2nd amend: comment openers, curly bracket
pache/harmony/luni/platform/PlatformAddressFactory.java
adc854b798c1cfe3bfd4c27d68d5cee38ca617da 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
pache/harmony/luni/internal/net/www/MimeTable.java
pache/harmony/luni/internal/net/www/protocol/file/FileURLConnection.java
pache/harmony/luni/internal/net/www/protocol/file/Handler.java
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLInputStream.java
pache/harmony/luni/internal/net/www/protocol/ftp/Handler.java
pache/harmony/luni/internal/net/www/protocol/http/Handler.java
pache/harmony/luni/internal/net/www/protocol/http/Header.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConfiguration.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnectionManager.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java
pache/harmony/luni/internal/net/www/protocol/https/Handler.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnection.java
pache/harmony/luni/internal/net/www/protocol/jar/Handler.java
pache/harmony/luni/internal/net/www/protocol/jar/JarURLConnection.java
pache/harmony/luni/internal/net/www/types.properties
pache/harmony/luni/internal/nls/Messages.java
pache/harmony/luni/internal/nls/messages.properties
pache/harmony/luni/internal/reflect/ProxyCharArrayCache.java
pache/harmony/luni/internal/reflect/ProxyClassFile.java
pache/harmony/luni/internal/reflect/ProxyConstantPool.java
pache/harmony/luni/internal/reflect/ProxyConstants.java
pache/harmony/luni/internal/reflect/ProxyMethod.java
pache/harmony/luni/internal/reflect/ProxyNameAndTypeCache.java
pache/harmony/luni/internal/reflect/ProxyObjectCache.java
pache/harmony/luni/internal/util/TimezoneGetter.java
pache/harmony/luni/internal/util/ZoneInfo.java
pache/harmony/luni/internal/util/ZoneInfoDB.java
pache/harmony/luni/lang/reflect/GenericSignatureParser.java
pache/harmony/luni/lang/reflect/ImplForArray.java
pache/harmony/luni/lang/reflect/ImplForType.java
pache/harmony/luni/lang/reflect/ImplForVariable.java
pache/harmony/luni/lang/reflect/ImplForWildcard.java
pache/harmony/luni/lang/reflect/ListOfTypes.java
pache/harmony/luni/lang/reflect/ListOfVariables.java
pache/harmony/luni/lang/reflect/Types.java
pache/harmony/luni/net/GenericIPMreq.java
pache/harmony/luni/net/NetUtil.java
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainMulticastSocketImpl.java
pache/harmony/luni/net/PlainServerSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl2.java
pache/harmony/luni/net/SocketImplProvider.java
pache/harmony/luni/net/SocketInputStream.java
pache/harmony/luni/net/SocketOutputStream.java
pache/harmony/luni/net/Socks4Message.java
pache/harmony/luni/platform/AbstractMemorySpy.java
pache/harmony/luni/platform/AdapterManager.java
pache/harmony/luni/platform/Endianness.java
pache/harmony/luni/platform/FileDescriptorHandler.java
pache/harmony/luni/platform/IAdaptable.java
pache/harmony/luni/platform/IAdapterFactory.java
pache/harmony/luni/platform/IAdapterManager.java
pache/harmony/luni/platform/ICommonDataTypes.java
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/IMemorySpy.java
pache/harmony/luni/platform/IMemorySystem.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/ISystemComponent.java
pache/harmony/luni/platform/MappedPlatformAddress.java
pache/harmony/luni/platform/OSComponent.java
pache/harmony/luni/platform/OSComponentFactory.java
pache/harmony/luni/platform/OSFileSystem.java
pache/harmony/luni/platform/OSMemory.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/luni/platform/Platform.java
pache/harmony/luni/platform/PlatformAddress.java
pache/harmony/luni/platform/PlatformAddressFactory.java
pache/harmony/luni/platform/RuntimeMemorySpy.java
pache/harmony/luni/util/Base64.java
pache/harmony/luni/util/BinarySearch.java
pache/harmony/luni/util/ErrorCodeException.java
pache/harmony/luni/util/ExternalMessages.properties
pache/harmony/luni/util/FloatingPointParser.java
pache/harmony/luni/util/HexStringParser.java
pache/harmony/luni/util/Inet6Util.java
pache/harmony/luni/util/InvalidJarIndexException.java
pache/harmony/luni/util/Msg.java
pache/harmony/luni/util/MsgHelp.java
pache/harmony/luni/util/NotImplementedException.java
pache/harmony/luni/util/NumberConverter.java
pache/harmony/luni/util/OIDDatabase.java
pache/harmony/luni/util/PasswordProtectedInputStream.java
pache/harmony/luni/util/PositionedInputStream.java
pache/harmony/luni/util/PriviAction.java
pache/harmony/luni/util/SHAOutputStream.java
pache/harmony/luni/util/Sorter.java
pache/harmony/luni/util/TwoKeyHashMap.java
pache/harmony/luni/util/URLUtil.java
pache/harmony/luni/util/Util.java
pache/harmony/misc/HashCode.java
pache/harmony/misc/SystemUtils.java
pache/harmony/misc/internal/nls/Messages.java
pache/harmony/misc/internal/nls/messages.properties
1c0fed63c71ddb230f3b304aac12caffbedf2f21 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
pache/harmony/luni/internal/net/www/MimeTable.java
pache/harmony/luni/internal/net/www/protocol/file/FileURLConnection.java
pache/harmony/luni/internal/net/www/protocol/file/Handler.java
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLInputStream.java
pache/harmony/luni/internal/net/www/protocol/ftp/Handler.java
pache/harmony/luni/internal/net/www/protocol/http/Handler.java
pache/harmony/luni/internal/net/www/protocol/http/Header.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConfiguration.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnectionManager.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java
pache/harmony/luni/internal/net/www/protocol/https/Handler.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnection.java
pache/harmony/luni/internal/net/www/protocol/jar/Handler.java
pache/harmony/luni/internal/net/www/protocol/jar/JarURLConnection.java
pache/harmony/luni/internal/net/www/types.properties
pache/harmony/luni/internal/nls/Messages.java
pache/harmony/luni/internal/nls/messages.properties
pache/harmony/luni/internal/reflect/ProxyCharArrayCache.java
pache/harmony/luni/internal/reflect/ProxyClassFile.java
pache/harmony/luni/internal/reflect/ProxyConstantPool.java
pache/harmony/luni/internal/reflect/ProxyConstants.java
pache/harmony/luni/internal/reflect/ProxyMethod.java
pache/harmony/luni/internal/reflect/ProxyNameAndTypeCache.java
pache/harmony/luni/internal/reflect/ProxyObjectCache.java
pache/harmony/luni/internal/util/TimezoneGetter.java
pache/harmony/luni/internal/util/ZoneInfo.java
pache/harmony/luni/internal/util/ZoneInfoDB.java
pache/harmony/luni/lang/reflect/GenericSignatureParser.java
pache/harmony/luni/lang/reflect/ImplForArray.java
pache/harmony/luni/lang/reflect/ImplForType.java
pache/harmony/luni/lang/reflect/ImplForVariable.java
pache/harmony/luni/lang/reflect/ImplForWildcard.java
pache/harmony/luni/lang/reflect/ListOfTypes.java
pache/harmony/luni/lang/reflect/ListOfVariables.java
pache/harmony/luni/lang/reflect/Types.java
pache/harmony/luni/net/GenericIPMreq.java
pache/harmony/luni/net/NetUtil.java
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainMulticastSocketImpl.java
pache/harmony/luni/net/PlainServerSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl2.java
pache/harmony/luni/net/SocketImplProvider.java
pache/harmony/luni/net/SocketInputStream.java
pache/harmony/luni/net/SocketOutputStream.java
pache/harmony/luni/net/Socks4Message.java
pache/harmony/luni/platform/AbstractMemorySpy.java
pache/harmony/luni/platform/AdapterManager.java
pache/harmony/luni/platform/Endianness.java
pache/harmony/luni/platform/FileDescriptorHandler.java
pache/harmony/luni/platform/IAdaptable.java
pache/harmony/luni/platform/IAdapterFactory.java
pache/harmony/luni/platform/IAdapterManager.java
pache/harmony/luni/platform/ICommonDataTypes.java
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/IMemorySpy.java
pache/harmony/luni/platform/IMemorySystem.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/ISystemComponent.java
pache/harmony/luni/platform/MappedPlatformAddress.java
pache/harmony/luni/platform/OSComponent.java
pache/harmony/luni/platform/OSComponentFactory.java
pache/harmony/luni/platform/OSFileSystem.java
pache/harmony/luni/platform/OSMemory.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/luni/platform/Platform.java
pache/harmony/luni/platform/PlatformAddress.java
pache/harmony/luni/platform/PlatformAddressFactory.java
pache/harmony/luni/platform/RuntimeMemorySpy.java
pache/harmony/luni/util/Base64.java
pache/harmony/luni/util/BinarySearch.java
pache/harmony/luni/util/ErrorCodeException.java
pache/harmony/luni/util/ExternalMessages.properties
pache/harmony/luni/util/FloatingPointParser.java
pache/harmony/luni/util/HexStringParser.java
pache/harmony/luni/util/Inet6Util.java
pache/harmony/luni/util/InvalidJarIndexException.java
pache/harmony/luni/util/Msg.java
pache/harmony/luni/util/MsgHelp.java
pache/harmony/luni/util/NotImplementedException.java
pache/harmony/luni/util/NumberConverter.java
pache/harmony/luni/util/OIDDatabase.java
pache/harmony/luni/util/PasswordProtectedInputStream.java
pache/harmony/luni/util/PositionedInputStream.java
pache/harmony/luni/util/PriviAction.java
pache/harmony/luni/util/SHAOutputStream.java
pache/harmony/luni/util/Sorter.java
pache/harmony/luni/util/TwoKeyHashMap.java
pache/harmony/luni/util/URLUtil.java
pache/harmony/luni/util/Util.java
pache/harmony/misc/HashCode.java
pache/harmony/misc/SystemUtils.java
pache/harmony/misc/internal/nls/Messages.java
pache/harmony/misc/internal/nls/messages.properties
b7926325a1c1a370c84c81db80372f59af240a53 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
pache/harmony/luni/internal/net/www/protocol/http/Header.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java
pache/harmony/luni/util/Inet6Util.java
d94c06c605baa7814b787bab7c993775b486ffba 16-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@126645
pache/harmony/luni/lang/reflect/GenericSignatureParser.java
pache/harmony/luni/lang/reflect/ImplForType.java
a0881d052ee72e3f7e773374e9b1aa75fbd6be4c 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
pache/harmony/luni/internal/net/www/protocol/jar/JarURLConnection.java
pache/harmony/luni/lang/reflect/ImplForType.java
dd828f42a5c83b4270d4fbf6fce2da1878f1e84a 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
pache/harmony/luni/internal/net/www/protocol/http/Header.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConfiguration.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnectionManager.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnection.java
pache/harmony/luni/internal/net/www/protocol/jar/JarURLConnection.java
pache/harmony/luni/internal/nls/Messages.java
pache/harmony/luni/internal/nls/messages.properties
pache/harmony/luni/internal/util/ZoneInfo.java
pache/harmony/luni/internal/util/ZoneInfoDB.java
pache/harmony/luni/lang/reflect/GenericSignatureParser.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/platform/AbstractMemorySpy.java
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/IMemorySystem.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/MappedPlatformAddress.java
pache/harmony/luni/platform/OSComponent.java
pache/harmony/luni/platform/OSFileSystem.java
pache/harmony/luni/platform/OSMemory.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/luni/platform/Platform.java
pache/harmony/luni/platform/PlatformAddress.java
pache/harmony/luni/platform/PlatformAddressFactory.java
pache/harmony/luni/util/DeleteOnExit.java
pache/harmony/luni/util/ExternalMessages.properties
pache/harmony/luni/util/Inet6Util.java
pache/harmony/luni/util/Msg.java
pache/harmony/luni/util/MsgHelp.java
pache/harmony/misc/internal/nls/Messages.java
fdb2704414a9ed92394ada0d1395e4db86889465 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
pache/harmony/luni/internal/net/www/MimeTable.java
pache/harmony/luni/internal/net/www/protocol/file/FileURLConnection.java
pache/harmony/luni/internal/net/www/protocol/file/Handler.java
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
pache/harmony/luni/internal/net/www/protocol/ftp/FtpURLInputStream.java
pache/harmony/luni/internal/net/www/protocol/ftp/Handler.java
pache/harmony/luni/internal/net/www/protocol/http/Handler.java
pache/harmony/luni/internal/net/www/protocol/http/Header.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConfiguration.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
pache/harmony/luni/internal/net/www/protocol/http/HttpConnectionManager.java
pache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java
pache/harmony/luni/internal/net/www/protocol/https/Handler.java
pache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnection.java
pache/harmony/luni/internal/net/www/protocol/jar/Handler.java
pache/harmony/luni/internal/net/www/protocol/jar/JarURLConnection.java
pache/harmony/luni/internal/net/www/types.properties
pache/harmony/luni/internal/nls/Messages.java
pache/harmony/luni/internal/nls/messages.properties
pache/harmony/luni/internal/reflect/ProxyCharArrayCache.java
pache/harmony/luni/internal/reflect/ProxyClassFile.java
pache/harmony/luni/internal/reflect/ProxyConstantPool.java
pache/harmony/luni/internal/reflect/ProxyConstants.java
pache/harmony/luni/internal/reflect/ProxyMethod.java
pache/harmony/luni/internal/reflect/ProxyNameAndTypeCache.java
pache/harmony/luni/internal/reflect/ProxyObjectCache.java
pache/harmony/luni/internal/util/TimezoneGetter.java
pache/harmony/luni/lang/reflect/GenericSignatureParser.java
pache/harmony/luni/lang/reflect/ImplForArray.java
pache/harmony/luni/lang/reflect/ImplForType.java
pache/harmony/luni/lang/reflect/ImplForVariable.java
pache/harmony/luni/lang/reflect/ImplForWildcard.java
pache/harmony/luni/lang/reflect/ListOfTypes.java
pache/harmony/luni/lang/reflect/ListOfVariables.java
pache/harmony/luni/lang/reflect/Types.java
pache/harmony/luni/net/GenericIPMreq.java
pache/harmony/luni/net/NetUtil.java
pache/harmony/luni/net/PlainDatagramSocketImpl.java
pache/harmony/luni/net/PlainMulticastSocketImpl.java
pache/harmony/luni/net/PlainServerSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl.java
pache/harmony/luni/net/PlainSocketImpl2.java
pache/harmony/luni/net/SocketImplProvider.java
pache/harmony/luni/net/SocketInputStream.java
pache/harmony/luni/net/SocketOutputStream.java
pache/harmony/luni/net/Socks4Message.java
pache/harmony/luni/platform/AbstractMemorySpy.java
pache/harmony/luni/platform/AdapterManager.java
pache/harmony/luni/platform/Endianness.java
pache/harmony/luni/platform/FileDescriptorHandler.java
pache/harmony/luni/platform/IAdaptable.java
pache/harmony/luni/platform/IAdapterFactory.java
pache/harmony/luni/platform/IAdapterManager.java
pache/harmony/luni/platform/ICommonDataTypes.java
pache/harmony/luni/platform/IFileSystem.java
pache/harmony/luni/platform/IMemorySpy.java
pache/harmony/luni/platform/IMemorySystem.java
pache/harmony/luni/platform/INetworkSystem.java
pache/harmony/luni/platform/ISystemComponent.java
pache/harmony/luni/platform/MappedPlatformAddress.java
pache/harmony/luni/platform/OSComponent.java
pache/harmony/luni/platform/OSComponentFactory.java
pache/harmony/luni/platform/OSFileSystem.java
pache/harmony/luni/platform/OSMemory.java
pache/harmony/luni/platform/OSNetworkSystem.java
pache/harmony/luni/platform/Platform.java
pache/harmony/luni/platform/PlatformAddress.java
pache/harmony/luni/platform/PlatformAddressFactory.java
pache/harmony/luni/platform/RuntimeMemorySpy.java
pache/harmony/luni/util/Base64.java
pache/harmony/luni/util/BinarySearch.java
pache/harmony/luni/util/DeleteOnExit.java
pache/harmony/luni/util/ErrorCodeException.java
pache/harmony/luni/util/ExternalMessages.properties
pache/harmony/luni/util/FloatingPointParser.java
pache/harmony/luni/util/HexStringParser.java
pache/harmony/luni/util/Inet6Util.java
pache/harmony/luni/util/InvalidJarIndexException.java
pache/harmony/luni/util/Msg.java
pache/harmony/luni/util/MsgHelp.java
pache/harmony/luni/util/NotImplementedException.java
pache/harmony/luni/util/NumberConverter.java
pache/harmony/luni/util/OIDDatabase.java
pache/harmony/luni/util/PasswordProtectedInputStream.java
pache/harmony/luni/util/PositionedInputStream.java
pache/harmony/luni/util/PriviAction.java
pache/harmony/luni/util/SHAOutputStream.java
pache/harmony/luni/util/Sorter.java
pache/harmony/luni/util/TwoKeyHashMap.java
pache/harmony/luni/util/URLUtil.java
pache/harmony/luni/util/Util.java
pache/harmony/misc/HashCode.java
pache/harmony/misc/SystemUtils.java
pache/harmony/misc/internal/nls/Messages.java
pache/harmony/misc/internal/nls/messages.properties