diff options
Diffstat (limited to 'x-net/src')
9 files changed, 11 insertions, 50 deletions
diff --git a/x-net/src/main/java/javax/net/package.html b/x-net/src/main/java/javax/net/package.html index 27ba790..5674d06 100644 --- a/x-net/src/main/java/javax/net/package.html +++ b/x-net/src/main/java/javax/net/package.html @@ -3,14 +3,5 @@ <p> This package provides factory classes to create sockets and server-sockets. This classes can be subclassed to create factories for other kinds of socket for example the SSL-capable sockets from the package javax.net.ssl. </p> - @since Android 1.0 - </body> -</html> -<html> - <body> - <p> - This package provides factory classes to create sockets and server-sockets. This classes can be subclassed to create factories for other kinds of socket for example the SSL-capable sockets from the package javax.net.ssl. - </p> - @since Android 1.0 </body> </html> diff --git a/x-net/src/main/java/javax/net/ssl/DefaultSSLServerSocketFactory.java b/x-net/src/main/java/javax/net/ssl/DefaultSSLServerSocketFactory.java index 6620841..3e58897 100644 --- a/x-net/src/main/java/javax/net/ssl/DefaultSSLServerSocketFactory.java +++ b/x-net/src/main/java/javax/net/ssl/DefaultSSLServerSocketFactory.java @@ -24,8 +24,6 @@ import java.net.SocketException; /** * Default inoperative implementation of javax.net.ssl.SSLServerSocketFactory - * - * @since Android 1.0 */ class DefaultSSLServerSocketFactory extends SSLServerSocketFactory { diff --git a/x-net/src/main/java/javax/net/ssl/package.html b/x-net/src/main/java/javax/net/ssl/package.html index 3e6448e..14753c8 100644 --- a/x-net/src/main/java/javax/net/ssl/package.html +++ b/x-net/src/main/java/javax/net/ssl/package.html @@ -5,7 +5,7 @@ <html> <body> <p> -This package provides all the classes and interfaces needed to implemenet and program the Secure Socket +This package provides all the classes and interfaces needed to implement and program the Secure Socket abstraction based on the SSL protocol SSSLv3.0 or TLSv1.2. All the details of the SSL handshake protocol are accounted for, and a client or a server can specify the cipher set to use. @@ -13,14 +13,8 @@ set to use. X.509 certificates are verified, and, if desired, the client and the server each have the option of verifying the entire certificate chain until the root Certificate Authority is reached. -Notice that the Android javax.net.ssl package uses the OpenSSL Library to implement the low level -SSL functionality. All the relevant OpenSSl write(...) and read(...) functions are hidden within two -JNI files. The signatures of all the Java SSL methods are compliant with the Java 5.0 -specification. - -The provider for all SSL cryptological tools is The Legion of Bouncy Castle (http://www.bouncycastle.org). +Android uses code from The Legion of the Bouncy Castle (http://www.bouncycastle.org) and OpenSSL (http://openssl.org). </p> -@since Android 1.0 </body> -</html>
\ No newline at end of file +</html> diff --git a/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLContextImpl.java b/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLContextImpl.java index c39e3ff..34942e1 100644 --- a/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLContextImpl.java +++ b/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLContextImpl.java @@ -73,8 +73,6 @@ public class SSLContextImpl extends SSLContextSpi { * @param clientCache persistent client session cache or {@code null} * @param serverCache persistent server session cache or {@code null} * @throws KeyManagementException if initializing this instance fails - * - * @since Android 1.1 */ public void engineInit(KeyManager[] kms, TrustManager[] tms, SecureRandom sr, SSLClientSessionCache clientCache, @@ -126,4 +124,4 @@ public class SSLContextImpl extends SSLContextSpi { public ClientSessionContext engineGetClientSessionContext() { return clientSessionContext; } -}
\ No newline at end of file +} diff --git a/x-net/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp b/x-net/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp index 6319bbf..086f858 100644 --- a/x-net/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp +++ b/x-net/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp @@ -1655,11 +1655,11 @@ static void org_apache_harmony_xnet_provider_jsse_OpenSSLSocketImpl_accept(JNIEn */ int sslErrorCode = SSL_get_error(ssl, ret); if (sslErrorCode == SSL_ERROR_NONE || - (sslErrorCode == SSL_ERROR_SYSCALL && errno == 0)) { - throwIOExceptionStr(env, "Connection closed by peer"); + (sslErrorCode == SSL_ERROR_SYSCALL && errno == 0)) { + throwIOExceptionStr(env, "Connection closed by peer"); } else { - throwIOExceptionWithSslErrors(env, ret, sslErrorCode, - "Trouble accepting connection"); + throwIOExceptionWithSslErrors(env, ret, sslErrorCode, + "Trouble accepting connection"); } free_ssl(env, object); return; diff --git a/x-net/src/test/java/tests/api/javax/net/AllTests.java b/x-net/src/test/java/tests/api/javax/net/AllTests.java index 90c2a6a..35cd6f5 100644 --- a/x-net/src/test/java/tests/api/javax/net/AllTests.java +++ b/x-net/src/test/java/tests/api/javax/net/AllTests.java @@ -24,13 +24,8 @@ import junit.framework.TestSuite; */ public class AllTests { - - public static void main(String[] args) { - junit.textui.TestRunner.run(AllTests.suite()); - } - public static Test suite() { - TestSuite suite = tests.TestSuiteFactory.createTestSuite("All tests for package tests.api.javax.net;"); + TestSuite suite = new TestSuite("All tests for package tests.api.javax.net;"); // $JUnit-BEGIN$ suite.addTestSuite(ServerSocketFactoryTest.class); diff --git a/x-net/src/test/java/tests/api/javax/net/ssl/AllTests.java b/x-net/src/test/java/tests/api/javax/net/ssl/AllTests.java index ecfe83f..5f9c32d 100644 --- a/x-net/src/test/java/tests/api/javax/net/ssl/AllTests.java +++ b/x-net/src/test/java/tests/api/javax/net/ssl/AllTests.java @@ -24,13 +24,8 @@ import junit.framework.TestSuite; */ public class AllTests { - - public static void main(String[] args) { - junit.textui.TestRunner.run(AllTests.suite()); - } - public static Test suite() { - TestSuite suite = tests.TestSuiteFactory.createTestSuite("All tests for package tests.api.javax.net.ssl;"); + TestSuite suite = new TestSuite("All tests for package tests.api.javax.net.ssl;"); // $JUnit-BEGIN$ suite.addTestSuite(CertPathTrustManagerParametersTest.class); diff --git a/x-net/src/test/java/tests/api/javax/net/ssl/SSLEngineTest.java b/x-net/src/test/java/tests/api/javax/net/ssl/SSLEngineTest.java index f659919..8205059 100644 --- a/x-net/src/test/java/tests/api/javax/net/ssl/SSLEngineTest.java +++ b/x-net/src/test/java/tests/api/javax/net/ssl/SSLEngineTest.java @@ -62,10 +62,6 @@ public class SSLEngineTest extends TestCase { private HandshakeHandler clientEngine; private HandshakeHandler serverEngine; - public static void main(String[] args) { - junit.textui.TestRunner.run(SSLEngineTest.class); - } - @Override protected void setUp() throws Exception { super.setUp(); TestEnvironment.reset(); diff --git a/x-net/src/test/java/tests/xnet/AllTests.java b/x-net/src/test/java/tests/xnet/AllTests.java index 53b11dc..04a2ed6 100644 --- a/x-net/src/test/java/tests/xnet/AllTests.java +++ b/x-net/src/test/java/tests/xnet/AllTests.java @@ -23,14 +23,8 @@ import junit.framework.TestSuite; * Test suite that includes all tests for the Math project. */ public class AllTests { - - public static void main(String[] args) { - junit.textui.TestRunner.run(AllTests.suite()); - } - public static Test suite() { - TestSuite suite = tests.TestSuiteFactory.createTestSuite( - "All javax.net and javax.net.ssl test suites"); + TestSuite suite = new TestSuite("All javax.net and javax.net.ssl test suites"); // $JUnit-BEGIN$ suite.addTest(tests.api.javax.net.AllTests.suite()); suite.addTest(tests.api.javax.net.ssl.AllTests.suite()); |