921 * listed in the {@code suites} parameter are enabled for use. 922 * <P> 923 * Note that the standard list of cipher suite names may be found in the 924 * <a href= 925 * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> 926 * JSSE Cipher Suite Names</a> section of the Java Cryptography 927 * Architecture Standard Algorithm Name Documentation. Providers 928 * may support cipher suite names not found in this list or might not 929 * use the recommended name for a certain cipher suite. 930 * <P> 931 * See {@link #getEnabledCipherSuites()} for more information 932 * on why a specific cipher suite may never be used on a engine. 933 * 934 * @param suites Names of all the cipher suites to enable 935 * @throws IllegalArgumentException when one or more of the ciphers 936 * named by the parameter is not supported, or when the 937 * parameter is null. 938 * @see #getSupportedCipherSuites() 939 * @see #getEnabledCipherSuites() 940 */ 941 public abstract void setEnabledCipherSuites(String suites []); 942 943 944 /** 945 * Returns the names of the protocols which could be enabled for use 946 * with this {@code SSLEngine}. 947 * 948 * @return an array of protocols supported 949 */ 950 public abstract String [] getSupportedProtocols(); 951 952 953 /** 954 * Returns the names of the protocol versions which are currently 955 * enabled for use with this {@code SSLEngine}. 956 * <P> 957 * Note that even if a protocol is enabled, it may never be used. 958 * This can occur if the peer does not support the protocol, or its 959 * use is restricted, or there are no enabled cipher suites supported 960 * by the protocol. 961 * 962 * @return an array of protocols 963 * @see #setEnabledProtocols(String []) 964 */ 965 public abstract String [] getEnabledProtocols(); 966 967 968 /** 969 * Set the protocol versions enabled for use on this engine. 970 * <P> 971 * The protocols must have been listed by getSupportedProtocols() 972 * as being supported. Following a successful call to this method, 973 * only protocols listed in the {@code protocols} parameter 974 * are enabled for use. 975 * 976 * @param protocols Names of all the protocols to enable. 977 * @throws IllegalArgumentException when one or more of 978 * the protocols named by the parameter is not supported or 979 * when the protocols parameter is null. 980 * @see #getEnabledProtocols() 981 */ 982 public abstract void setEnabledProtocols(String protocols[]); 983 984 985 /** 986 * Returns the {@code SSLSession} in use in this 987 * {@code SSLEngine}. 988 * <P> 989 * These can be long lived, and frequently correspond to an entire 990 * login session for some user. The session specifies a particular 991 * cipher suite which is being actively used by all connections in 992 * that session, as well as the identities of the session's client 993 * and server. 994 * <P> 995 * Unlike {@link SSLSocket#getSession()} 996 * this method does not block until handshaking is complete. 997 * <P> 998 * Until the initial handshake has completed, this method returns 999 * a session object which reports an invalid cipher suite of 1000 * "SSL_NULL_WITH_NULL_NULL". 1001 * 1002 * @return the {@code SSLSession} for this {@code SSLEngine} | 921 * listed in the {@code suites} parameter are enabled for use. 922 * <P> 923 * Note that the standard list of cipher suite names may be found in the 924 * <a href= 925 * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names"> 926 * JSSE Cipher Suite Names</a> section of the Java Cryptography 927 * Architecture Standard Algorithm Name Documentation. Providers 928 * may support cipher suite names not found in this list or might not 929 * use the recommended name for a certain cipher suite. 930 * <P> 931 * See {@link #getEnabledCipherSuites()} for more information 932 * on why a specific cipher suite may never be used on a engine. 933 * 934 * @param suites Names of all the cipher suites to enable 935 * @throws IllegalArgumentException when one or more of the ciphers 936 * named by the parameter is not supported, or when the 937 * parameter is null. 938 * @see #getSupportedCipherSuites() 939 * @see #getEnabledCipherSuites() 940 */ 941 public abstract void setEnabledCipherSuites(String[] suites); 942 943 944 /** 945 * Returns the names of the protocols which could be enabled for use 946 * with this {@code SSLEngine}. 947 * 948 * @return an array of protocols supported 949 */ 950 public abstract String [] getSupportedProtocols(); 951 952 953 /** 954 * Returns the names of the protocol versions which are currently 955 * enabled for use with this {@code SSLEngine}. 956 * <P> 957 * Note that even if a protocol is enabled, it may never be used. 958 * This can occur if the peer does not support the protocol, or its 959 * use is restricted, or there are no enabled cipher suites supported 960 * by the protocol. 961 * 962 * @return an array of protocols 963 * @see #setEnabledProtocols(String []) 964 */ 965 public abstract String [] getEnabledProtocols(); 966 967 968 /** 969 * Set the protocol versions enabled for use on this engine. 970 * <P> 971 * The protocols must have been listed by getSupportedProtocols() 972 * as being supported. Following a successful call to this method, 973 * only protocols listed in the {@code protocols} parameter 974 * are enabled for use. 975 * 976 * @param protocols Names of all the protocols to enable. 977 * @throws IllegalArgumentException when one or more of 978 * the protocols named by the parameter is not supported or 979 * when the protocols parameter is null. 980 * @see #getEnabledProtocols() 981 */ 982 public abstract void setEnabledProtocols(String[] protocols); 983 984 985 /** 986 * Returns the {@code SSLSession} in use in this 987 * {@code SSLEngine}. 988 * <P> 989 * These can be long lived, and frequently correspond to an entire 990 * login session for some user. The session specifies a particular 991 * cipher suite which is being actively used by all connections in 992 * that session, as well as the identities of the session's client 993 * and server. 994 * <P> 995 * Unlike {@link SSLSocket#getSession()} 996 * this method does not block until handshaking is complete. 997 * <P> 998 * Until the initial handshake has completed, this method returns 999 * a session object which reports an invalid cipher suite of 1000 * "SSL_NULL_WITH_NULL_NULL". 1001 * 1002 * @return the {@code SSLSession} for this {@code SSLEngine} |