In #https://github.com/square/certigo/issues/120, there is a side note that FTPS can be implicit/explicit. In this Pull Request, implicit FTPS will be supported. In implicit SSL mode, a SSL handshake is initiated on connection. After the completion of a successful SSL handshake, the FTPS server will response with status code 220, which indicates that the server is ready for the new client.
An Implicit FTPS connection example with curl command:
old SSL session ID is stale, removing
< 220 Welcome to FTP service.
Implementation
In CLI part, add a starttls method called "ftps". In ftp.go file, add a indicator in the function and in order to compatible with existing explicit FTP, changes are as follows:
Create a struct FTPCtx with both TCP and TLS network connection.
Change the input parameter type of readFTP function from *net.TCPConn to interface net.Conn
Refactor the code by creating checkServiceReady and authTLS function.
Problem Scenario
In #https://github.com/square/certigo/issues/120, there is a side note that FTPS can be implicit/explicit. In this Pull Request, implicit FTPS will be supported. In implicit SSL mode, a SSL handshake is initiated on connection. After the completion of a successful SSL handshake, the FTPS server will response with status code 220, which indicates that the server is ready for the new client.
An Implicit FTPS connection example with curl command:
Implementation
In CLI part, add a starttls method called "ftps". In
ftp.go
file, add a indicator in the function and in order to compatible with existing explicit FTP, changes are as follows:readFTP
function from*net.TCPConn
to interfacenet.Conn
checkServiceReady
andauthTLS
function.