Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rejectUnauthorized ignored? #128

Open
xenogenesi opened this issue Feb 26, 2020 · 0 comments
Open

rejectUnauthorized ignored? #128

xenogenesi opened this issue Feb 26, 2020 · 0 comments

Comments

@xenogenesi
Copy link

I'm using ProFTPD with tls support and a private certificate (tested with Firezilla and lftp), I'm setting the secure option and the secureOptions like below:

export function deployClean(cb) {
	var conn = ftp.create({
		host:     'localhost',
		user:     'ftpuser',
		password: 'password',
        //parallel: 10,
        //maxConnections: 10, // >= parallel
        log:      gutil.log,
        secure: true,
        secureOtions: { rejectUnauthorized: false },
	});

but I'm getting this error:

[19:39:48] Requiring external module esm
[19:39:49] Using gulpfile ~/jsapp/gulpfile.esm.js
[19:39:49] Starting 'deploy'...
[19:39:49] CONN 
[19:39:49] ERROR Error: self signed certificate
    at TLSSocket.onConnectSecure (_tls_wrap.js:1321:34)
    at TLSSocket.emit (events.js:223:5)
    at TLSSocket.EventEmitter.emit (domain.js:498:23)
    at TLSSocket._finishInit (_tls_wrap.js:794:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:608:12) (DEPTH_ZERO_SELF_SIGNED_CERT)
[19:39:49] DISC 
[19:39:49] 'deploy' errored after 139 ms
[19:39:49] Error: self signed certificate
    at TLSSocket.onConnectSecure (_tls_wrap.js:1321:34)
    at TLSSocket.emit (events.js:223:5)
    at TLSSocket.EventEmitter.emit (domain.js:498:23)
    at TLSSocket._finishInit (_tls_wrap.js:794:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:608:12)

I'm using the environment version as a workaround (but I would prefer to use the configuration)

NODE_TLS_REJECT_UNAUTHORIZED=0 gulp deploy

node version v12.14.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant