Skip to content

Commit

Permalink
Update TLS configuration defaults in javadoc (#2939)
Browse files Browse the repository at this point in the history
- 3s for close_notify flush timeout
- 0s for close_notify read timeout
  • Loading branch information
simonatan committed Oct 23, 2023
1 parent 3ef6828 commit 622058a
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 19 deletions.
22 changes: 15 additions & 7 deletions reactor-netty-core/src/main/java/reactor/netty/tcp/TcpClient.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2021 VMware, Inc. or its affiliates, All Rights Reserved.
* Copyright (c) 2011-2023 VMware, Inc. or its affiliates, All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -312,9 +312,13 @@ public TcpClient runOn(LoopResources loopResources, boolean preferNative) {

/**
* Enable default sslContext support. The default {@link SslContext} will be
* assigned to
* with a default value of {@code 10} seconds handshake timeout unless
* the environment property {@code reactor.netty.tcp.sslHandshakeTimeout} is set.
* assigned to with a default value of:
* <ul>
* <li>{@code 10} seconds handshake timeout unless the environment property
* {@code reactor.netty.tcp.sslHandshakeTimeout} is set.</li>
* <li>{@code 3} seconds close_notify flush timeout</li>
* <li>{@code 0} second close_notify read timeout</li>
* </ul>
*
* @return a new {@link TcpClient}
*/
Expand All @@ -326,9 +330,13 @@ public TcpClient secure() {

/**
* Apply an SSL configuration customization via the passed builder. The builder
* will produce the {@link SslContext} to be passed to with a default value of
* {@code 10} seconds handshake timeout unless the environment property {@code
* reactor.netty.tcp.sslHandshakeTimeout} is set.
* will produce the {@link SslContext} to be passed to with a default value of:
* <ul>
* <li>{@code 10} seconds handshake timeout unless the environment property
* {@code reactor.netty.tcp.sslHandshakeTimeout} is set.</li>
* <li>{@code 3} seconds close_notify flush timeout</li>
* <li>{@code 0} second close_notify read timeout</li>
* </ul>
*
* @param sslProviderBuilder builder callback for further customization of SslContext.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2021 VMware, Inc. or its affiliates, All Rights Reserved.
* Copyright (c) 2011-2023 VMware, Inc. or its affiliates, All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -168,9 +168,13 @@ public TcpServer runOn(LoopResources loopResources, boolean preferNative) {

/**
* Apply an SSL configuration customization via the passed builder. The builder
* will produce the {@link SslContext} to be passed to with a default value of
* {@code 10} seconds handshake timeout unless the environment property {@code
* reactor.netty.tcp.sslHandshakeTimeout} is set.
* will produce the {@link SslContext} to be passed to with a default value of:
* <ul>
* <li>{@code 10} seconds handshake timeout unless the environment property
* {@code reactor.netty.tcp.sslHandshakeTimeout} is set.</li>
* <li>{@code 3} seconds close_notify flush timeout</li>
* <li>{@code 0} second close_notify read timeout</li>
* </ul>
*
* If {@link SelfSignedCertificate} needs to be used, the sample below can be
* used. Note that {@link SelfSignedCertificate} should not be used in production.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2022 VMware, Inc. or its affiliates, All Rights Reserved.
* Copyright (c) 2011-2023 VMware, Inc. or its affiliates, All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -1383,6 +1383,8 @@ public final HttpClient responseTimeout(@Nullable Duration maxReadOperationInter
* <ul>
* <li>{@code 10} seconds handshake timeout unless
* the environment property {@code reactor.netty.tcp.sslHandshakeTimeout} is set</li>
* <li>{@code 3} seconds close_notify flush timeout</li>
* <li>{@code 0} second close_notify read timeout</li>
* <li>hostname verification enabled</li>
* </ul>
* </p>
Expand All @@ -1405,6 +1407,8 @@ public final HttpClient secure() {
* <ul>
* <li>{@code 10} seconds handshake timeout unless the passed builder sets another configuration or
* the environment property {@code reactor.netty.tcp.sslHandshakeTimeout} is set</li>
* <li>{@code 3} seconds close_notify flush timeout</li>
* <li>{@code 0} second close_notify read timeout</li>
* <li>hostname verification enabled</li>
* </ul>
* </p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -800,10 +800,13 @@ public final HttpServer route(Consumer<? super HttpServerRoutes> routesBuilder)

/**
* Apply an SSL configuration customization via the passed builder. The builder
* will produce the {@link SslContext} to be passed to with a default value of
* {@code 10} seconds handshake timeout unless the environment property {@code
* reactor.netty.tcp.sslHandshakeTimeout} is set.
*
* will produce the {@link SslContext} to be passed to with a default value of:
* <ul>
* <li>{@code 10} seconds handshake timeout unless the environment property
* {@code reactor.netty.tcp.sslHandshakeTimeout} is set.</li>
* <li>{@code 3} seconds close_notify flush timeout</li>
* <li>{@code 0} second close_notify read timeout</li>
* </ul>
* If {@link SelfSignedCertificate} needs to be used, the sample below can be
* used. Note that {@link SelfSignedCertificate} should not be used in production.
* <pre>
Expand All @@ -824,9 +827,13 @@ public final HttpServer secure(Consumer<? super SslProvider.SslContextSpec> sslP

/**
* Apply an SSL configuration customization via the passed builder. The builder
* will produce the {@link SslContext} to be passed to with a default value of
* {@code 10} seconds handshake timeout unless the environment property {@code
* reactor.netty.tcp.sslHandshakeTimeout} is set.
* will produce the {@link SslContext} to be passed to with a default value of:
* <ul>
* <li>{@code 10} seconds handshake timeout unless the environment property
* {@code reactor.netty.tcp.sslHandshakeTimeout} is set.</li>
* <li>{@code 3} seconds close_notify flush timeout</li>
* <li>{@code 0} second close_notify read timeout</li>
* </ul>
* <p>
* If {@link SelfSignedCertificate} needs to be used, the sample below can be
* used. Note that {@link SelfSignedCertificate} should not be used in production.
Expand Down

0 comments on commit 622058a

Please sign in to comment.