mscdex / node-ftp

An FTP client module for node.js
MIT License
1.13k stars 243 forks source link

ignore expired certificate #136

Closed jmarceli closed 8 years ago

jmarceli commented 8 years ago

When connecting to my server I get: Error: certificate has expired. Is it possible to ignore this error and establish connection anyway?

jmarceli commented 8 years ago

For anyone having same problem. The solution is to define: process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; Before connecting.

mscdex commented 8 years ago

A (better) way to do this non-globally is to use the secureOptions config option to pass options (e.g. rejectUnauthorized: false) directly to node's tls.connect().

jmarceli commented 8 years ago

Thanks. My answer was just a quick fix.