jdk/src/share/classes/javax/net/ssl/SSLSocketFactory.java
author chegar
Fri, 16 Sep 2011 12:09:04 -0700
changeset 10596 39b3a979e600
parent 7039 6464c8e62a18
child 14194 971f46db533d
permissions -rw-r--r--
7090158: Networking Libraries don't build with javac -Werror Summary: Minor changes to networking java files to remove warnings Reviewed-by: chegar, weijun, hawtin Contributed-by: kurchi.subhra.hazra@oracle.com, sasha_bu@hotmail.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
10596
39b3a979e600 7090158: Networking Libraries don't build with javac -Werror
chegar
parents: 7039
diff changeset
     2
 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
package javax.net.ssl;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.net.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import javax.net.SocketFactory;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
import java.io.IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
import java.security.*;
7039
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
    33
import java.util.Locale;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
import sun.security.action.GetPropertyAction;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * <code>SSLSocketFactory</code>s create <code>SSLSocket</code>s.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * @see SSLSocket
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * @author David Brownell
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
public abstract class SSLSocketFactory extends SocketFactory
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
    private static SSLSocketFactory theFactory;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
    private static boolean propertyChecked;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
    static final boolean DEBUG;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
    static {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
        String s = java.security.AccessController.doPrivileged(
7039
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
    54
            new GetPropertyAction("javax.net.debug", "")).toLowerCase(
6464c8e62a18 4873188: Support TLS 1.1
xuelei
parents: 5506
diff changeset
    55
                                                            Locale.ENGLISH);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
        DEBUG = s.contains("all") || s.contains("ssl");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    private static void log(String msg) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
        if (DEBUG) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
            System.out.println(msg);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
     * Constructor is used only by subclasses.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
    public SSLSocketFactory() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
     * Returns the default SSL socket factory.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
     * <p>The first time this method is called, the security property
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
     * "ssl.SocketFactory.provider" is examined. If it is non-null, a class by
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
     * that name is loaded and instantiated. If that is successful and the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
     * object is an instance of SSLSocketFactory, it is made the default SSL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
     * socket factory.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
     * <p>Otherwise, this method returns
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
     * <code>SSLContext.getDefault().getSocketFactory()</code>. If that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
     * call fails, an inoperative factory is returned.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
     * @return the default <code>SocketFactory</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
     * @see SSLContext#getDefault
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
    public static synchronized SocketFactory getDefault() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
        if (theFactory != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
            return theFactory;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
        if (propertyChecked == false) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
            propertyChecked = true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
            String clsName = getSecurityProperty("ssl.SocketFactory.provider");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
            if (clsName != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
                log("setting up default SSLSocketFactory");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
                try {
10596
39b3a979e600 7090158: Networking Libraries don't build with javac -Werror
chegar
parents: 7039
diff changeset
    98
                    Class<?> cls = null;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
                    try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
                        cls = Class.forName(clsName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
                    } catch (ClassNotFoundException e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
                        ClassLoader cl = ClassLoader.getSystemClassLoader();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
                        if (cl != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
                            cls = cl.loadClass(clsName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
                        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
                    log("class " + clsName + " is loaded");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
                    SSLSocketFactory fac = (SSLSocketFactory)cls.newInstance();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
                    log("instantiated an instance of class " + clsName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
                    theFactory = fac;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
                    return fac;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
                } catch (Exception e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
                    log("SSLSocketFactory instantiation failed: " + e.toString());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
                    theFactory = new DefaultSSLSocketFactory(e);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
                    return theFactory;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
            return SSLContext.getDefault().getSocketFactory();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
        } catch (NoSuchAlgorithmException e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
            return new DefaultSSLSocketFactory(e);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
    static String getSecurityProperty(final String name) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        return AccessController.doPrivileged(new PrivilegedAction<String>() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
            public String run() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
                String s = java.security.Security.getProperty(name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
                if (s != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
                    s = s.trim();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
                    if (s.length() == 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
                        s = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
                return s;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
        });
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
     * Returns the list of cipher suites which are enabled by default.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
     * Unless a different list is enabled, handshaking on an SSL connection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
     * will use one of these cipher suites.  The minimum quality of service
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     * for these defaults requires confidentiality protection and server
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     * authentication (that is, no anonymous cipher suites).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
     * @see #getSupportedCipherSuites()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
     * @return array of the cipher suites enabled by default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
    public abstract String [] getDefaultCipherSuites();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
     * Returns the names of the cipher suites which could be enabled for use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
     * on an SSL connection.  Normally, only a subset of these will actually
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
     * be enabled by default, since this list may include cipher suites which
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
     * do not meet quality of service requirements for those defaults.  Such
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
     * cipher suites are useful in specialized applications.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
     * @see #getDefaultCipherSuites()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
     * @return an array of cipher suite names
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
    public abstract String [] getSupportedCipherSuites();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
     * Returns a socket layered over an existing socket connected to the named
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
     * host, at the given port.  This constructor can be used when tunneling SSL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
     * through a proxy or when negotiating the use of SSL over an existing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
     * socket. The host and port refer to the logical peer destination.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
     * This socket is configured using the socket options established for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
     * this factory.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
     * @param s the existing socket
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
     * @param host the server host
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
     * @param port the server port
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
     * @param autoClose close the underlying socket when this socket is closed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
     * @return a socket connected to the specified host and port
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
     * @throws IOException if an I/O error occurs when creating the socket
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
     * @throws NullPointerException if the parameter s is null
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
    public abstract Socket createSocket(Socket s, String host,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
                                        int port, boolean autoClose)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
    throws IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
// file private
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
class DefaultSSLSocketFactory extends SSLSocketFactory
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
    private Exception reason;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
    DefaultSSLSocketFactory(Exception reason) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
        this.reason = reason;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
    private Socket throwException() throws SocketException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
        throw (SocketException)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
            new SocketException(reason.toString()).initCause(reason);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
    public Socket createSocket()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
    throws IOException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
        return throwException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
    public Socket createSocket(String host, int port)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
    throws IOException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
        return throwException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
    public Socket createSocket(Socket s, String host,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
                                int port, boolean autoClose)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
    throws IOException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
        return throwException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
    public Socket createSocket(InetAddress address, int port)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
    throws IOException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
        return throwException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
    public Socket createSocket(String host, int port,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
        InetAddress clientAddress, int clientPort)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
    throws IOException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
        return throwException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
    public Socket createSocket(InetAddress address, int port,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
        InetAddress clientAddress, int clientPort)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
    throws IOException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
        return throwException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
    public String [] getDefaultCipherSuites() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
        return new String[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
    public String [] getSupportedCipherSuites() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
        return new String[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
}