This is an automated email from the ASF dual-hosted git repository.
rmaucher pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 721a41083d Fix javadoc warnings
721a41083d is described below
commit 721a41083d381a045f5cbab0694ee0f83e5796ce
Author: remm <[email protected]>
AuthorDate: Tue Oct 6 21:40:55 2026 +0200
Fix javadoc warnings
---
.../apache/catalina/tribes/group/GroupChannel.java | 32 ++++++++++++++++++++++
.../catalina/tribes/group/GroupChannelMBean.java | 20 ++++++++++++++
.../catalina/tribes/group/TribesSslContext.java | 28 +++++++++++++++++++
.../catalina/tribes/transport/AbstractSender.java | 8 ++++++
java/org/apache/jasper/compiler/Node.java | 6 ++++
.../tomcat/util/net/SSLHostConfigPreSharedKey.java | 12 ++++++++
.../tomcat/util/net/openssl/OpenSSLContext.java | 8 ++++++
.../net/openssl/OpenSSLPreSharedKeySelector.java | 6 ++++
8 files changed, 120 insertions(+)
diff --git a/java/org/apache/catalina/tribes/group/GroupChannel.java
b/java/org/apache/catalina/tribes/group/GroupChannel.java
index 6a05efb71f..3a144a1ef5 100644
--- a/java/org/apache/catalina/tribes/group/GroupChannel.java
+++ b/java/org/apache/catalina/tribes/group/GroupChannel.java
@@ -663,6 +663,11 @@ public class GroupChannel extends ChannelInterceptorBase
implements ManagedChann
return secure;
}
+ /**
+ * Enables or disables the use of TLS to secure channel communication
using a pre-shared key.
+ *
+ * @param secure boolean
+ */
public void setSecure(boolean secure) {
this.secure = secure;
}
@@ -672,6 +677,11 @@ public class GroupChannel extends ChannelInterceptorBase
implements ManagedChann
return pskDigest;
}
+ /**
+ * Sets the name of the message digest algorithm used to derive the
pre-shared key.
+ *
+ * @param pskDigest the digest algorithm name, for example
<code>SHA256</code>
+ */
public void setPskDigest(String pskDigest) {
this.pskDigest = pskDigest;
}
@@ -681,10 +691,22 @@ public class GroupChannel extends ChannelInterceptorBase
implements ManagedChann
return pskIdentity;
}
+ /**
+ * Sets the identity associated with the pre-shared key. Both the identity
and the key must be set for the channel
+ * to use a pre-shared key.
+ *
+ * @param pskIdentity the pre-shared key identity
+ */
public void setPskIdentity(String pskIdentity) {
this.pskIdentity = pskIdentity;
}
+ /**
+ * Sets the pre-shared key as a hex encoded string. Both the identity and
the key must be set for the channel to
+ * use a pre-shared key.
+ *
+ * @param pskKey the hex encoded pre-shared key
+ */
public void setPskKey(String pskKey) {
this.pskKey = pskKey;
}
@@ -694,10 +716,20 @@ public class GroupChannel extends ChannelInterceptorBase
implements ManagedChann
return pskProtocol;
}
+ /**
+ * Sets the TLS protocol name used for secure channel communication.
+ *
+ * @param pskProtocol the TLS protocol name, for example
<code>TLSv1.3</code>
+ */
public void setPskProtocol(String pskProtocol) {
this.pskProtocol = pskProtocol;
}
+ /**
+ * Returns the SSL context used to secure the channel with TLS.
+ *
+ * @return the SSL context, or <code>null</code> if the channel is not
secure
+ */
public TribesSslContext getSslContext() {
return sslContext;
}
diff --git a/java/org/apache/catalina/tribes/group/GroupChannelMBean.java
b/java/org/apache/catalina/tribes/group/GroupChannelMBean.java
index 45e5491312..67c4a2508e 100644
--- a/java/org/apache/catalina/tribes/group/GroupChannelMBean.java
+++ b/java/org/apache/catalina/tribes/group/GroupChannelMBean.java
@@ -52,12 +52,32 @@ public interface GroupChannelMBean {
*/
long getHeartbeatSleeptime();
+ /**
+ * Returns whether the channel uses TLS to secure communication.
+ *
+ * @return {@code true} if the channel is secure
+ */
boolean getSecure();
+ /**
+ * Returns the name of the message digest algorithm used to derive the
pre-shared key.
+ *
+ * @return the pre-shared key digest algorithm name
+ */
String getPskDigest();
+ /**
+ * Returns the identity associated with the pre-shared key.
+ *
+ * @return the pre-shared key identity
+ */
String getPskIdentity();
+ /**
+ * Returns the TLS protocol name used for secure communication.
+ *
+ * @return the TLS protocol name
+ */
String getPskProtocol();
// Operations
diff --git a/java/org/apache/catalina/tribes/group/TribesSslContext.java
b/java/org/apache/catalina/tribes/group/TribesSslContext.java
index 527e6e1453..42fd41366b 100644
--- a/java/org/apache/catalina/tribes/group/TribesSslContext.java
+++ b/java/org/apache/catalina/tribes/group/TribesSslContext.java
@@ -35,6 +35,18 @@ public class TribesSslContext implements AutoCloseable {
private final Object serverContext;
private final boolean ffm;
+ /**
+ * Creates the pair of client and server TLS contexts to be used by a
Tribes channel. The OpenSSL FFM
+ * implementation is used where available, otherwise the Tomcat Native
implementation is used.
+ *
+ * @param identity The pre-shared key identity
+ * @param key The pre-shared key as a hex encoded string
+ * @param digest The name of the message digest algorithm used to
derive the pre-shared key, for example
+ * <code>SHA256</code>
+ * @param protocol The TLS protocol name, for example
<code>TLSv1.3</code>
+ *
+ * @throws Exception if the TLS contexts could not be created
+ */
public TribesSslContext(String identity, String key, String digest, String
protocol) throws Exception {
Object[] contexts = createFfmContexts(identity, key, digest, protocol);
if (contexts != null) {
@@ -50,10 +62,20 @@ public class TribesSslContext implements AutoCloseable {
serverContext = contexts[1];
}
+ /**
+ * Creates a new SSL engine for client-side use.
+ *
+ * @return the new client SSL engine
+ */
public SSLEngine createClientEngine() {
return createEngine(clientContext, true);
}
+ /**
+ * Creates a new SSL engine for server-side use.
+ *
+ * @return the new server SSL engine
+ */
public SSLEngine createServerEngine() {
return createEngine(serverContext, false);
}
@@ -180,6 +202,12 @@ public class TribesSslContext implements AutoCloseable {
}
+ /**
+ * Returns the name of the TLS implementation in use.
+ *
+ * @return <code>TLS-OpenSSL-FFM</code> if the OpenSSL FFM implementation
is used, otherwise
+ * <code>TLS-OpenSSL</code>
+ */
public String getImplementationName() {
if (ffm) {
return "TLS-OpenSSL-FFM";
diff --git a/java/org/apache/catalina/tribes/transport/AbstractSender.java
b/java/org/apache/catalina/tribes/transport/AbstractSender.java
index 75912a76e2..9305276a06 100644
--- a/java/org/apache/catalina/tribes/transport/AbstractSender.java
+++ b/java/org/apache/catalina/tribes/transport/AbstractSender.java
@@ -221,10 +221,18 @@ public abstract class AbstractSender implements
DataSender {
return port;
}
+ /**
+ * Returns the SSL context used to secure the connection with TLS.
+ * @return the SSL context, or <code>null</code> if the channel is not
secure
+ */
public TribesSslContext getSslContext() {
return sslContext;
}
+ /**
+ * Sets the SSL context used to secure the connection with TLS.
+ * @param sslContext the SSL context to use
+ */
public void setSslContext(TribesSslContext sslContext) {
this.sslContext = sslContext;
}
diff --git a/java/org/apache/jasper/compiler/Node.java
b/java/org/apache/jasper/compiler/Node.java
index 29b749ab1f..b09e82bd6b 100644
--- a/java/org/apache/jasper/compiler/Node.java
+++ b/java/org/apache/jasper/compiler/Node.java
@@ -2204,6 +2204,12 @@ public abstract class Node implements TagConstants {
*/
public static class PageTerminationGenerator extends Node {
+ /**
+ * Zero-arg Constructor.
+ */
+ PageTerminationGenerator() {
+ }
+
@Override
void accept(Visitor v) throws JasperException {
v.visit(this);
diff --git a/java/org/apache/tomcat/util/net/SSLHostConfigPreSharedKey.java
b/java/org/apache/tomcat/util/net/SSLHostConfigPreSharedKey.java
index c17ce3bf4f..545b90a5c9 100644
--- a/java/org/apache/tomcat/util/net/SSLHostConfigPreSharedKey.java
+++ b/java/org/apache/tomcat/util/net/SSLHostConfigPreSharedKey.java
@@ -31,10 +31,22 @@ public class SSLHostConfigPreSharedKey implements
Serializable {
@Serial
private static final long serialVersionUID = 1L;
+ /**
+ * The SSL host configuration that owns this pre-shared key configuration.
+ */
private final SSLHostConfig sslHostConfig;
+ /**
+ * The identity associated with the pre-shared key.
+ */
private String identity;
+ /**
+ * The pre-shared key.
+ */
private byte[] key;
+ /**
+ * The message digest algorithm used to derive the pre-shared key.
+ */
private MessageDigest digest = MessageDigest.SHA256;
/**
diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
index efc814ffb3..c878b5d70f 100644
--- a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
+++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
@@ -114,6 +114,14 @@ public class OpenSSLContext implements
org.apache.tomcat.util.net.SSLContext {
this(certificate, negotiableProtocols, false);
}
+ /**
+ * Constructs an OpenSSLContext for the given certificate, protocols and
client/server mode.
+ *
+ * @param certificate The SSL host config certificate
+ * @param negotiableProtocols The list of negotiable protocols
+ * @param clientMode {@code true} for client mode, otherwise server mode
+ * @throws SSLException if initialization fails
+ */
public OpenSSLContext(SSLHostConfigCertificate certificate, List<String>
negotiableProtocols, boolean clientMode)
throws SSLException {
this.sslHostConfig = certificate.getSSLHostConfig();
diff --git
a/java/org/apache/tomcat/util/net/openssl/OpenSSLPreSharedKeySelector.java
b/java/org/apache/tomcat/util/net/openssl/OpenSSLPreSharedKeySelector.java
index b7ad9802a3..67a1fbeaba 100644
--- a/java/org/apache/tomcat/util/net/openssl/OpenSSLPreSharedKeySelector.java
+++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLPreSharedKeySelector.java
@@ -38,6 +38,12 @@ public class OpenSSLPreSharedKeySelector implements
PreSharedKeySelector {
private final Map<String,SSLHostConfigPreSharedKey> identityToKeyMap = new
HashMap<>();
+ /**
+ * Creates a selector for the given set of pre-shared keys.
+ *
+ * @param psks The pre-shared keys to select from
+ * @throws IllegalArgumentException if multiple pre-shared keys share the
same identity
+ */
public OpenSSLPreSharedKeySelector(Set<SSLHostConfigPreSharedKey> psks) {
for (SSLHostConfigPreSharedKey psk : psks) {
SSLHostConfigPreSharedKey old =
identityToKeyMap.put(psk.getIdentity(), psk);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]