-
Notifications
You must be signed in to change notification settings - Fork 99
Closed
Description
Is anyone else hosting their app over SSL/TLS ?
I have an SSL cert specifically for "ftp.mydomain.com" which is pointed at my application running nodeftp but have had no luck getting it to work.
The output of my error is as follows:
FTPD listening on port 21
Client connected from xx.xx.xxx.xxx
Establishing secure connection...
Secure socket not authorized: [Error: UNABLE_TO_GET_ISSUER_CERT]
I've tried loading the intermediaries into one .pem file as suggested here as well as just passing them individually in the ca array - but to no avail.
Here's the code. In this example my app uses a Comodo PositiveSSL cert.
//For SSL/TLS:
var tlsOptions = {
key: fs.readFileSync('ftp_mydomain_com.key'),
cert: fs.readFileSync('ftp_mydomain_com.crt'),
ca : [
fs.readFileSync('ftp_mydomain_com.crt'),
fs.readFileSync('COMODORSADomainValidationSecureServerCA.crt'),
fs.readFileSync('COMODORSAAddTrustCA.crt'),
fs.readFileSync('AddTrustExternalCARoot.crt')
],
rejectUnauthorized: true
}
var options = {
tlsOptions: tlsOptions,
allowUnauthorizedTls: false,
tlsOnly: true,
getInitialCwd: function(connection, initialCwdCallback) {
//and so forth
The user can connect if if you set "allowUnauthorizedTls".
Also, if you disable "tlsOnly" plain FTP works fine too.
Metadata
Metadata
Assignees
Labels
No labels