davsclaus commented on code in PR #395:
URL: https://github.com/apache/commons-net/pull/395#discussion_r3434979390
##########
src/main/java/org/apache/commons/net/ftp/FTPSClient.java:
##########
@@ -1119,5 +1119,14 @@ protected void sslNegotiation() throws IOException {
throw new SSLHandshakeException("Hostname doesn't match
certificate");
}
}
+
+ @Override
+ protected String resolveExtendedPassiveModeHost() {
+ if (_socket_ instanceof SSLSocket) {
+ return ((SSLSocket) _socket_).getSession().getPeerHost();
+ } else {
+ return super.resolveExtendedPassiveModeHost();
+ }
+ }
}
Review Comment:
Missing Javadoc on this override. The base method in `FTPClient` has `@since
3.14.0` and a description. Consider adding:
```suggestion
/**
* Resolves the host for extended passive mode using the TLS session
peer host,
* enabling TLS session reuse between the control and data connections.
*
* @since 3.14.0
* @return the passive host from the SSL session, or the default if not
an SSL connection
*/
@Override
protected String resolveExtendedPassiveModeHost() {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]