diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java b/jdk/src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java index 70f98ce221d..bc9b012db8c 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,7 @@ package javax.net.ssl; import java.util.List; /** - * Extends the SSLSession interface to support additional + * Extends the {@code SSLSession} interface to support additional * session attributes. * * @since 1.7 @@ -39,8 +39,8 @@ public abstract class ExtendedSSLSession implements SSLSession { * is willing to use. *

* Note: this method is used to indicate to the peer which signature - * algorithms may be used for digital signatures in TLS 1.2. It is - * not meaningful for TLS versions prior to 1.2. + * algorithms may be used for digital signatures in TLS/DTLS 1.2. It is + * not meaningful for TLS/DTLS versions prior to 1.2. *

* The signature algorithm name must be a standard Java Security * name (such as "SHA1withRSA", "SHA256withECDSA", and so on). @@ -52,7 +52,7 @@ public abstract class ExtendedSSLSession implements SSLSession { * Note: the local supported signature algorithms should conform to * the algorithm constraints specified by * {@link SSLParameters#getAlgorithmConstraints getAlgorithmConstraints()} - * method in SSLParameters. + * method in {@code SSLParameters}. * * @return An array of supported signature algorithms, in descending * order of preference. The return value is an empty array if @@ -67,8 +67,8 @@ public abstract class ExtendedSSLSession implements SSLSession { * able to use. *

* Note: this method is used to indicate to the local side which signature - * algorithms may be used for digital signatures in TLS 1.2. It is - * not meaningful for TLS versions prior to 1.2. + * algorithms may be used for digital signatures in TLS/DTLS 1.2. It is + * not meaningful for TLS/DTLS versions prior to 1.2. *

* The signature algorithm name must be a standard Java Security * name (such as "SHA1withRSA", "SHA256withECDSA", and so on). diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SNIServerName.java b/jdk/src/java.base/share/classes/javax/net/ssl/SNIServerName.java index 1ef9d05c21e..9df92d75db8 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SNIServerName.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SNIServerName.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,7 +31,7 @@ import java.util.Arrays; * Instances of this class represent a server name in a Server Name * Indication (SNI) extension. *

- * The SNI extension is a feature that extends the SSL/TLS protocols to + * The SNI extension is a feature that extends the SSL/TLS/DTLS protocols to * indicate what server name the client is attempting to connect to during * handshaking. See section 3, "Server Name Indication", of TLS Extensions (RFC 6066). diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLContext.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLContext.java index c40d7060c39..ebdae178fd8 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLContext.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,12 +32,12 @@ import sun.security.jca.GetInstance; /** * Instances of this class represent a secure socket protocol * implementation which acts as a factory for secure socket - * factories or SSLEngines. This class is initialized + * factories or {@code SSLEngine}s. This class is initialized * with an optional set of key and trust managers and source of * secure random bytes. * *

Every implementation of the Java platform is required to support the - * following standard SSLContext protocol: + * following standard {@code SSLContext} protocol: *

@@ -79,7 +79,7 @@ public class SSLContext { *

If a default context was set using the {@link #setDefault * SSLContext.setDefault()} method, it is returned. Otherwise, the first * call of this method triggers the call - * SSLContext.getInstance("Default"). + * {@code SSLContext.getInstance("Default")}. * If successful, that object is made the default SSL context and returned. * *

The default context is immediately @@ -106,8 +106,8 @@ public class SSLContext { * @param context the SSLContext * @throws NullPointerException if context is null * @throws SecurityException if a security manager exists and its - * checkPermission method does not allow - * SSLPermission("setDefaultSSLContext") + * {@code checkPermission} method does not allow + * {@code SSLPermission("setDefaultSSLContext")} * @since 1.6 */ public static synchronized void setDefault(SSLContext context) { @@ -122,7 +122,7 @@ public class SSLContext { } /** - * Returns a SSLContext object that implements the + * Returns a {@code SSLContext} object that implements the * specified secure socket protocol. * *

This method traverses the list of registered security Providers, @@ -141,7 +141,7 @@ public class SSLContext { * Documentation * for information about standard protocol names. * - * @return the new SSLContext object. + * @return the new {@code SSLContext} object. * * @exception NoSuchAlgorithmException if no Provider supports a * SSLContextSpi implementation for the @@ -159,7 +159,7 @@ public class SSLContext { } /** - * Returns a SSLContext object that implements the + * Returns a {@code SSLContext} object that implements the * specified secure socket protocol. * *

A new SSLContext object encapsulating the @@ -179,7 +179,7 @@ public class SSLContext { * * @param provider the name of the provider. * - * @return the new SSLContext object. + * @return the new {@code SSLContext} object. * * @throws NoSuchAlgorithmException if a SSLContextSpi * implementation for the specified protocol is not @@ -202,7 +202,7 @@ public class SSLContext { } /** - * Returns a SSLContext object that implements the + * Returns a {@code SSLContext} object that implements the * specified secure socket protocol. * *

A new SSLContext object encapsulating the @@ -219,7 +219,7 @@ public class SSLContext { * * @param provider an instance of the provider. * - * @return the new SSLContext object. + * @return the new {@code SSLContext} object. * * @throws NoSuchAlgorithmException if a SSLContextSpi * implementation for the specified protocol is not available @@ -239,22 +239,22 @@ public class SSLContext { } /** - * Returns the protocol name of this SSLContext object. + * Returns the protocol name of this {@code SSLContext} object. * *

This is the same name that was specified in one of the - * getInstance calls that created this - * SSLContext object. + * {@code getInstance} calls that created this + * {@code SSLContext} object. * - * @return the protocol name of this SSLContext object. + * @return the protocol name of this {@code SSLContext} object. */ public final String getProtocol() { return this.protocol; } /** - * Returns the provider of this SSLContext object. + * Returns the provider of this {@code SSLContext} object. * - * @return the provider of this SSLContext object + * @return the provider of this {@code SSLContext} object */ public final Provider getProvider() { return this.provider; @@ -283,31 +283,35 @@ public class SSLContext { } /** - * Returns a SocketFactory object for this + * Returns a {@code SocketFactory} object for this * context. * - * @return the SocketFactory object + * @return the {@code SocketFactory} object + * @throws UnsupportedOperationException if the underlying provider + * does not implement the operation. * @throws IllegalStateException if the SSLContextImpl requires - * initialization and the init() has not been called + * initialization and the {@code init()} has not been called */ public final SSLSocketFactory getSocketFactory() { return contextSpi.engineGetSocketFactory(); } /** - * Returns a ServerSocketFactory object for + * Returns a {@code ServerSocketFactory} object for * this context. * - * @return the ServerSocketFactory object + * @return the {@code ServerSocketFactory} object + * @throws UnsupportedOperationException if the underlying provider + * does not implement the operation. * @throws IllegalStateException if the SSLContextImpl requires - * initialization and the init() has not been called + * initialization and the {@code init()} has not been called */ public final SSLServerSocketFactory getServerSocketFactory() { return contextSpi.engineGetServerSocketFactory(); } /** - * Creates a new SSLEngine using this context. + * Creates a new {@code SSLEngine} using this context. *

* Applications using this factory method are providing no hints * for an internal session reuse strategy. If hints are desired, @@ -317,11 +321,11 @@ public class SSLContext { * Some cipher suites (such as Kerberos) require remote hostname * information, in which case this factory method should not be used. * - * @return the SSLEngine object + * @return the {@code SSLEngine} object * @throws UnsupportedOperationException if the underlying provider * does not implement the operation. * @throws IllegalStateException if the SSLContextImpl requires - * initialization and the init() has not been called + * initialization and the {@code init()} has not been called * @since 1.5 */ public final SSLEngine createSSLEngine() { @@ -338,7 +342,7 @@ public class SSLContext { } /** - * Creates a new SSLEngine using this context using + * Creates a new {@code SSLEngine} using this context using * advisory peer information. *

* Applications using this factory method are providing hints @@ -349,11 +353,11 @@ public class SSLContext { * * @param peerHost the non-authoritative name of the host * @param peerPort the non-authoritative port - * @return the new SSLEngine object + * @return the new {@code SSLEngine} object * @throws UnsupportedOperationException if the underlying provider * does not implement the operation. * @throws IllegalStateException if the SSLContextImpl requires - * initialization and the init() has not been called + * initialization and the {@code init()} has not been called * @since 1.5 */ public final SSLEngine createSSLEngine(String peerHost, int peerPort) { diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLContextSpi.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLContextSpi.java index 269ed8502e6..966524da9fb 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLContextSpi.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLContextSpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,7 +29,7 @@ import java.security.*; /** * This class defines the Service Provider Interface (SPI) - * for the SSLContext class. + * for the {@code SSLContext} class. * *

All the abstract methods in this class must be implemented by each * cryptographic service provider who wishes to supply the implementation @@ -52,31 +52,35 @@ public abstract class SSLContextSpi { SecureRandom sr) throws KeyManagementException; /** - * Returns a SocketFactory object for this + * Returns a {@code SocketFactory} object for this * context. * - * @return the SocketFactory object + * @return the {@code SocketFactory} object + * @throws UnsupportedOperationException if the underlying provider + * does not implement the operation. * @throws IllegalStateException if the SSLContextImpl requires - * initialization and the engineInit() + * initialization and the {@code engineInit()} * has not been called * @see javax.net.ssl.SSLContext#getSocketFactory() */ protected abstract SSLSocketFactory engineGetSocketFactory(); /** - * Returns a ServerSocketFactory object for + * Returns a {@code ServerSocketFactory} object for * this context. * - * @return the ServerSocketFactory object + * @return the {@code ServerSocketFactory} object + * @throws UnsupportedOperationException if the underlying provider + * does not implement the operation. * @throws IllegalStateException if the SSLContextImpl requires - * initialization and the engineInit() + * initialization and the {@code engineInit()} * has not been called * @see javax.net.ssl.SSLContext#getServerSocketFactory() */ protected abstract SSLServerSocketFactory engineGetServerSocketFactory(); /** - * Creates a new SSLEngine using this context. + * Creates a new {@code SSLEngine} using this context. *

* Applications using this factory method are providing no hints * for an internal session reuse strategy. If hints are desired, @@ -86,9 +90,9 @@ public abstract class SSLContextSpi { * Some cipher suites (such as Kerberos) require remote hostname * information, in which case this factory method should not be used. * - * @return the SSLEngine Object + * @return the {@code SSLEngine} Object * @throws IllegalStateException if the SSLContextImpl requires - * initialization and the engineInit() + * initialization and the {@code engineInit()} * has not been called * * @see SSLContext#createSSLEngine() @@ -98,7 +102,7 @@ public abstract class SSLContextSpi { protected abstract SSLEngine engineCreateSSLEngine(); /** - * Creates a SSLEngine using this context. + * Creates a {@code SSLEngine} using this context. *

* Applications using this factory method are providing hints * for an internal session reuse strategy. @@ -108,9 +112,9 @@ public abstract class SSLContextSpi { * * @param host the non-authoritative name of the host * @param port the non-authoritative port - * @return the SSLEngine Object + * @return the {@code SSLEngine} Object * @throws IllegalStateException if the SSLContextImpl requires - * initialization and the engineInit() + * initialization and the {@code engineInit()} * has not been called * * @see SSLContext#createSSLEngine(String, int) @@ -120,19 +124,19 @@ public abstract class SSLContextSpi { protected abstract SSLEngine engineCreateSSLEngine(String host, int port); /** - * Returns a server SSLSessionContext object for + * Returns a server {@code SSLSessionContext} object for * this context. * - * @return the SSLSessionContext object + * @return the {@code SSLSessionContext} object * @see javax.net.ssl.SSLContext#getServerSessionContext() */ protected abstract SSLSessionContext engineGetServerSessionContext(); /** - * Returns a client SSLSessionContext object for + * Returns a client {@code SSLSessionContext} object for * this context. * - * @return the SSLSessionContext object + * @return the {@code SSLSessionContext} object * @see javax.net.ssl.SSLContext#getClientSessionContext() */ protected abstract SSLSessionContext engineGetClientSessionContext(); diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLEngine.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLEngine.java index 64110880258..4539513c74b 100644 --- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLEngine.java +++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLEngine.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,15 +37,15 @@ import java.nio.ReadOnlyBufferException; *

* The secure communications modes include: