Skip to content
This repository has been archived by the owner on Dec 28, 2020. It is now read-only.

Support for SSL using self-signed certs #6

Closed
zipwiz opened this issue Apr 27, 2015 · 11 comments
Closed

Support for SSL using self-signed certs #6

zipwiz opened this issue Apr 27, 2015 · 11 comments

Comments

@zipwiz
Copy link

zipwiz commented Apr 27, 2015

I tried to use this tool to fetch built structure meta data from a dev host which is reachable only via https, but has only self-signed dummy certs installed. I receive this message:

Unknown error: {"code":"DEPTH_ZERO_SELF_SIGNED_CERT"}

This seems to be a node.js problem but can be overcome using the right modules and implementation (as it seems).

Is it possible to extend liferay-ddmtool such that thid problem can be bypassed at least by explicit configuration? Something like "allowSelfSignedCerts : true"?

@zipwiz
Copy link
Author

zipwiz commented Apr 27, 2015

Additional resources:
request/request#418

@emiloberg
Copy link
Owner

Looks like Node changed a bit around 0.10.x

rejectUnauthorized: If true, the server certificate is verified against the list of supplied CAs. An 'error' event is emitted if verification fails. Verification happens at the connection level, before the HTTP request is sent. Default true.

Could you test one thing for me: Open the index.js and add the following line at the very top:

process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0;

Does that solve it?

@zipwiz
Copy link
Author

zipwiz commented Apr 27, 2015

Thanks... result is:

Getting data from server
Downloading id's

Downloading list of sites

Error
Error: Could not find any sites

I interpret this as "yes, this problem is solved" (although having another one now...)

@emiloberg
Copy link
Owner

Ouch! Could I ask you to add a new issue (so I can keep this for implementing a nicer way of accepting self signed certs).

@zipwiz
Copy link
Author

zipwiz commented Apr 27, 2015

OK, I will try some title and content... I hope to meet your expectations ;-)

@emiloberg
Copy link
Owner

Just copy paste the previous message and I'm happy ;)

@zipwiz
Copy link
Author

zipwiz commented Apr 27, 2015

take a look...

@zipwiz
Copy link
Author

zipwiz commented Apr 27, 2015

or did you mean the full ddm-tool reply?

@emiloberg
Copy link
Owner

Haha, I meant the Error: Could not find any sites problem, as I think that's a separate issue, but no problems, let's do it here.

If you find me on skype: emil.oberg or hangout: emil.oberg@gmail.com It might be easier to debug the problem.

@zipwiz
Copy link
Author

zipwiz commented Apr 27, 2015

I will come back as necessary, but I think that the problem is not caused by ddm-tool, but by my local setup. If that is succuessfully excluded as a possible reason, I will aks again here. Thanks for the offer however :-)

@emiloberg
Copy link
Owner

Perfect! Don't hesitate to come back if the error persist!

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

No branches or pull requests

2 participants