1 /*
2  * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * This code is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 only, as
7  * published by the Free Software Foundation.  Oracle designates this
8  * particular file as subject to the "Classpath" exception as provided
9  * by Oracle in the LICENSE file that accompanied this code.
10  *
11  * This code is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14  * version 2 for more details (a copy is included in the LICENSE file that
15  * accompanied this code).
16  *
17  * You should have received a copy of the GNU General Public License version
18  * 2 along with this work; if not, write to the Free Software Foundation,
19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20  *
21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22  * or visit www.oracle.com if you need additional information or have any
23  * questions.
24  */
25 
26 /*
27  * NOTE:  this file was copied from javax.net.ssl.SSLContextSpi
28  */
29 
30 package com.sun.net.ssl;
31 
32 import java.util.*;
33 import java.security.*;
34 import javax.net.ssl.*;
35 
36 /**
37  * This class defines the <i>Service Provider Interface</i> (<b>SPI</b>)
38  * for the <code>SSLContext</code> class.
39  *
40  * <p> All the abstract methods in this class must be implemented by each
41  * cryptographic service provider who wishes to supply the implementation
42  * of a particular SSL context.
43  *
44  * @deprecated As of JDK 1.4, this implementation-specific class was
45  *      replaced by {@link javax.net.ssl.SSLContextSpi}.
46  */
47 @Deprecated(since="1.4")
48 public abstract class SSLContextSpi {
49     /**
50      * Initializes this context.
51      *
52      * @param ah the sources of authentication keys
53      * @param th the sources of peer authentication trust decisions
54      * @param sr the source of randomness for this generator
55      */
engineInit(KeyManager[] ah, TrustManager[] th, SecureRandom sr)56     protected abstract void engineInit(KeyManager[] ah, TrustManager[] th,
57         SecureRandom sr) throws KeyManagementException;
58 
59     /**
60      * Returns a <code>SocketFactory</code> object for this
61      * context.
62      *
63      * @return the factory
64      */
engineGetSocketFactory()65     protected abstract SSLSocketFactory engineGetSocketFactory();
66 
67     /**
68      * Returns a <code>ServerSocketFactory</code> object for
69      * this context.
70      *
71      * @return the factory
72      */
engineGetServerSocketFactory()73     protected abstract SSLServerSocketFactory engineGetServerSocketFactory();
74 }
75