This class can be used to initialize a {@code Cipher} object that
* implements the ChaCha20 algorithm.
*
+ * @spec https://www.rfc-editor.org/info/rfc7539
+ * RFC 7539: ChaCha20 and Poly1305 for IETF Protocols
* @since 11
*/
public final class ChaCha20ParameterSpec implements AlgorithmParameterSpec {
diff --git a/src/java.base/share/classes/javax/crypto/spec/GCMParameterSpec.java b/src/java.base/share/classes/javax/crypto/spec/GCMParameterSpec.java
index 879d729c2ca0f..2e48383153b18 100644
--- a/src/java.base/share/classes/javax/crypto/spec/GCMParameterSpec.java
+++ b/src/java.base/share/classes/javax/crypto/spec/GCMParameterSpec.java
@@ -56,6 +56,12 @@
* applications. Other values can be specified for this class, but not
* all CSP implementations will support them.
*
+ * @spec https://www.rfc-editor.org/info/rfc5116
+ * RFC 5116: An Interface and Algorithms for Authenticated Encryption
+ * @spec https://csrc.nist.gov/publications/nistpubs/800-38D/SP-800-38D.pdf
+ * Recommendation for Block Cipher Modes of Operation: Galois/Counter
+ * Mode (GCM) and GMAC
+ *
* @see javax.crypto.Cipher
*
* @since 1.7
diff --git a/src/java.base/share/classes/javax/crypto/spec/OAEPParameterSpec.java b/src/java.base/share/classes/javax/crypto/spec/OAEPParameterSpec.java
index efc8f3708770f..b4ed49a3393a6 100644
--- a/src/java.base/share/classes/javax/crypto/spec/OAEPParameterSpec.java
+++ b/src/java.base/share/classes/javax/crypto/spec/OAEPParameterSpec.java
@@ -72,6 +72,8 @@
* EncodingParameters ::= OCTET STRING(SIZE(0..MAX))
*
*
+ * @spec https://www.rfc-editor.org/info/rfc8017
+ * RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2
* @see java.security.spec.MGF1ParameterSpec
* @see PSource
*
diff --git a/src/java.base/share/classes/javax/crypto/spec/PBEKeySpec.java b/src/java.base/share/classes/javax/crypto/spec/PBEKeySpec.java
index b21b610e78040..edd8b994501c1 100644
--- a/src/java.base/share/classes/javax/crypto/spec/PBEKeySpec.java
+++ b/src/java.base/share/classes/javax/crypto/spec/PBEKeySpec.java
@@ -54,6 +54,8 @@
* this class requests the password as a char array, so it can be overwritten
* when done.
*
+ * @spec https://www.rfc-editor.org/info/rfc2898
+ * RFC 2898: PKCS #5: Password-Based Cryptography Specification Version 2.0
* @author Jan Luehe
* @author Valerie Peng
*
diff --git a/src/java.base/share/classes/javax/crypto/spec/PBEParameterSpec.java b/src/java.base/share/classes/javax/crypto/spec/PBEParameterSpec.java
index 84d175dfd9f7d..6ed31e7e008b5 100644
--- a/src/java.base/share/classes/javax/crypto/spec/PBEParameterSpec.java
+++ b/src/java.base/share/classes/javax/crypto/spec/PBEParameterSpec.java
@@ -33,6 +33,8 @@
* PKCS #5
* standard.
*
+ * @spec https://www.rfc-editor.org/info/rfc2898
+ * RFC 2898: PKCS #5: Password-Based Cryptography Specification Version 2.0
* @author Jan Luehe
*
* @since 1.4
diff --git a/src/java.base/share/classes/javax/crypto/spec/PSource.java b/src/java.base/share/classes/javax/crypto/spec/PSource.java
index 1cd57c6f03b2c..4f21ddfbe21d7 100644
--- a/src/java.base/share/classes/javax/crypto/spec/PSource.java
+++ b/src/java.base/share/classes/javax/crypto/spec/PSource.java
@@ -42,6 +42,9 @@
* }
* EncodingParameters ::= OCTET STRING(SIZE(0..MAX))
*
+ *
+ * @spec https://www.rfc-editor.org/info/rfc8017
+ * RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2
* @author Valerie Peng
*
* @since 1.5
diff --git a/src/java.base/share/classes/javax/crypto/spec/RC2ParameterSpec.java b/src/java.base/share/classes/javax/crypto/spec/RC2ParameterSpec.java
index 16812dcc3892f..a2893a6c847b7 100644
--- a/src/java.base/share/classes/javax/crypto/spec/RC2ParameterSpec.java
+++ b/src/java.base/share/classes/javax/crypto/spec/RC2ParameterSpec.java
@@ -38,6 +38,8 @@
*
This class can be used to initialize a {@code Cipher} object that
* implements the RC2 algorithm.
*
+ * @spec https://www.rfc-editor.org/info/rfc2268
+ * RFC 2268: A Description of the RC2(r) Encryption Algorithm
* @author Jan Luehe
*
* @since 1.4
diff --git a/src/java.base/share/classes/javax/crypto/spec/RC5ParameterSpec.java b/src/java.base/share/classes/javax/crypto/spec/RC5ParameterSpec.java
index 4bee63d993235..f7ae07b9eb019 100644
--- a/src/java.base/share/classes/javax/crypto/spec/RC5ParameterSpec.java
+++ b/src/java.base/share/classes/javax/crypto/spec/RC5ParameterSpec.java
@@ -40,6 +40,8 @@
* RSA Security LLC,
* or any parties authorized by RSA Security.
*
+ * @spec https://www.rfc-editor.org/info/rfc2040
+ * RFC 2040: The RC5, RC5-CBC, RC5-CBC-Pad, and RC5-CTS Algorithms
* @author Jan Luehe
*
* @since 1.4
diff --git a/src/java.base/share/classes/javax/crypto/spec/SecretKeySpec.java b/src/java.base/share/classes/javax/crypto/spec/SecretKeySpec.java
index 5517d88157d94..83b71479af932 100644
--- a/src/java.base/share/classes/javax/crypto/spec/SecretKeySpec.java
+++ b/src/java.base/share/classes/javax/crypto/spec/SecretKeySpec.java
@@ -95,6 +95,8 @@ public class SecretKeySpec implements KeySpec, SecretKey {
* for information about standard algorithm names.
* @exception IllegalArgumentException if algorithm
* is null or key is null or empty.
+ *
+ * @spec security/standard-names.html Java Security Standard Algorithm Names
*/
public SecretKeySpec(byte[] key, String algorithm) {
if (key == null || algorithm == null) {
@@ -143,6 +145,8 @@ public SecretKeySpec(byte[] key, String algorithm) {
* @exception ArrayIndexOutOfBoundsException is thrown if
* offset or len index bytes outside the
* key.
+ *
+ * @spec security/standard-names.html Java Security Standard Algorithm Names
*/
public SecretKeySpec(byte[] key, int offset, int len, String algorithm) {
if (key == null || algorithm == null) {
diff --git a/src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java b/src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java
index c1ddf221ab503..6b67d81a881c7 100644
--- a/src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java
+++ b/src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java
@@ -63,6 +63,7 @@ public ExtendedSSLSession() {}
* 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 ExtendedSSLSession() {}
* 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
*/
diff --git a/src/java.base/share/classes/javax/net/ssl/SNIHostName.java b/src/java.base/share/classes/javax/net/ssl/SNIHostName.java
index 5abb9df1200f3..8cba361eee0b2 100644
--- a/src/java.base/share/classes/javax/net/ssl/SNIHostName.java
+++ b/src/java.base/share/classes/javax/net/ssl/SNIHostName.java
@@ -53,6 +53,11 @@
*
* 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 SNIHostName(String hostname) {
*
* @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 SNIHostName(byte[] encoded) {
*
* @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 String getAsciiName() {
* 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) {
diff --git a/src/java.base/share/classes/javax/net/ssl/SNIServerName.java b/src/java.base/share/classes/javax/net/ssl/SNIServerName.java
index 142bb33de8ed2..9a76dff038035 100644
--- a/src/java.base/share/classes/javax/net/ssl/SNIServerName.java
+++ b/src/java.base/share/classes/javax/net/ssl/SNIServerName.java
@@ -41,6 +41,8 @@
* {@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)
*
diff --git a/src/java.base/share/classes/javax/net/ssl/SSLEngine.java b/src/java.base/share/classes/javax/net/ssl/SSLEngine.java
index 9a74c69f9f5ca..07afa921292c9 100644
--- a/src/java.base/share/classes/javax/net/ssl/SSLEngine.java
+++ b/src/java.base/share/classes/javax/net/ssl/SSLEngine.java
@@ -413,6 +413,8 @@
* because there is no way to guarantee the eventual packet ordering.
*
*
+ * @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 SSLEngineResult unwrap(ByteBuffer src,
* 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 void setSSLParameters(SSLParameters params) {
* 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.
diff --git a/src/java.base/share/classes/javax/net/ssl/SSLParameters.java b/src/java.base/share/classes/javax/net/ssl/SSLParameters.java
index 0d4872f90510f..99000d8fb053c 100644
--- a/src/java.base/share/classes/javax/net/ssl/SSLParameters.java
+++ b/src/java.base/share/classes/javax/net/ssl/SSLParameters.java
@@ -298,6 +298,7 @@ public String getEndpointIdentificationAlgorithm() {
* Java Security Standard Algorithm Names document
* for information about standard algorithm names.
*
+ * @spec security/standard-names.html Java Security Standard Algorithm Names
* @see X509ExtendedTrustManager
*
* @since 1.7
@@ -672,6 +673,9 @@ public String[] getApplicationProtocols() {
* @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
*/
diff --git a/src/java.base/share/classes/javax/net/ssl/SSLSocket.java b/src/java.base/share/classes/javax/net/ssl/SSLSocket.java
index d0c3c9ac2ddae..a464a86a455bb 100644
--- a/src/java.base/share/classes/javax/net/ssl/SSLSocket.java
+++ b/src/java.base/share/classes/javax/net/ssl/SSLSocket.java
@@ -770,6 +770,9 @@ public void setSSLParameters(SSLParameters params) {
* 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() {
diff --git a/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java b/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java
index bd7c3d0157aac..0723ce1764c84 100644
--- a/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java
+++ b/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java
@@ -198,6 +198,8 @@ public abstract Socket createSocket(Socket s, String host,
* 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,
diff --git a/src/java.base/share/classes/javax/net/ssl/StandardConstants.java b/src/java.base/share/classes/javax/net/ssl/StandardConstants.java
index 8e1df977b977f..34472be702a1b 100644
--- a/src/java.base/share/classes/javax/net/ssl/StandardConstants.java
+++ b/src/java.base/share/classes/javax/net/ssl/StandardConstants.java
@@ -49,6 +49,8 @@ private StandardConstants() {
*
* 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
*/
diff --git a/src/java.base/share/classes/javax/net/ssl/package-info.java b/src/java.base/share/classes/javax/net/ssl/package-info.java
index f41b3b7f19a8b..39ff1a73b9f0c 100644
--- a/src/java.base/share/classes/javax/net/ssl/package-info.java
+++ b/src/java.base/share/classes/javax/net/ssl/package-info.java
@@ -36,6 +36,7 @@
*
*
*
+ * @spec security/standard-names.html Java Security Standard Algorithm Names
* @since 1.4
*/
package javax.net.ssl;
diff --git a/src/java.base/share/classes/javax/security/auth/login/package-info.java b/src/java.base/share/classes/javax/security/auth/login/package-info.java
index 70d25f1acaa8b..939868bcf2521 100644
--- a/src/java.base/share/classes/javax/security/auth/login/package-info.java
+++ b/src/java.base/share/classes/javax/security/auth/login/package-info.java
@@ -33,6 +33,7 @@
*
*
*
+ * @spec security/standard-names.html Java Security Standard Algorithm Names
* @since 1.4
*/
package javax.security.auth.login;
diff --git a/src/java.base/share/classes/javax/security/auth/x500/X500Principal.java b/src/java.base/share/classes/javax/security/auth/x500/X500Principal.java
index e2c8795a2e21a..ebb59a8809570 100644
--- a/src/java.base/share/classes/javax/security/auth/x500/X500Principal.java
+++ b/src/java.base/share/classes/javax/security/auth/x500/X500Principal.java
@@ -58,6 +58,14 @@
* {@code X509Certificate} return X500Principals representing the
* issuer and subject fields of the certificate.
*
+ * @spec https://www.rfc-editor.org/info/rfc1779
+ * RFC 1779: A String Representation of Distinguished Names
+ * @spec https://www.rfc-editor.org/info/rfc2253
+ * RFC 2253: Lightweight Directory Access Protocol (v3):
+ * UTF-8 String Representation of Distinguished Names
+ * @spec https://www.rfc-editor.org/info/rfc5280
+ * RFC 5280: Internet X.509 Public Key Infrastructure Certificate
+ * and Certificate Revocation List (CRL) Profile
* @see java.security.cert.X509Certificate
* @since 1.4
*/
@@ -124,6 +132,10 @@ public final class X500Principal implements Principal, java.io.Serializable {
* is {@code null}
* @exception IllegalArgumentException if the {@code name}
* is improperly specified
+ *
+ * @spec https://www.rfc-editor.org/info/rfc4512
+ * RFC 4512: Lightweight Directory Access Protocol (LDAP):
+ * Directory Information Models
*/
public X500Principal(String name) {
this(name, Collections.emptyMap());
@@ -164,6 +176,10 @@ public X500Principal(String name) {
* @exception IllegalArgumentException if the {@code name} is
* improperly specified or a keyword in the {@code name} maps to an
* OID that is not in the correct form
+ *
+ * @spec https://www.rfc-editor.org/info/rfc4512
+ * RFC 4512: Lightweight Directory Access Protocol (LDAP):
+ * Directory Information Models
* @since 1.6
*/
public X500Principal(String name, Map keywordMap) {
diff --git a/src/java.base/share/classes/javax/security/auth/x500/package-info.java b/src/java.base/share/classes/javax/security/auth/x500/package-info.java
index 45859a79bedf0..de107087ceaee 100644
--- a/src/java.base/share/classes/javax/security/auth/x500/package-info.java
+++ b/src/java.base/share/classes/javax/security/auth/x500/package-info.java
@@ -44,6 +44,17 @@
* Directory Information Models
*
*
+ * @spec https://www.rfc-editor.org/info/rfc1779
+ * RFC 1779: A String Representation of Distinguished Names
+ * @spec https://www.rfc-editor.org/info/rfc2253
+ * RFC 2253: Lightweight Directory Access Protocol (v3):
+ * UTF-8 String Representation of Distinguished Names
+ * @spec https://www.rfc-editor.org/info/rfc4512
+ * RFC 4512: Lightweight Directory Access Protocol (LDAP):
+ * Directory Information Models
+ * @spec https://www.rfc-editor.org/info/rfc5280
+ * RFC 5280: Internet X.509 Public Key Infrastructure Certificate
+ * and Certificate Revocation List (CRL) Profile
* @since 1.4
*/
package javax.security.auth.x500;