Skip to content

Commit f5b2ac3

Browse files
dengzimingjrodewig
authored andcommitted
[DOCS] Change "a SSL" to "an SSL" in the Java docs (#46524)
1 parent dbabe94 commit f5b2ac3

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public class SSLService {
9797
private final Map<String, SSLConfiguration> sslConfigurations;
9898

9999
/**
100-
* A mapping from a SSLConfiguration to a pre-built context.
100+
* A mapping from an SSLConfiguration to a pre-built context.
101101
* <p>
102102
* This is managed separately to the {@link #sslConfigurations} map, so that a single configuration (by object equality)
103103
* always maps to the same {@link SSLContextHolder}, even if it is being used within a different context-name.
@@ -249,7 +249,7 @@ public SSLEngine createSSLEngine(SSLConfiguration configuration, String host, in
249249
String[] supportedProtocols = configuration.supportedProtocols().toArray(Strings.EMPTY_ARRAY);
250250
SSLParameters parameters = new SSLParameters(ciphers, supportedProtocols);
251251
if (configuration.verificationMode().isHostnameVerificationEnabled() && host != null) {
252-
// By default, a SSLEngine will not perform hostname verification. In order to perform hostname verification
252+
// By default, an SSLEngine will not perform hostname verification. In order to perform hostname verification
253253
// we need to specify a EndpointIdentificationAlgorithm. We use the HTTPS algorithm to prevent against
254254
// man in the middle attacks for all of our connections.
255255
parameters.setEndpointIdentificationAlgorithm("HTTPS");
@@ -299,7 +299,7 @@ SSLContextHolder sslContextHolder(SSLConfiguration sslConfiguration) {
299299
Objects.requireNonNull(sslConfiguration, "SSL Configuration cannot be null");
300300
SSLContextHolder holder = sslContexts.get(sslConfiguration);
301301
if (holder == null) {
302-
throw new IllegalArgumentException("did not find a SSLContext for [" + sslConfiguration.toString() + "]");
302+
throw new IllegalArgumentException("did not find an SSLContext for [" + sslConfiguration.toString() + "]");
303303
}
304304
return holder;
305305
}
@@ -632,7 +632,7 @@ static void invalidateSessions(SSLSessionContext sslSessionContext) {
632632
while (sessionIds.hasMoreElements()) {
633633
byte[] sessionId = sessionIds.nextElement();
634634
SSLSession session = sslSessionContext.getSession(sessionId);
635-
// a SSLSession could be null as there is no lock while iterating, the session cache
635+
// an SSLSession could be null as there is no lock while iterating, the session cache
636636
// could have evicted a value, the session could be timed out, or the session could
637637
// have already been invalidated, which removes the value from the session cache in the
638638
// sun implementation

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ssl/SSLServiceTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ public void testThatSSLContextWithoutSettingsWorks() throws Exception {
712712
SSLContext sslContext = sslService.sslContext(sslService.sslConfiguration(Settings.EMPTY));
713713
try (CloseableHttpClient client = HttpClients.custom().setSSLContext(sslContext).build()) {
714714
// Execute a GET on a site known to have a valid certificate signed by a trusted public CA
715-
// This will result in a SSLHandshakeException if the SSLContext does not trust the CA, but the default
715+
// This will result in an SSLHandshakeException if the SSLContext does not trust the CA, but the default
716716
// truststore trusts all common public CAs so the handshake will succeed
717717
privilegedConnect(() -> client.execute(new HttpGet("https://www.elastic.co/")).close());
718718
}
@@ -745,7 +745,7 @@ public void testThatSSLIOSessionStrategyWithoutSettingsWorks() throws Exception
745745
client.start();
746746

747747
// Execute a GET on a site known to have a valid certificate signed by a trusted public CA
748-
// This will result in a SSLHandshakeException if the SSLContext does not trust the CA, but the default
748+
// This will result in an SSLHandshakeException if the SSLContext does not trust the CA, but the default
749749
// truststore trusts all common public CAs so the handshake will succeed
750750
client.execute(new HttpHost("elastic.co", 443, "https"), new HttpGet("/"), new AssertionCallback()).get();
751751
}

x-pack/plugin/security/cli/src/main/java/org/elasticsearch/xpack/security/cli/CertificateGenerateTool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ private static void printIntro(Terminal terminal, boolean csr) {
529529
terminal.println(" the certificate and private key will also be included in the output file.");
530530
}
531531
terminal.println("* Information about each instance");
532-
terminal.println(" * An instance is any piece of the Elastic Stack that requires a SSL certificate.");
532+
terminal.println(" * An instance is any piece of the Elastic Stack that requires an SSL certificate.");
533533
terminal.println(" Depending on your configuration, Elasticsearch, Logstash, Kibana, and Beats");
534534
terminal.println(" may all require a certificate and private key.");
535535
terminal.println(" * The minimum required value for each instance is a name. This can simply be the");

x-pack/plugin/security/cli/src/main/java/org/elasticsearch/xpack/security/cli/CertificateTool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public static void main(String[] args) throws Exception {
149149
"signing requests for use with SSL/TLS in the Elastic stack.";
150150

151151
static final String INSTANCE_EXPLANATION =
152-
" * An instance is any piece of the Elastic Stack that requires a SSL certificate.\n" +
152+
" * An instance is any piece of the Elastic Stack that requires an SSL certificate.\n" +
153153
" Depending on your configuration, Elasticsearch, Logstash, Kibana, and Beats\n" +
154154
" may all require a certificate and private key.\n" +
155155
" * The minimum required value for each instance is a name. This can simply be the\n" +

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactoryTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public void init() throws Exception {
5959
Environment env = TestEnvironment.newEnvironment(Settings.builder().put("path.home", createTempDir()).build());
6060
/*
6161
* Prior to each test we reinitialize the socket factory with a new SSLService so that we get a new SSLContext.
62-
* If we re-use a SSLContext, previously connected sessions can get re-established which breaks hostname
62+
* If we re-use an SSLContext, previously connected sessions can get re-established which breaks hostname
6363
* verification tests since a re-established connection does not perform hostname verification.
6464
*/
6565

x-pack/qa/openldap-tests/src/test/java/org/elasticsearch/test/OpenLdapTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public void initializeSslSocketFactory() throws Exception {
8484
Path truststore = getDataPath(LDAPTRUST_PATH);
8585
/*
8686
* Prior to each test we reinitialize the socket factory with a new SSLService so that we get a new SSLContext.
87-
* If we re-use a SSLContext, previously connected sessions can get re-established which breaks hostname
87+
* If we re-use an SSLContext, previously connected sessions can get re-established which breaks hostname
8888
* verification tests since a re-established connection does not perform hostname verification.
8989
*/
9090
MockSecureSettings mockSecureSettings = new MockSecureSettings();

x-pack/qa/openldap-tests/src/test/java/org/elasticsearch/xpack/security/authc/ldap/OpenLdapUserSearchSessionFactoryTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public void init() {
5353
Path caPath = getDataPath(LDAPCACERT_PATH);
5454
/*
5555
* Prior to each test we reinitialize the socket factory with a new SSLService so that we get a new SSLContext.
56-
* If we re-use a SSLContext, previously connected sessions can get re-established which breaks hostname
56+
* If we re-use an SSLContext, previously connected sessions can get re-established which breaks hostname
5757
* verification tests since a re-established connection does not perform hostname verification.
5858
*/
5959
globalSettings = Settings.builder()

x-pack/qa/third-party/active-directory/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ADLdapUserSearchSessionFactoryTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public void init() throws Exception {
4343
Environment env = TestEnvironment.newEnvironment(Settings.builder().put("path.home", createTempDir()).build());
4444
/*
4545
* Prior to each test we reinitialize the socket factory with a new SSLService so that we get a new SSLContext.
46-
* If we re-use a SSLContext, previously connected sessions can get re-established which breaks hostname
46+
* If we re-use an SSLContext, previously connected sessions can get re-established which breaks hostname
4747
* verification tests since a re-established connection does not perform hostname verification.
4848
*/
4949

x-pack/qa/third-party/active-directory/src/test/java/org/elasticsearch/xpack/security/authc/ldap/AbstractActiveDirectoryTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO
7878
});
7979
/*
8080
* Prior to each test we reinitialize the socket factory with a new SSLService so that we get a new SSLContext.
81-
* If we re-use a SSLContext, previously connected sessions can get re-established which breaks hostname
81+
* If we re-use an SSLContext, previously connected sessions can get re-established which breaks hostname
8282
* verification tests since a re-established connection does not perform hostname verification.
8383
*/
8484
Settings.Builder builder = Settings.builder().put("path.home", createTempDir());

0 commit comments

Comments
 (0)