Skip to content

Commit fa54260

Browse files
committed
Add javadoc
1 parent 499b1e8 commit fa54260

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/SSLService.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,22 @@
66
*/
77
package org.elasticsearch.xpack.core.ssl;
88

9-
import org.apache.http.HttpHost;
109
import org.apache.http.conn.ssl.DefaultHostnameVerifier;
1110
import org.apache.http.conn.ssl.NoopHostnameVerifier;
1211
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
1312
import org.apache.http.nio.conn.ssl.SSLIOSessionStrategy;
14-
import org.apache.http.nio.reactor.IOSession;
1513
import org.apache.logging.log4j.LogManager;
1614
import org.apache.logging.log4j.Logger;
1715
import org.elasticsearch.ElasticsearchException;
1816
import org.elasticsearch.ElasticsearchSecurityException;
1917
import org.elasticsearch.common.CheckedSupplier;
2018
import org.elasticsearch.common.Strings;
21-
import org.elasticsearch.common.logging.LoggerMessageFormat;
2219
import org.elasticsearch.common.settings.Setting;
2320
import org.elasticsearch.common.settings.Settings;
2421
import org.elasticsearch.common.ssl.DiagnosticTrustManager;
2522
import org.elasticsearch.common.ssl.KeyStoreUtil;
2623
import org.elasticsearch.common.ssl.SslConfigException;
2724
import org.elasticsearch.common.ssl.SslConfiguration;
28-
import org.elasticsearch.common.ssl.SslDiagnostics;
2925
import org.elasticsearch.common.ssl.SslKeyConfig;
3026
import org.elasticsearch.common.ssl.SslTrustConfig;
3127
import org.elasticsearch.common.util.Maps;
@@ -43,8 +39,6 @@
4339
import java.security.KeyManagementException;
4440
import java.security.KeyStore;
4541
import java.security.NoSuchAlgorithmException;
46-
import java.security.cert.Certificate;
47-
import java.security.cert.X509Certificate;
4842
import java.util.ArrayList;
4943
import java.util.Arrays;
5044
import java.util.Collection;
@@ -68,16 +62,13 @@
6862
import javax.net.ssl.HostnameVerifier;
6963
import javax.net.ssl.SSLContext;
7064
import javax.net.ssl.SSLEngine;
71-
import javax.net.ssl.SSLException;
7265
import javax.net.ssl.SSLParameters;
73-
import javax.net.ssl.SSLPeerUnverifiedException;
7466
import javax.net.ssl.SSLSession;
7567
import javax.net.ssl.SSLSessionContext;
7668
import javax.net.ssl.SSLSocket;
7769
import javax.net.ssl.SSLSocketFactory;
7870
import javax.net.ssl.X509ExtendedKeyManager;
7971
import javax.net.ssl.X509ExtendedTrustManager;
80-
import javax.security.auth.x500.X500Principal;
8172

8273
import static org.elasticsearch.transport.RemoteClusterPortSettings.REMOTE_CLUSTER_SERVER_ENABLED;
8374
import static org.elasticsearch.xpack.core.XPackSettings.DEFAULT_SUPPORTED_PROTOCOLS;
@@ -217,6 +208,12 @@ public static void registerSettings(List<Setting<?>> settingList) {
217208
settingList.add(DIAGNOSE_TRUST_EXCEPTIONS_SETTING);
218209
}
219210

211+
/**
212+
* Return an encapsulated object for the named profile.
213+
* A profile is named according to the settings prefix under which it is defined (e.g. {@code xpack.http.ssl} or
214+
* {@code xpack.security.transport.ssl}
215+
* @throws IllegalArgumentException if the named profile does not exist
216+
*/
220217
public SslProfile profile(String profileName) {
221218
final SslConfiguration configuration = getSSLConfiguration(profileName);
222219
if (configuration == null) {

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/SslProfile.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
import javax.net.ssl.SSLEngine;
1717
import javax.net.ssl.SSLSocketFactory;
1818

19+
/**
20+
* An <em>SSL Profile</em> is a runtime implementation of a {@link SslConfiguration}.
21+
* It provides access to various SSL related objects that are automatically configured according to the associated {@link SslConfiguration}.
22+
*/
1923
public interface SslProfile {
2024
SslConfiguration configuration();
2125

0 commit comments

Comments
 (0)