{"action":"created","issue":{"url":"https://api.github.com/repos/sstur/nodeftpd/issues/54","labels_url":"https://api.github.com/repos/sstur/nodeftpd/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/sstur/nodeftpd/issues/54/comments","events_url":"https://api.github.com/repos/sstur/nodeftpd/issues/54/events","html_url":"https://github.com/sstur/nodeftpd/issues/54","id":97608841,"number":54,"title":"Unable to connect using SSL/TLS","user":{"login":"drschwabe","id":858841,"avatar_url":"https://avatars.githubusercontent.com/u/858841?v=3","gravatar_id":"","url":"https://api.github.com/users/drschwabe","html_url":"https://github.com/drschwabe","followers_url":"https://api.github.com/users/drschwabe/followers","following_url":"https://api.github.com/users/drschwabe/following{/other_user}","gists_url":"https://api.github.com/users/drschwabe/gists{/gist_id}","starred_url":"https://api.github.com/users/drschwabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drschwabe/subscriptions","organizations_url":"https://api.github.com/users/drschwabe/orgs","repos_url":"https://api.github.com/users/drschwabe/repos","events_url":"https://api.github.com/users/drschwabe/events{/privacy}","received_events_url":"https://api.github.com/users/drschwabe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-28T03:50:44Z","updated_at":"2015-08-05T04:37:32Z","closed_at":null,"body":"Is anyone else hosting their app over SSL/TLS ? \r\n\r\nI 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. \r\n\r\nThe output of my error is as follows: \r\n\r\n```\r\nFTPD listening on port 21\r\nClient connected from xx.xx.xxx.xxx\r\nEstablishing secure connection...\r\nSecure socket not authorized: [Error: UNABLE_TO_GET_ISSUER_CERT]\r\n```\r\n\r\nI've tried loading the intermediaries into one .pem file as suggested [here](https://github.com/coolaj86/node-ssl-root-cas) as well as just passing them individually in the ca array - but to no avail.\r\n\r\nHere's the code. In this example my app uses a Comodo PositiveSSL cert.  \r\n\r\n```\r\n//For SSL/TLS:\r\nvar tlsOptions = {\r\n  key: fs.readFileSync('ftp_mydomain_com.key'),\r\n  cert: fs.readFileSync('ftp_mydomain_com.crt'),\r\n  ca : [\r\n    fs.readFileSync('ftp_mydomain_com.crt'),  \r\n    fs.readFileSync('COMODORSADomainValidationSecureServerCA.crt'),\r\n    fs.readFileSync('COMODORSAAddTrustCA.crt'), \r\n    fs.readFileSync('AddTrustExternalCARoot.crt')\r\n  ],\r\n  rejectUnauthorized: true\r\n}\r\n\r\nvar options = {\r\n  tlsOptions: tlsOptions,\r\n  allowUnauthorizedTls: false,\r\n  tlsOnly: true,\r\n  getInitialCwd: function(connection, initialCwdCallback) {\r\n  //and so forth\r\n```\r\n   \r\nThe user can connect if if you set \"allowUnauthorizedTls\".\r\nAlso, if you disable \"tlsOnly\" plain FTP works fine too.   "},"comment":{"url":"https://api.github.com/repos/sstur/nodeftpd/issues/comments/127843289","html_url":"https://github.com/sstur/nodeftpd/issues/54#issuecomment-127843289","issue_url":"https://api.github.com/repos/sstur/nodeftpd/issues/54","id":127843289,"user":{"login":"addrummond","id":120347,"avatar_url":"https://avatars.githubusercontent.com/u/120347?v=3","gravatar_id":"","url":"https://api.github.com/users/addrummond","html_url":"https://github.com/addrummond","followers_url":"https://api.github.com/users/addrummond/followers","following_url":"https://api.github.com/users/addrummond/following{/other_user}","gists_url":"https://api.github.com/users/addrummond/gists{/gist_id}","starred_url":"https://api.github.com/users/addrummond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/addrummond/subscriptions","organizations_url":"https://api.github.com/users/addrummond/orgs","repos_url":"https://api.github.com/users/addrummond/repos","events_url":"https://api.github.com/users/addrummond/events{/privacy}","received_events_url":"https://api.github.com/users/addrummond/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T04:37:32Z","updated_at":"2015-08-05T04:37:32Z","body":"Since tls support was added to nodeftpd, the code in starttls.js has been packaged up into an npm module with a somewhat different API.\r\n\r\nhttps://www.npmjs.com/package/starttls\r\n\r\nI'll see if using this module instead of the older code helps with the cert issue."}}