harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r426424 - /incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/
Date Fri, 28 Jul 2006 07:59:49 GMT
Author: mloenko
Date: Fri Jul 28 00:59:48 2006
New Revision: 426424

URL: http://svn.apache.org/viewvc?rev=426424&view=rev
Log:
applied patch for HARMONY-959 ([classlib][x-net] split impl vs. api tests)
for now it's just putting things in order, it will be easy to adapt the structure to what we agree about dirs/testNG/etc

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactory.java
    incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLContext.java
    incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLHandshakeException.java
    incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLKeyException.java
    incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLPeerUnverifiedException.java
    incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLPermission.java
    incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLProtocolException.java
    incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/TrustManagerFactory.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactory.java?rev=426424&r1=426423&r2=426424&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactory.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactory.java Fri Jul 28 00:59:48 2006
@@ -1,186 +1,186 @@
-/*
- *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
-package javax.net.ssl;
-
-import java.security.AccessController;
-import java.security.InvalidAlgorithmParameterException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
-import java.security.Provider;
-import java.security.Security;
-import java.security.UnrecoverableKeyException;
-
-import org.apache.harmony.security.fortress.Engine;
-
-
-/**
- * @com.intel.drl.spec_ref
- * 
- */
-
-public class KeyManagerFactory {
-    // Store KeyManagerFactory service name
-    private static final String SERVICE = "KeyManagerFactory";
-
-    // Used to access common engine functionality
-    private static Engine engine = new Engine(SERVICE);
-
-    // Store default property name
-    private static final String PROPERTY_NAME = "ssl.KeyManagerFactory.algorithm";
-
-    // Store used provider
-    private final Provider provider;
-
-    // Store used KeyManagerFactorySpi implementation
-    private final KeyManagerFactorySpi spiImpl;
-
-    // Store used algorithm
-    private final String algorithm;
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    protected KeyManagerFactory(KeyManagerFactorySpi factorySpi,
-            Provider provider, String algorithm) {
-        this.provider = provider;
-        this.algorithm = algorithm;
-        this.spiImpl = factorySpi;
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final String getAlgorithm() {
-        return algorithm;
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     * 
-     * throws NullPointerException if algorithm is null (instead of
-     * NoSuchAlgorithmException as in 1.4 release)
-     */
-    public static final KeyManagerFactory getInstance(String algorithm)
-            throws NoSuchAlgorithmException {
-        if (algorithm == null) {
-            throw new NullPointerException("algorith is null");
-        }
-        synchronized (engine) {
-            engine.getInstance(algorithm, null);
-            return new KeyManagerFactory((KeyManagerFactorySpi) engine.spi,
-                    engine.provider, algorithm);
-        }
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     * 
-     * throws NullPointerException if algorithm is null (instead of
-     * NoSuchAlgorithmException as in 1.4 release)
-     */
-    public static final KeyManagerFactory getInstance(String algorithm,
-            String provider) throws NoSuchAlgorithmException,
-            NoSuchProviderException {
-        if ((provider == null) || (provider.length() == 0)) {
-            throw new IllegalArgumentException("Provider is null or empty");
-        }
-        Provider impProvider = Security.getProvider(provider);
-        if (impProvider == null) {
-            throw new NoSuchProviderException(provider);
-        }
-        return getInstance(algorithm, impProvider);
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     * 
-     * throws NullPointerException if algorithm is null (instead of
-     * NoSuchAlgorithmException as in 1.4 release)
-     */
-    public static final KeyManagerFactory getInstance(String algorithm,
-            Provider provider) throws NoSuchAlgorithmException {
-        if (provider == null) {
-            throw new IllegalArgumentException("Provider is null");
-        }
-        if (algorithm == null) {
-            throw new NullPointerException("algorith is null");
-        }
-        synchronized (engine) {
-            engine.getInstance(algorithm, provider, null);
-            return new KeyManagerFactory((KeyManagerFactorySpi) engine.spi,
-                    provider, algorithm);
-        }
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final Provider getProvider() {
-        return provider;
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final void init(KeyStore ks, char[] password)
-            throws KeyStoreException, NoSuchAlgorithmException,
-            UnrecoverableKeyException {
-        spiImpl.engineInit(ks, password);
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final void init(ManagerFactoryParameters spec)
-            throws InvalidAlgorithmParameterException {
-        spiImpl.engineInit(spec);
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final KeyManager[] getKeyManagers() {
-        return spiImpl.engineGetKeyManagers();
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public static final String getDefaultAlgorithm() {
-        return (String) AccessController.doPrivileged(
-            new java.security.PrivilegedAction() {
-                public Object run() {
-                    return Security.getProperty(PROPERTY_NAME);
-                }
-            }
-         );
-    }
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+* @author Vera Y. Petrashkova
+* @version $Revision$
+*/
+
+package javax.net.ssl;
+
+import java.security.AccessController;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.Provider;
+import java.security.Security;
+import java.security.UnrecoverableKeyException;
+
+import org.apache.harmony.security.fortress.Engine;
+
+
+/**
+ * @com.intel.drl.spec_ref
+ * 
+ */
+
+public class KeyManagerFactory {
+    // Store KeyManagerFactory service name
+    private static final String SERVICE = "KeyManagerFactory";
+
+    // Used to access common engine functionality
+    private static Engine engine = new Engine(SERVICE);
+
+    // Store default property name
+    private static final String PROPERTY_NAME = "ssl.KeyManagerFactory.algorithm";
+
+    // Store used provider
+    private final Provider provider;
+
+    // Store used KeyManagerFactorySpi implementation
+    private final KeyManagerFactorySpi spiImpl;
+
+    // Store used algorithm
+    private final String algorithm;
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    protected KeyManagerFactory(KeyManagerFactorySpi factorySpi,
+            Provider provider, String algorithm) {
+        this.provider = provider;
+        this.algorithm = algorithm;
+        this.spiImpl = factorySpi;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public final String getAlgorithm() {
+        return algorithm;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     * 
+     * throws NullPointerException if algorithm is null (instead of
+     * NoSuchAlgorithmException as in 1.4 release)
+     */
+    public static final KeyManagerFactory getInstance(String algorithm)
+            throws NoSuchAlgorithmException {
+        if (algorithm == null) {
+            throw new NullPointerException("algorith is null");
+        }
+        synchronized (engine) {
+            engine.getInstance(algorithm, null);
+            return new KeyManagerFactory((KeyManagerFactorySpi) engine.spi,
+                    engine.provider, algorithm);
+        }
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     * 
+     * throws NullPointerException if algorithm is null (instead of
+     * NoSuchAlgorithmException as in 1.4 release)
+     */
+    public static final KeyManagerFactory getInstance(String algorithm,
+            String provider) throws NoSuchAlgorithmException,
+            NoSuchProviderException {
+        if ((provider == null) || (provider.length() == 0)) {
+            throw new IllegalArgumentException("Provider is null or empty");
+        }
+        Provider impProvider = Security.getProvider(provider);
+        if (impProvider == null) {
+            throw new NoSuchProviderException(provider);
+        }
+        return getInstance(algorithm, impProvider);
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     * 
+     * throws NullPointerException if algorithm is null (instead of
+     * NoSuchAlgorithmException as in 1.4 release)
+     */
+    public static final KeyManagerFactory getInstance(String algorithm,
+            Provider provider) throws NoSuchAlgorithmException {
+        if (provider == null) {
+            throw new IllegalArgumentException("Provider is null");
+        }
+        if (algorithm == null) {
+            throw new NullPointerException("algorith is null");
+        }
+        synchronized (engine) {
+            engine.getInstance(algorithm, provider, null);
+            return new KeyManagerFactory((KeyManagerFactorySpi) engine.spi,
+                    provider, algorithm);
+        }
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public final Provider getProvider() {
+        return provider;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public final void init(KeyStore ks, char[] password)
+            throws KeyStoreException, NoSuchAlgorithmException,
+            UnrecoverableKeyException {
+        spiImpl.engineInit(ks, password);
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public final void init(ManagerFactoryParameters spec)
+            throws InvalidAlgorithmParameterException {
+        spiImpl.engineInit(spec);
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public final KeyManager[] getKeyManagers() {
+        return spiImpl.engineGetKeyManagers();
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public static final String getDefaultAlgorithm() {
+        return (String) AccessController.doPrivileged(
+            new java.security.PrivilegedAction() {
+                public Object run() {
+                    return Security.getProperty(PROPERTY_NAME);
+                }
+            }
+         );
+    }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLContext.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLContext.java?rev=426424&r1=426423&r2=426424&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLContext.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLContext.java Fri Jul 28 00:59:48 2006
@@ -1,198 +1,198 @@
-/*
- *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
-package javax.net.ssl;
-
-import java.security.KeyManagementException;
-import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
-import java.security.Provider;
-import java.security.SecureRandom;
-import java.security.Security;
-
-import org.apache.harmony.security.fortress.Engine;
-
-
-/**
- * @com.intel.drl.spec_ref
- * 
- */
-
-public class SSLContext {
-    // StoreSSLContext service name
-    private static final String SERVICE = "SSLContext";
-
-    // Used to access common engine functionality
-    private static Engine engine = new Engine(SERVICE);
-
-    // Storeused provider
-    private final Provider provider;
-
-    // Storeused SSLContextSpi implementation
-    private final SSLContextSpi spiImpl;
-
-    // Storeused protocol
-    private final String protocol;
-
-    /*
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    protected SSLContext(SSLContextSpi contextSpi, Provider provider,
-            String protocol) {
-        this.provider = provider;
-        this.protocol = protocol;
-        this.spiImpl = contextSpi;
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     * 
-     * throws NullPointerException if protocol is null (instead of
-     * NoSuchAlgorithmException as in 1.4 release)
-     */
-    public static SSLContext getInstance(String protocol)
-            throws NoSuchAlgorithmException {
-        if (protocol == null) {
-            throw new NullPointerException("protocol is null");
-        }
-        synchronized (engine) {
-            engine.getInstance(protocol, null);
-            return new SSLContext((SSLContextSpi) engine.spi, engine.provider,
-                    protocol);
-        }
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     * 
-     * throws NullPointerException if protocol is null (instead of
-     * NoSuchAlgorithmException as in 1.4 release)
-     */
-    public static SSLContext getInstance(String protocol, String provider)
-            throws NoSuchAlgorithmException, NoSuchProviderException {
-        if (provider == null) {
-            throw new IllegalArgumentException("Provider is null");
-        }
-        if (provider.length() == 0) {
-            throw new IllegalArgumentException("Provider is empty");
-        }
-        Provider impProvider = Security.getProvider(provider);
-        if (impProvider == null) {
-            throw new NoSuchProviderException(provider);
-        }
-        return getInstance(protocol, impProvider);
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     * 
-     * throws NullPointerException if protocol is null (instead of
-     * NoSuchAlgorithmException as in 1.4 release)
-     */
-    public static SSLContext getInstance(String protocol, Provider provider)
-            throws NoSuchAlgorithmException {
-        if (provider == null) {
-            throw new IllegalArgumentException("provider is null");
-        }
-        if (protocol == null) {
-            throw new NullPointerException("protocol is null");
-        }
-        synchronized (engine) {
-            engine.getInstance(protocol, provider, null);
-            return new SSLContext((SSLContextSpi) engine.spi, provider, protocol);
-        }
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final String getProtocol() {
-        return protocol;
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final Provider getProvider() {
-        return provider;
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     * 
-     * FIXME: check what exception will be thrown when parameters are null
-     */
-    public final void init(KeyManager[] km, TrustManager[] tm, SecureRandom sr)
-            throws KeyManagementException {
-        spiImpl.engineInit(km, tm, sr);
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final SSLSocketFactory getSocketFactory() {
-        return spiImpl.engineGetSocketFactory();
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final SSLServerSocketFactory getServerSocketFactory() {
-        return spiImpl.engineGetServerSocketFactory();
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final SSLEngine createSSLEngine() {
-        return spiImpl.engineCreateSSLEngine();
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final SSLEngine createSSLEngine(String peerHost, int peerPort) {
-        return spiImpl.engineCreateSSLEngine(peerHost, peerPort);
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final SSLSessionContext getServerSessionContext() {
-        return spiImpl.engineGetServerSessionContext();
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final SSLSessionContext getClientSessionContext() {
-        return spiImpl.engineGetClientSessionContext();
-    }
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+* @author Vera Y. Petrashkova
+* @version $Revision$
+*/
+
+package javax.net.ssl;
+
+import java.security.KeyManagementException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.Provider;
+import java.security.SecureRandom;
+import java.security.Security;
+
+import org.apache.harmony.security.fortress.Engine;
+
+
+/**
+ * @com.intel.drl.spec_ref
+ * 
+ */
+
+public class SSLContext {
+    // StoreSSLContext service name
+    private static final String SERVICE = "SSLContext";
+
+    // Used to access common engine functionality
+    private static Engine engine = new Engine(SERVICE);
+
+    // Storeused provider
+    private final Provider provider;
+
+    // Storeused SSLContextSpi implementation
+    private final SSLContextSpi spiImpl;
+
+    // Storeused protocol
+    private final String protocol;
+
+    /*
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    protected SSLContext(SSLContextSpi contextSpi, Provider provider,
+            String protocol) {
+        this.provider = provider;
+        this.protocol = protocol;
+        this.spiImpl = contextSpi;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     * 
+     * throws NullPointerException if protocol is null (instead of
+     * NoSuchAlgorithmException as in 1.4 release)
+     */
+    public static SSLContext getInstance(String protocol)
+            throws NoSuchAlgorithmException {
+        if (protocol == null) {
+            throw new NullPointerException("protocol is null");
+        }
+        synchronized (engine) {
+            engine.getInstance(protocol, null);
+            return new SSLContext((SSLContextSpi) engine.spi, engine.provider,
+                    protocol);
+        }
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     * 
+     * throws NullPointerException if protocol is null (instead of
+     * NoSuchAlgorithmException as in 1.4 release)
+     */
+    public static SSLContext getInstance(String protocol, String provider)
+            throws NoSuchAlgorithmException, NoSuchProviderException {
+        if (provider == null) {
+            throw new IllegalArgumentException("Provider is null");
+        }
+        if (provider.length() == 0) {
+            throw new IllegalArgumentException("Provider is empty");
+        }
+        Provider impProvider = Security.getProvider(provider);
+        if (impProvider == null) {
+            throw new NoSuchProviderException(provider);
+        }
+        return getInstance(protocol, impProvider);
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     * 
+     * throws NullPointerException if protocol is null (instead of
+     * NoSuchAlgorithmException as in 1.4 release)
+     */
+    public static SSLContext getInstance(String protocol, Provider provider)
+            throws NoSuchAlgorithmException {
+        if (provider == null) {
+            throw new IllegalArgumentException("provider is null");
+        }
+        if (protocol == null) {
+            throw new NullPointerException("protocol is null");
+        }
+        synchronized (engine) {
+            engine.getInstance(protocol, provider, null);
+            return new SSLContext((SSLContextSpi) engine.spi, provider, protocol);
+        }
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public final String getProtocol() {
+        return protocol;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public final Provider getProvider() {
+        return provider;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     * 
+     * FIXME: check what exception will be thrown when parameters are null
+     */
+    public final void init(KeyManager[] km, TrustManager[] tm, SecureRandom sr)
+            throws KeyManagementException {
+        spiImpl.engineInit(km, tm, sr);
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public final SSLSocketFactory getSocketFactory() {
+        return spiImpl.engineGetSocketFactory();
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public final SSLServerSocketFactory getServerSocketFactory() {
+        return spiImpl.engineGetServerSocketFactory();
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public final SSLEngine createSSLEngine() {
+        return spiImpl.engineCreateSSLEngine();
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public final SSLEngine createSSLEngine(String peerHost, int peerPort) {
+        return spiImpl.engineCreateSSLEngine(peerHost, peerPort);
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public final SSLSessionContext getServerSessionContext() {
+        return spiImpl.engineGetServerSessionContext();
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public final SSLSessionContext getClientSessionContext() {
+        return spiImpl.engineGetClientSessionContext();
+    }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLHandshakeException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLHandshakeException.java?rev=426424&r1=426423&r2=426424&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLHandshakeException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLHandshakeException.java Fri Jul 28 00:59:48 2006
@@ -1,39 +1,39 @@
-/*
- *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
-package javax.net.ssl;
-
-/**
- * @com.intel.drl.spec_ref
- * 
- */
-public class SSLHandshakeException extends SSLException {
-    
-    private static final long serialVersionUID = -5045881315018326890L;
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public SSLHandshakeException(String reason) {
-        super(reason);
-    }
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+* @author Vera Y. Petrashkova
+* @version $Revision$
+*/
+
+package javax.net.ssl;
+
+/**
+ * @com.intel.drl.spec_ref
+ * 
+ */
+public class SSLHandshakeException extends SSLException {
+    
+    private static final long serialVersionUID = -5045881315018326890L;
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public SSLHandshakeException(String reason) {
+        super(reason);
+    }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLKeyException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLKeyException.java?rev=426424&r1=426423&r2=426424&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLKeyException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLKeyException.java Fri Jul 28 00:59:48 2006
@@ -1,39 +1,39 @@
-/*
- *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
-package javax.net.ssl;
-
-/**
- * @com.intel.drl.spec_ref
- * 
- */
-public class SSLKeyException extends SSLException {
-
-    private static final long serialVersionUID = -8071664081941937874L;
-    
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public SSLKeyException(String reason) {
-        super(reason);
-    }
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+* @author Vera Y. Petrashkova
+* @version $Revision$
+*/
+
+package javax.net.ssl;
+
+/**
+ * @com.intel.drl.spec_ref
+ * 
+ */
+public class SSLKeyException extends SSLException {
+
+    private static final long serialVersionUID = -8071664081941937874L;
+    
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public SSLKeyException(String reason) {
+        super(reason);
+    }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLPeerUnverifiedException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLPeerUnverifiedException.java?rev=426424&r1=426423&r2=426424&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLPeerUnverifiedException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLPeerUnverifiedException.java Fri Jul 28 00:59:48 2006
@@ -1,39 +1,39 @@
-/*
- *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
-package javax.net.ssl;
-
-/**
- * @com.intel.drl.spec_ref
- * 
- */
-public class SSLPeerUnverifiedException extends SSLException {
-    
-    private static final long serialVersionUID = -8919512675000600547L;
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public SSLPeerUnverifiedException(String reason) {
-        super(reason);
-    }
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+* @author Vera Y. Petrashkova
+* @version $Revision$
+*/
+
+package javax.net.ssl;
+
+/**
+ * @com.intel.drl.spec_ref
+ * 
+ */
+public class SSLPeerUnverifiedException extends SSLException {
+    
+    private static final long serialVersionUID = -8919512675000600547L;
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public SSLPeerUnverifiedException(String reason) {
+        super(reason);
+    }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLPermission.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLPermission.java?rev=426424&r1=426423&r2=426424&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLPermission.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLPermission.java Fri Jul 28 00:59:48 2006
@@ -1,41 +1,41 @@
-/*
- *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-/**
-* @author Boris V. Kuznetsov
-* @version $Revision$
-*/
-
-package javax.net.ssl;
-
-import java.security.BasicPermission;
-
-/**
- * @com.intel.drl.spec_ref
- * 
- */
-public final class SSLPermission extends BasicPermission {
-    
-    private static final long serialVersionUID = -3456898025505876775L;
-    
-    public SSLPermission(String name) {
-        super(name);
-    }
-
-    public SSLPermission(String name, String actions) {
-        super(name, actions);
-    }
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+* @author Boris V. Kuznetsov
+* @version $Revision$
+*/
+
+package javax.net.ssl;
+
+import java.security.BasicPermission;
+
+/**
+ * @com.intel.drl.spec_ref
+ * 
+ */
+public final class SSLPermission extends BasicPermission {
+    
+    private static final long serialVersionUID = -3456898025505876775L;
+    
+    public SSLPermission(String name) {
+        super(name);
+    }
+
+    public SSLPermission(String name, String actions) {
+        super(name, actions);
+    }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLProtocolException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLProtocolException.java?rev=426424&r1=426423&r2=426424&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLProtocolException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/SSLProtocolException.java Fri Jul 28 00:59:48 2006
@@ -1,39 +1,39 @@
-/*
- *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
-package javax.net.ssl;
-
-/**
- * @com.intel.drl.spec_ref
- * 
- */
-public class SSLProtocolException extends SSLException {
-    
-    private static final long serialVersionUID = 5445067063799134928L;
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public SSLProtocolException(String reason) {
-        super(reason);
-    }
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+* @author Vera Y. Petrashkova
+* @version $Revision$
+*/
+
+package javax.net.ssl;
+
+/**
+ * @com.intel.drl.spec_ref
+ * 
+ */
+public class SSLProtocolException extends SSLException {
+    
+    private static final long serialVersionUID = 5445067063799134928L;
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public SSLProtocolException(String reason) {
+        super(reason);
+    }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/TrustManagerFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/TrustManagerFactory.java?rev=426424&r1=426423&r2=426424&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/TrustManagerFactory.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/TrustManagerFactory.java Fri Jul 28 00:59:48 2006
@@ -1,183 +1,183 @@
-/*
- *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
-package javax.net.ssl;
-
-import java.security.AccessController;
-import java.security.InvalidAlgorithmParameterException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
-import java.security.Provider;
-import java.security.Security;
-
-import org.apache.harmony.security.fortress.Engine;
-
-
-/**
- * @com.intel.drl.spec_ref
- * 
- */
-
-public class TrustManagerFactory {
-    // Store TrustManager service name
-    private static final String SERVICE = "TrustManagerFactory";
-
-    // Used to access common engine functionality
-    private static Engine engine = new Engine(SERVICE);
-
-    // Store default property name
-    private static final String PROPERTYNAME = "ssl.TrustManagerFactory.algorithm";
-
-    // Store used provider
-    private final Provider provider;
-
-    // Storeused TrustManagerFactorySpi implementation
-    private final TrustManagerFactorySpi spiImpl;
-
-    // Store used algorithm
-    private final String algorithm;
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    protected TrustManagerFactory(TrustManagerFactorySpi factorySpi,
-            Provider provider, String algorithm) {
-        this.provider = provider;
-        this.algorithm = algorithm;
-        this.spiImpl = factorySpi;
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final String getAlgorithm() {
-        return algorithm;
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     * 
-     * throws NullPointerException if algorithm is null (instead of
-     * NoSuchAlgorithmException as in 1.4 release)
-     */
-    public static final TrustManagerFactory getInstance(String algorithm)
-            throws NoSuchAlgorithmException {
-        if (algorithm == null) {
-            throw new NullPointerException("algorithm is null");
-        }
-        synchronized (engine) {
-            engine.getInstance(algorithm, null);
-            return new TrustManagerFactory((TrustManagerFactorySpi) engine.spi,
-                    engine.provider, algorithm);
-        }
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     * 
-     * throws NullPointerException if algorithm is null (instead of
-     * NoSuchAlgorithmException as in 1.4 release)
-     */
-    public static final TrustManagerFactory getInstance(String algorithm,
-            String provider) throws NoSuchAlgorithmException,
-            NoSuchProviderException {
-        if ((provider == null) || (provider.length() == 0)) {
-            throw new IllegalArgumentException("Provider is null oe empty");
-        }
-        Provider impProvider = Security.getProvider(provider);
-        if (impProvider == null) {
-            throw new NoSuchProviderException(provider);
-        }
-        return getInstance(algorithm, impProvider);
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     * 
-     * throws NullPointerException if algorithm is null (instead of
-     * NoSuchAlgorithmException as in 1.4 release)
-     */
-    public static final TrustManagerFactory getInstance(String algorithm,
-            Provider provider) throws NoSuchAlgorithmException {
-        if (provider == null) {
-            throw new IllegalArgumentException("Provider is null");
-        }
-        if (algorithm == null) {
-            throw new NullPointerException("algorithm is null");
-        }
-        synchronized (engine) {
-            engine.getInstance(algorithm, provider, null);
-            return new TrustManagerFactory((TrustManagerFactorySpi) engine.spi,
-                    provider, algorithm);
-        }
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final Provider getProvider() {
-        return provider;
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final void init(KeyStore ks) throws KeyStoreException {
-        spiImpl.engineInit(ks);
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final void init(ManagerFactoryParameters spec)
-            throws InvalidAlgorithmParameterException {
-        spiImpl.engineInit(spec);
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public final TrustManager[] getTrustManagers() {
-        return spiImpl.engineGetTrustManagers();
-    }
-
-    /**
-     * @com.intel.drl.spec_ref
-     *  
-     */
-    public static final String getDefaultAlgorithm() {
-        return (String) AccessController.doPrivileged(
-            new java.security.PrivilegedAction() {
-                public Object run() {
-                    return Security.getProperty(PROPERTYNAME);
-                }
-            }
-         );
-    }
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+* @author Vera Y. Petrashkova
+* @version $Revision$
+*/
+
+package javax.net.ssl;
+
+import java.security.AccessController;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.Provider;
+import java.security.Security;
+
+import org.apache.harmony.security.fortress.Engine;
+
+
+/**
+ * @com.intel.drl.spec_ref
+ * 
+ */
+
+public class TrustManagerFactory {
+    // Store TrustManager service name
+    private static final String SERVICE = "TrustManagerFactory";
+
+    // Used to access common engine functionality
+    private static Engine engine = new Engine(SERVICE);
+
+    // Store default property name
+    private static final String PROPERTYNAME = "ssl.TrustManagerFactory.algorithm";
+
+    // Store used provider
+    private final Provider provider;
+
+    // Storeused TrustManagerFactorySpi implementation
+    private final TrustManagerFactorySpi spiImpl;
+
+    // Store used algorithm
+    private final String algorithm;
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    protected TrustManagerFactory(TrustManagerFactorySpi factorySpi,
+            Provider provider, String algorithm) {
+        this.provider = provider;
+        this.algorithm = algorithm;
+        this.spiImpl = factorySpi;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public final String getAlgorithm() {
+        return algorithm;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     * 
+     * throws NullPointerException if algorithm is null (instead of
+     * NoSuchAlgorithmException as in 1.4 release)
+     */
+    public static final TrustManagerFactory getInstance(String algorithm)
+            throws NoSuchAlgorithmException {
+        if (algorithm == null) {
+            throw new NullPointerException("algorithm is null");
+        }
+        synchronized (engine) {
+            engine.getInstance(algorithm, null);
+            return new TrustManagerFactory((TrustManagerFactorySpi) engine.spi,
+                    engine.provider, algorithm);
+        }
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     * 
+     * throws NullPointerException if algorithm is null (instead of
+     * NoSuchAlgorithmException as in 1.4 release)
+     */
+    public static final TrustManagerFactory getInstance(String algorithm,
+            String provider) throws NoSuchAlgorithmException,
+            NoSuchProviderException {
+        if ((provider == null) || (provider.length() == 0)) {
+            throw new IllegalArgumentException("Provider is null oe empty");
+        }
+        Provider impProvider = Security.getProvider(provider);
+        if (impProvider == null) {
+            throw new NoSuchProviderException(provider);
+        }
+        return getInstance(algorithm, impProvider);
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     * 
+     * throws NullPointerException if algorithm is null (instead of
+     * NoSuchAlgorithmException as in 1.4 release)
+     */
+    public static final TrustManagerFactory getInstance(String algorithm,
+            Provider provider) throws NoSuchAlgorithmException {
+        if (provider == null) {
+            throw new IllegalArgumentException("Provider is null");
+        }
+        if (algorithm == null) {
+            throw new NullPointerException("algorithm is null");
+        }
+        synchronized (engine) {
+            engine.getInstance(algorithm, provider, null);
+            return new TrustManagerFactory((TrustManagerFactorySpi) engine.spi,
+                    provider, algorithm);
+        }
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public final Provider getProvider() {
+        return provider;
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public final void init(KeyStore ks) throws KeyStoreException {
+        spiImpl.engineInit(ks);
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public final void init(ManagerFactoryParameters spec)
+            throws InvalidAlgorithmParameterException {
+        spiImpl.engineInit(spec);
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public final TrustManager[] getTrustManagers() {
+        return spiImpl.engineGetTrustManagers();
+    }
+
+    /**
+     * @com.intel.drl.spec_ref
+     *  
+     */
+    public static final String getDefaultAlgorithm() {
+        return (String) AccessController.doPrivileged(
+            new java.security.PrivilegedAction() {
+                public Object run() {
+                    return Security.getProperty(PROPERTYNAME);
+                }
+            }
+         );
+    }
 }



Mime
View raw message