mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8305406: Add @spec tags in java.base/java.* (part 2)
Co-authored-by: Daniel Jeliński <djelinski@openjdk.org> Co-authored-by: Hannes Wallnöfer <hannesw@openjdk.org> Reviewed-by: valeriep
This commit is contained in:
parent
1476f6c475
commit
873f8a696f
59 changed files with 311 additions and 51 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2024, 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
|
||||
|
@ -63,6 +63,7 @@ public abstract class ExtendedSSLSession implements SSLSession {
|
|||
* order of preference. The return value is an empty array if
|
||||
* no signature algorithm is supported.
|
||||
*
|
||||
* @spec security/standard-names.html Java Security Standard Algorithm Names
|
||||
* @see SSLParameters#getAlgorithmConstraints
|
||||
*/
|
||||
public abstract String[] getLocalSupportedSignatureAlgorithms();
|
||||
|
@ -86,6 +87,7 @@ public abstract class ExtendedSSLSession implements SSLSession {
|
|||
* order of preference. The return value is an empty array if
|
||||
* the peer has not sent the supported signature algorithms.
|
||||
*
|
||||
* @spec security/standard-names.html Java Security Standard Algorithm Names
|
||||
* @see X509KeyManager
|
||||
* @see X509ExtendedKeyManager
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2024, 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
|
||||
|
@ -53,6 +53,11 @@ import java.util.regex.PatternSyntaxException;
|
|||
* <P>
|
||||
* Note that {@code SNIHostName} objects are immutable.
|
||||
*
|
||||
* @spec https://www.rfc-editor.org/info/rfc5890
|
||||
* RFC 5890: Internationalized Domain Names for Applications (IDNA):
|
||||
* Definitions and Document Framework
|
||||
* @spec https://www.rfc-editor.org/info/rfc6066
|
||||
* RFC 6066: Transport Layer Security (TLS) Extensions: Extension Definitions
|
||||
* @see SNIServerName
|
||||
* @see StandardConstants#SNI_HOST_NAME
|
||||
*
|
||||
|
@ -92,6 +97,15 @@ public final class SNIHostName extends SNIServerName {
|
|||
*
|
||||
* @throws NullPointerException if {@code hostname} is {@code null}
|
||||
* @throws IllegalArgumentException if {@code hostname} is illegal
|
||||
*
|
||||
* @spec https://www.rfc-editor.org/info/rfc1122
|
||||
* RFC 1122: Requirements for Internet Hosts - Communication Layers
|
||||
* @spec https://www.rfc-editor.org/info/rfc1123
|
||||
* RFC 1123: Requirements for Internet Hosts - Application and Support
|
||||
* @spec https://www.rfc-editor.org/info/rfc3490
|
||||
* RFC 3490: Internationalizing Domain Names in Applications (IDNA)
|
||||
* @spec https://www.rfc-editor.org/info/rfc6066
|
||||
* RFC 6066: Transport Layer Security (TLS) Extensions: Extension Definitions
|
||||
*/
|
||||
public SNIHostName(String hostname) {
|
||||
// IllegalArgumentException will be thrown if {@code hostname} is
|
||||
|
@ -159,6 +173,17 @@ public final class SNIHostName extends SNIServerName {
|
|||
*
|
||||
* @throws NullPointerException if {@code encoded} is {@code null}
|
||||
* @throws IllegalArgumentException if {@code encoded} is illegal
|
||||
*
|
||||
* @spec https://www.rfc-editor.org/info/rfc1122
|
||||
* RFC 1122: Requirements for Internet Hosts - Communication Layers
|
||||
* @spec https://www.rfc-editor.org/info/rfc1123
|
||||
* RFC 1123: Requirements for Internet Hosts - Application and Support
|
||||
* @spec https://www.rfc-editor.org/info/rfc3490
|
||||
* RFC 3490: Internationalizing Domain Names in Applications (IDNA)
|
||||
* @spec https://www.rfc-editor.org/info/rfc4366
|
||||
* RFC 4366: Transport Layer Security (TLS) Extensions
|
||||
* @spec https://www.rfc-editor.org/info/rfc6066
|
||||
* RFC 6066: Transport Layer Security (TLS) Extensions: Extension Definitions
|
||||
*/
|
||||
public SNIHostName(byte[] encoded) {
|
||||
// NullPointerException will be thrown if {@code encoded} is null
|
||||
|
@ -198,6 +223,11 @@ public final class SNIHostName extends SNIServerName {
|
|||
*
|
||||
* @return the {@link StandardCharsets#US_ASCII}-compliant hostname
|
||||
* of this {@code SNIHostName} object
|
||||
*
|
||||
* @spec https://www.rfc-editor.org/info/rfc5890
|
||||
* RFC 5890: Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework
|
||||
* @spec https://www.rfc-editor.org/info/rfc6066
|
||||
* RFC 6066: Transport Layer Security (TLS) Extensions: Extension Definitions
|
||||
*/
|
||||
public String getAsciiName() {
|
||||
return hostname;
|
||||
|
@ -215,6 +245,9 @@ public final class SNIHostName extends SNIServerName {
|
|||
* the other server name object to compare with.
|
||||
* @return true if, and only if, the {@code other} is considered
|
||||
* equal to this instance
|
||||
*
|
||||
* @spec https://www.rfc-editor.org/info/rfc6066
|
||||
* RFC 6066: Transport Layer Security (TLS) Extensions: Extension Definitions
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2024, 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
|
||||
|
@ -41,6 +41,8 @@ import java.util.List;
|
|||
* {@code SNIServerName} objects are immutable. Subclasses should not provide
|
||||
* methods that can change the state of an instance once it has been created.
|
||||
*
|
||||
* @spec https://www.rfc-editor.org/info/rfc6066
|
||||
* RFC 6066: Transport Layer Security (TLS) Extensions: Extension Definitions
|
||||
* @see SSLParameters#getServerNames()
|
||||
* @see SSLParameters#setServerNames(List)
|
||||
*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2024, 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
|
||||
|
@ -413,6 +413,8 @@ import java.util.function.BiFunction;
|
|||
* because there is no way to guarantee the eventual packet ordering.
|
||||
* </OL>
|
||||
*
|
||||
* @spec https://www.rfc-editor.org/info/rfc2246
|
||||
* RFC 2246: The TLS Protocol Version 1.0
|
||||
* @see SSLContext
|
||||
* @see SSLSocket
|
||||
* @see SSLServerSocket
|
||||
|
@ -859,6 +861,8 @@ public abstract class SSLEngine {
|
|||
* if this engine has not received the proper SSL/TLS/DTLS close
|
||||
* notification message from the peer.
|
||||
*
|
||||
* @spec https://www.rfc-editor.org/info/rfc2246
|
||||
* RFC 2246: The TLS Protocol Version 1.0
|
||||
* @see #isInboundDone()
|
||||
* @see #isOutboundDone()
|
||||
*/
|
||||
|
@ -1351,6 +1355,8 @@ public abstract class SSLEngine {
|
|||
* Application-Layer Protocol Negotiation (ALPN), can negotiate
|
||||
* application-level values between peers.
|
||||
*
|
||||
* @spec https://www.rfc-editor.org/info/rfc7301
|
||||
* RFC 7301: Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension
|
||||
* @implSpec
|
||||
* The implementation in this class throws
|
||||
* {@code UnsupportedOperationException} and performs no other action.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2024, 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
|
||||
|
@ -300,6 +300,7 @@ public class SSLParameters {
|
|||
* Java Security Standard Algorithm Names</a> document
|
||||
* for information about standard algorithm names.
|
||||
*
|
||||
* @spec security/standard-names.html Java Security Standard Algorithm Names
|
||||
* @see X509ExtendedTrustManager
|
||||
*
|
||||
* @since 1.7
|
||||
|
@ -674,6 +675,9 @@ public class SSLParameters {
|
|||
* @throws IllegalArgumentException if protocols is null, or if
|
||||
* any element in a non-empty array is null or an
|
||||
* empty (zero-length) string
|
||||
*
|
||||
* @spec https://www.rfc-editor.org/info/rfc7301
|
||||
* RFC 7301: Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension
|
||||
* @see #getApplicationProtocols
|
||||
* @since 9
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2024, 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
|
||||
|
@ -770,6 +770,9 @@ public abstract class SSLSocket extends Socket
|
|||
* if a value was successfully negotiated.
|
||||
* @throws UnsupportedOperationException if the underlying provider
|
||||
* does not implement the operation.
|
||||
*
|
||||
* @spec https://www.rfc-editor.org/info/rfc7301
|
||||
* RFC 7301: Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension
|
||||
* @since 9
|
||||
*/
|
||||
public String getApplicationProtocol() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2024, 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
|
||||
|
@ -198,6 +198,8 @@ public abstract class SSLSocketFactory extends SocketFactory {
|
|||
* does not implement the operation
|
||||
* @throws NullPointerException if {@code s} is {@code null}
|
||||
*
|
||||
* @spec https://www.rfc-editor.org/info/rfc6066
|
||||
* RFC 6066: Transport Layer Security (TLS) Extensions: Extension Definitions
|
||||
* @since 1.8
|
||||
*/
|
||||
public Socket createSocket(Socket s, InputStream consumed,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2024, 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
|
||||
|
@ -49,6 +49,8 @@ public final class StandardConstants {
|
|||
* <P>
|
||||
* The value of this constant is {@value}.
|
||||
*
|
||||
* @spec https://www.rfc-editor.org/info/rfc6066
|
||||
* RFC 6066: Transport Layer Security (TLS) Extensions: Extension Definitions
|
||||
* @see SNIServerName
|
||||
* @see SNIHostName
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2024, 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
|
||||
|
@ -36,6 +36,7 @@
|
|||
* </b></a></li>
|
||||
* </ul>
|
||||
*
|
||||
* @spec security/standard-names.html Java Security Standard Algorithm Names
|
||||
* @since 1.4
|
||||
*/
|
||||
package javax.net.ssl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue