< prev index next >

src/java.base/share/classes/javax/net/ssl/SSLSocket.java

Print this page




 332      * listed in the <code>suites</code> parameter are enabled for use.
 333      * <P>
 334      * Note that the standard list of cipher suite names may be found in the
 335      * <a href=
 336      * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
 337      * JSSE Cipher Suite Names</a> section of the Java Cryptography
 338      * Architecture Standard Algorithm Name Documentation.  Providers
 339      * may support cipher suite names not found in this list or might not
 340      * use the recommended name for a certain cipher suite.
 341      * <P>
 342      * See {@link #getEnabledCipherSuites()} for more information
 343      * on why a specific ciphersuite may never be used on a connection.
 344      *
 345      * @param suites Names of all the cipher suites to enable
 346      * @throws IllegalArgumentException when one or more of the ciphers
 347      *          named by the parameter is not supported, or when the
 348      *          parameter is null.
 349      * @see #getSupportedCipherSuites()
 350      * @see #getEnabledCipherSuites()
 351      */
 352     public abstract void setEnabledCipherSuites(String suites []);
 353 
 354 
 355     /**
 356      * Returns the names of the protocols which could be enabled for use
 357      * on an SSL connection.
 358      *
 359      * @return an array of protocols supported
 360      */
 361     public abstract String [] getSupportedProtocols();
 362 
 363 
 364     /**
 365      * Returns the names of the protocol versions which are currently
 366      * enabled for use on this connection.
 367      * <P>
 368      * Note that even if a protocol is enabled, it may never be used.
 369      * This can occur if the peer does not support the protocol, or its
 370      * use is restricted, or there are no enabled cipher suites supported
 371      * by the protocol.
 372      *
 373      * @see #setEnabledProtocols(String [])
 374      * @return an array of protocols
 375      */
 376     public abstract String [] getEnabledProtocols();
 377 
 378 
 379     /**
 380      * Sets the protocol versions enabled for use on this connection.
 381      * <P>
 382      * The protocols must have been listed by
 383      * <code>getSupportedProtocols()</code> as being supported.
 384      * Following a successful call to this method, only protocols listed
 385      * in the <code>protocols</code> parameter are enabled for use.
 386      *
 387      * @param protocols Names of all the protocols to enable.
 388      * @throws IllegalArgumentException when one or more of
 389      *            the protocols named by the parameter is not supported or
 390      *            when the protocols parameter is null.
 391      * @see #getEnabledProtocols()
 392      */
 393     public abstract void setEnabledProtocols(String protocols[]);
 394 
 395 
 396     /**
 397      * Returns the SSL Session in use by this connection.  These can
 398      * be long lived, and frequently correspond to an entire login session
 399      * for some user.  The session specifies a particular cipher suite
 400      * which is being actively used by all connections in that session,
 401      * as well as the identities of the session's client and server.
 402      * <P>
 403      * This method will initiate the initial handshake if
 404      * necessary and then block until the handshake has been
 405      * established.
 406      * <P>
 407      * If an error occurs during the initial handshake, this method
 408      * returns an invalid session object which reports an invalid
 409      * cipher suite of "SSL_NULL_WITH_NULL_NULL".
 410      *
 411      * @return the <code>SSLSession</code>
 412      */
 413     public abstract SSLSession getSession();




 332      * listed in the <code>suites</code> parameter are enabled for use.
 333      * <P>
 334      * Note that the standard list of cipher suite names may be found in the
 335      * <a href=
 336      * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
 337      * JSSE Cipher Suite Names</a> section of the Java Cryptography
 338      * Architecture Standard Algorithm Name Documentation.  Providers
 339      * may support cipher suite names not found in this list or might not
 340      * use the recommended name for a certain cipher suite.
 341      * <P>
 342      * See {@link #getEnabledCipherSuites()} for more information
 343      * on why a specific ciphersuite may never be used on a connection.
 344      *
 345      * @param suites Names of all the cipher suites to enable
 346      * @throws IllegalArgumentException when one or more of the ciphers
 347      *          named by the parameter is not supported, or when the
 348      *          parameter is null.
 349      * @see #getSupportedCipherSuites()
 350      * @see #getEnabledCipherSuites()
 351      */
 352     public abstract void setEnabledCipherSuites(String[] suites);
 353 
 354 
 355     /**
 356      * Returns the names of the protocols which could be enabled for use
 357      * on an SSL connection.
 358      *
 359      * @return an array of protocols supported
 360      */
 361     public abstract String [] getSupportedProtocols();
 362 
 363 
 364     /**
 365      * Returns the names of the protocol versions which are currently
 366      * enabled for use on this connection.
 367      * <P>
 368      * Note that even if a protocol is enabled, it may never be used.
 369      * This can occur if the peer does not support the protocol, or its
 370      * use is restricted, or there are no enabled cipher suites supported
 371      * by the protocol.
 372      *
 373      * @see #setEnabledProtocols(String [])
 374      * @return an array of protocols
 375      */
 376     public abstract String [] getEnabledProtocols();
 377 
 378 
 379     /**
 380      * Sets the protocol versions enabled for use on this connection.
 381      * <P>
 382      * The protocols must have been listed by
 383      * <code>getSupportedProtocols()</code> as being supported.
 384      * Following a successful call to this method, only protocols listed
 385      * in the <code>protocols</code> parameter are enabled for use.
 386      *
 387      * @param protocols Names of all the protocols to enable.
 388      * @throws IllegalArgumentException when one or more of
 389      *            the protocols named by the parameter is not supported or
 390      *            when the protocols parameter is null.
 391      * @see #getEnabledProtocols()
 392      */
 393     public abstract void setEnabledProtocols(String[] protocols);
 394 
 395 
 396     /**
 397      * Returns the SSL Session in use by this connection.  These can
 398      * be long lived, and frequently correspond to an entire login session
 399      * for some user.  The session specifies a particular cipher suite
 400      * which is being actively used by all connections in that session,
 401      * as well as the identities of the session's client and server.
 402      * <P>
 403      * This method will initiate the initial handshake if
 404      * necessary and then block until the handshake has been
 405      * established.
 406      * <P>
 407      * If an error occurs during the initial handshake, this method
 408      * returns an invalid session object which reports an invalid
 409      * cipher suite of "SSL_NULL_WITH_NULL_NULL".
 410      *
 411      * @return the <code>SSLSession</code>
 412      */
 413     public abstract SSLSession getSession();


< prev index next >